diff --git a/VERSION b/VERSION
index 1809198..73a1fbb 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.4.0
+3.4.1-dev
diff --git a/agent/src/core_api_handler.cc b/agent/src/core_api_handler.cc
index 95a3a67..a987540 100644
--- a/agent/src/core_api_handler.cc
+++ b/agent/src/core_api_handler.cc
@@ -2308,91 +2308,98 @@
         key.pon_ni = intf_id;
         key.alloc_id = alloc_id;
         int bw_granularity = (board_technology == "XGS-PON")?XGS_BANDWIDTH_GRANULARITY:GPON_BANDWIDTH_GRANULARITY;
+        /*
+            PIR: Maximum Bandwidth
+            CIR: Assured Bandwidth
+            GIR: Fixed Bandwidth
+        */
         int pir_bw = tf_sh_info.pir()*125; // conversion from kbps to bytes/sec
         int cir_bw = tf_sh_info.cir()*125; // conversion from kbps to bytes/sec
+        int gir_bw = tf_sh_info.gir()*125; // conversion from kbps to bytes/sec
+        int guaranteed_bw = cir_bw+gir_bw;
         //offset to match bandwidth granularity
         int offset_pir_bw = pir_bw%bw_granularity;
-        int offset_cir_bw = cir_bw%bw_granularity;
+        int offset_gir_bw = gir_bw%bw_granularity;
+        int offset_guaranteed_bw = guaranteed_bw%bw_granularity;
 
         pir_bw = pir_bw - offset_pir_bw;
-        cir_bw = cir_bw - offset_cir_bw;
+        gir_bw = gir_bw - offset_gir_bw;
+        guaranteed_bw = guaranteed_bw - offset_guaranteed_bw;
 
         BCMOLT_CFG_INIT(&cfg, itupon_alloc, key);
 
+        OPENOLT_LOG(INFO, openolt_log_id, "Creating alloc_id %d with pir = %d bytes/sec, cir = %d bytes/sec, gir = %d bytes/sec, additional_bw = %d.\n", alloc_id, pir_bw, cir_bw, gir_bw, additional_bw);
+
+        if (pir_bw == 0) {
+            OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth must be at least %d bytes/sec\n",
+                        (board_technology == "XGS-PON")?XGS_BANDWIDTH_GRANULARITY:GPON_BANDWIDTH_GRANULARITY);
+            return BCM_ERR_PARM;
+        } else if (pir_bw < guaranteed_bw) {
+            OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth (%d) can't be less than Guaranteed bandwidth (%d)\n",
+                        pir_bw, guaranteed_bw);
+            return BCM_ERR_PARM;
+        }
+
+        // Setting additional bw eligibility and validating bw provisionings
         switch (additional_bw) {
-            case 2: //AdditionalBW_BestEffort
-                if (pir_bw == 0) {
-                   OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth was set to 0, must be at least \
-%d bytes/sec\n", (board_technology == "XGS-PON")?XGS_BANDWIDTH_GRANULARITY:GPON_BANDWIDTH_GRANULARITY);
-                   return BCM_ERR_PARM;
-                } else if (pir_bw < cir_bw) {
-                   OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth (%d) can't be less than Guaranteed \
-bandwidth (%d)\n", pir_bw, cir_bw);
-                   return BCM_ERR_PARM;
-                } else if (pir_bw == cir_bw) {
-                   OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth must be greater than Guaranteed \
-bandwidth for additional bandwidth eligibility of type best_effort\n");
-                   return BCM_ERR_PARM;
+
+            case tech_profile::AdditionalBW::AdditionalBW_BestEffort: //AdditionalBW_BestEffort - For T-Cont types 4 & 5
+                if (pir_bw == guaranteed_bw) {
+                    OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth must be greater than Guaranteed \
+bandwidth for additional bandwidth eligibility of type Best Effort\n");
+                    return BCM_ERR_PARM;
                 }
                 BCMOLT_MSG_FIELD_SET(&cfg, sla.additional_bw_eligibility, BCMOLT_ADDITIONAL_BW_ELIGIBILITY_BEST_EFFORT);
                 break;
-            case 1: //AdditionalBW_NA
-                if (pir_bw == 0) {
-                    OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth was set to 0, must be at least \
-%d bytes/sec\n", (board_technology == "XGS-PON")?XGS_BANDWIDTH_GRANULARITY:GPON_BANDWIDTH_GRANULARITY);
-                    return BCM_ERR_PARM;
-                } else if (cir_bw == 0) {
+
+            case tech_profile::AdditionalBW::AdditionalBW_NA: //AdditionalBW_NA - For T-Cont types 3 & 5
+                if (guaranteed_bw == 0) {
                     OPENOLT_LOG(ERROR, openolt_log_id, "Guaranteed bandwidth must be greater than zero for \
 additional bandwidth eligibility of type Non-Assured (NA)\n");
                     return BCM_ERR_PARM;
-                } else if (pir_bw < cir_bw) {
-                    OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth (%d) can't be less than Guaranteed \
-bandwidth (%d)\n", pir_bw, cir_bw);
-                    return BCM_ERR_PARM;
-                } else if (pir_bw == cir_bw) {
+                } else if (pir_bw == guaranteed_bw) {
                     OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth must be greater than Guaranteed \
-bandwidth for additional bandwidth eligibility of type non_assured\n");
+bandwidth for additional bandwidth eligibility of type Non-Assured\n");
                     return BCM_ERR_PARM;
                 }
                 BCMOLT_MSG_FIELD_SET(&cfg, sla.additional_bw_eligibility, BCMOLT_ADDITIONAL_BW_ELIGIBILITY_NON_ASSURED);
                 break;
-            case 0: //AdditionalBW_None
-                if (pir_bw == 0) {
-                    OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth was set to 0, must be at least \
-16000 bytes/sec\n");
-                    return BCM_ERR_PARM;
-                } else if (cir_bw == 0) {
-                   OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth must be equal to Guaranteed bandwidth \
+
+            case tech_profile::AdditionalBW::AdditionalBW_None: //AdditionalBW_None - For T-Cont types 1 & 2
+                if (guaranteed_bw != pir_bw) {
+                    OPENOLT_LOG(ERROR, openolt_log_id, "Guaranteed bandwidth must be equal to maximum bandwidth \
 for additional bandwidth eligibility of type None\n");
                     return BCM_ERR_PARM;
-                } else if (pir_bw > cir_bw) {
-                   OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth must be equal to Guaranteed bandwidth \
-for additional bandwidth eligibility of type None\n");
-                   OPENOLT_LOG(ERROR, openolt_log_id, "Setting Maximum bandwidth (%d) to Guaranteed \
-bandwidth in None eligibility\n", pir_bw);
-                   cir_bw = pir_bw;
-                } else if (pir_bw < cir_bw) {
-                   OPENOLT_LOG(ERROR, openolt_log_id, "Maximum bandwidth (%d) can't be less than Guaranteed \
-bandwidth (%d)\n", pir_bw, cir_bw);
-                   OPENOLT_LOG(ERROR, openolt_log_id, "Setting Maximum bandwidth (%d) to Guaranteed \
-bandwidth in None eligibility\n", pir_bw);
-                   cir_bw = pir_bw;
                 }
                 BCMOLT_MSG_FIELD_SET(&cfg, sla.additional_bw_eligibility, BCMOLT_ADDITIONAL_BW_ELIGIBILITY_NONE);
                 break;
+
             default:
+                OPENOLT_LOG(ERROR, openolt_log_id, "Invalid additional bandwidth eligibility value (%d) supplied.\n", additional_bw);
                 return BCM_ERR_PARM;
         }
+
         /* CBR Real Time Bandwidth which require shaping of the bandwidth allocations
            in a fine granularity. */
         BCMOLT_MSG_FIELD_SET(&cfg, sla.cbr_rt_bw, 0);
+        /* Since we can assign minimum 64000 bytes/sec for cbr_rt_bw, we prefer assigning
+           gir_bw to cbr_nrt_bw to allow smaller amounts.
+           TODO: Specify CBR_RT_BW and CBR_NRT_BW separately from VOLTHA */
         /* Fixed Bandwidth with no critical requirement of shaping */
-        BCMOLT_MSG_FIELD_SET(&cfg, sla.cbr_nrt_bw, 0);
+        BCMOLT_MSG_FIELD_SET(&cfg, sla.cbr_nrt_bw, gir_bw);
         /* Dynamic bandwidth which the OLT is committed to allocate upon demand */
-        BCMOLT_MSG_FIELD_SET(&cfg, sla.guaranteed_bw, cir_bw);
+        BCMOLT_MSG_FIELD_SET(&cfg, sla.guaranteed_bw, guaranteed_bw);
         /* Maximum allocated bandwidth allowed for this alloc ID */
         BCMOLT_MSG_FIELD_SET(&cfg, sla.maximum_bw, pir_bw);
-        BCMOLT_MSG_FIELD_SET(&cfg, sla.alloc_type, BCMOLT_ALLOC_TYPE_NSR);
+
+        if (pir_bw == gir_bw) { // T-Cont Type 1 --> set alloc type to NONE
+            // the condition cir_bw == 0 is implicitly satistied
+            OPENOLT_LOG(INFO, openolt_log_id, "Setting alloc type to NONE since maximum bandwidth is equal to fixed bandwidth\n");
+            BCMOLT_MSG_FIELD_SET(&cfg, sla.alloc_type, BCMOLT_ALLOC_TYPE_NONE);
+        } else { // For other T-Cont types, set alloc type to NSR. TODO: read the default from a config file.
+            BCMOLT_MSG_FIELD_SET(&cfg, sla.alloc_type, BCMOLT_ALLOC_TYPE_NSR);
+        }
+
         /* Set to True for AllocID with CBR RT Bandwidth that requires compensation
            for skipped allocations during quiet window */
         BCMOLT_MSG_FIELD_SET(&cfg, sla.cbr_rt_compensation, BCMOS_FALSE);
@@ -2409,7 +2416,7 @@
         err = bcmolt_cfg_set(dev_id, &cfg.hdr);
         if (err) {
             OPENOLT_LOG(ERROR, openolt_log_id, "Failed to create upstream bandwidth allocation, intf_id %d, onu_id %d, uni_id %d,\
-port_no %u, alloc_id %d, err = %s\n", intf_id, onu_id,uni_id,port_no,alloc_id, bcmos_strerror(err));
+port_no %u, alloc_id %d, err = %s (%s)\n", intf_id, onu_id,uni_id,port_no,alloc_id, bcmos_strerror(err), cfg.hdr.hdr.err_text);
             return err;
         }
 #ifndef SCALE_AND_PERF
diff --git a/agent/test/src/test_core.cc b/agent/test/src/test_core.cc
index 2d2bede..7f8a4df 100644
--- a/agent/test/src/test_core.cc
+++ b/agent/test/src/test_core.cc
@@ -1969,6 +1969,7 @@
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_BestEffort);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(64000);
     traffic_shaping_info->set_pir(0);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
@@ -1983,6 +1984,7 @@
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_BestEffort);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(64000);
     traffic_shaping_info->set_pir(32000);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
@@ -1997,6 +1999,7 @@
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_BestEffort);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(64000);
     traffic_shaping_info->set_pir(64000);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
@@ -2011,6 +2014,7 @@
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_NA);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(64000);
     traffic_shaping_info->set_pir(0);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
@@ -2025,6 +2029,7 @@
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_NA);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(0);
     traffic_shaping_info->set_pir(32000);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
@@ -2039,6 +2044,7 @@
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_NA);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(64000);
     traffic_shaping_info->set_pir(32000);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
@@ -2053,6 +2059,7 @@
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_NA);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(64000);
     traffic_shaping_info->set_pir(64000);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
@@ -2067,6 +2074,7 @@
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_None);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(64000);
     traffic_shaping_info->set_pir(0);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
@@ -2081,6 +2089,7 @@
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_None);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(0);
     traffic_shaping_info->set_pir(32000);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
@@ -2089,38 +2098,62 @@
     ASSERT_TRUE( status.error_message() != Status::OK.error_message() );
 }
 
-// Test 15 - CreateTrafficSchedulers-Upstream Success (AdditionalBW_None-Max BW > Guaranteed BW) case
-TEST_F(TestCreateTrafficSchedulers, AdditionalBW_NoneMaxBWGtGuaranteedBwSuccess) {
+// Test 15 - CreateTrafficSchedulers-Upstream Failure (AdditionalBW_None-Max BW > Guaranteed BW) case
+TEST_F(TestCreateTrafficSchedulers, AdditionalBW_NoneMaxBWGtGuaranteedBwFailure) {
     scheduler->set_direction(tech_profile::Direction::UPSTREAM);
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_None);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(64000);
     traffic_shaping_info->set_pir(128000);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
 
-    bcmos_errno olt_cfg_set_res = BCM_ERR_OK;
-    ON_CALL(balMock, bcmolt_cfg_set(_, _)).WillByDefault(Return(olt_cfg_set_res));
-
-    future<Status> future_res = async(launch::async, CreateTrafficSchedulers_, traffic_scheds);
-    future<int> push_alloc_cfg_complt = \
-    async(launch::async, TestCreateTrafficSchedulers::PushAllocCfgResult, ALLOC_OBJECT_STATE_ACTIVE, ALLOC_CFG_STATUS_SUCCESS);
-
-    Status status = future_res.get();
-    int res = push_alloc_cfg_complt.get();
-    ASSERT_TRUE( status.error_message() == Status::OK.error_message() );
+    Status status = CreateTrafficSchedulers_(traffic_scheds);
+    ASSERT_TRUE( status.error_message() != Status::OK.error_message() );
 }
 
-// Test 16 - CreateTrafficSchedulers-Upstream Success (AdditionalBW_None-Max BW < Guaranteed BW) case
-TEST_F(TestCreateTrafficSchedulers, AdditionalBW_NoneMaxBWLtGuaranteedBwSuccess) {
+// Test 16 - CreateTrafficSchedulers-Upstream Failure (AdditionalBW_None-Max BW < Guaranteed BW) case
+TEST_F(TestCreateTrafficSchedulers, AdditionalBW_NoneMaxBWLtGuaranteedBwFailure) {
     scheduler->set_direction(tech_profile::Direction::UPSTREAM);
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_None);
     traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
     traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
     traffic_shaping_info->set_cir(64000);
     traffic_shaping_info->set_pir(32000);
     traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
 
+    Status status = CreateTrafficSchedulers_(traffic_scheds);
+    ASSERT_TRUE( status.error_message() != Status::OK.error_message() );
+}
+
+// Test 17 - CreateTrafficSchedulers-Upstream Failure (Invalid AdditionalBW value) case
+TEST_F(TestCreateTrafficSchedulers, AdditionalBW_InvalidValueFailure) {
+    scheduler->set_direction(tech_profile::Direction::UPSTREAM);
+    scheduler->set_additional_bw(9);
+    traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
+    traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(0);
+    traffic_shaping_info->set_cir(64000);
+    traffic_shaping_info->set_pir(128000);
+    traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
+
+    Status status = CreateTrafficSchedulers_(traffic_scheds);
+    ASSERT_TRUE( status.error_message() != Status::OK.error_message() );
+}
+
+// Test 18 - CreateTrafficSchedulers-Upstream Success (AdditionalBW_None-Max BW = Fixed BW) case
+TEST_F(TestCreateTrafficSchedulers, AdditionalBW_NoneMaxBWEqFixedBwSuccess) {
+    scheduler->set_direction(tech_profile::Direction::UPSTREAM);
+    scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_None);
+    traffic_sched->set_direction(tech_profile::Direction::UPSTREAM);
+    traffic_sched->set_allocated_scheduler(scheduler);
+    traffic_shaping_info->set_gir(64000);
+    traffic_shaping_info->set_cir(0);
+    traffic_shaping_info->set_pir(64000);
+    traffic_sched->set_allocated_traffic_shaping_info(traffic_shaping_info);
+
     bcmos_errno olt_cfg_set_res = BCM_ERR_OK;
     ON_CALL(balMock, bcmolt_cfg_set(_, _)).WillByDefault(Return(olt_cfg_set_res));
 
@@ -2133,7 +2166,7 @@
     ASSERT_TRUE( status.error_message() == Status::OK.error_message() );
 }
 
-// Test 17 - CreateTrafficSchedulers-Downstream success case
+// Test 19 - CreateTrafficSchedulers-Downstream success case
 TEST_F(TestCreateTrafficSchedulers, CreateTrafficSchedulersDownstreamSuccess) {
     scheduler->set_direction(tech_profile::Direction::DOWNSTREAM);
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_BestEffort);
@@ -2150,7 +2183,7 @@
     ASSERT_TRUE( status.error_message() == Status::OK.error_message() );
 }
 
-// Test 18 - CreateTrafficSchedulers-Downstream Failure case
+// Test 20 - CreateTrafficSchedulers-Downstream Failure case
 TEST_F(TestCreateTrafficSchedulers, CreateTrafficSchedulersDownstreamFailure) {
     scheduler->set_direction(tech_profile::Direction::DOWNSTREAM);
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_BestEffort);
@@ -2167,7 +2200,7 @@
     ASSERT_TRUE( status.error_message() != Status::OK.error_message() );
 }
 
-// Test 19 - CreateTrafficSchedulers-Invalid direction Failure case
+// Test 21 - CreateTrafficSchedulers-Invalid direction Failure case
 TEST_F(TestCreateTrafficSchedulers, CreateTrafficSchedulersInvalidDirectionFailure) {
     scheduler->set_direction(tech_profile::Direction::BIDIRECTIONAL);
     scheduler->set_additional_bw(tech_profile::AdditionalBW::AdditionalBW_BestEffort);
