Commit 5043ca35 authored by francescomani's avatar francescomani

improvements in handling bucketSize at MAC UE

parent 4f3fcbfe
...@@ -669,29 +669,29 @@ void nr_release_mac_config_logicalChannelBearer(NR_UE_MAC_INST_t *mac, long chan ...@@ -669,29 +669,29 @@ void nr_release_mac_config_logicalChannelBearer(NR_UE_MAC_INST_t *mac, long chan
} }
} }
static uint16_t nr_get_ms_bucketsizeduration(uint8_t bucketsizeduration) static int nr_get_ms_bucketsizeduration(long bucketsizeduration)
{ {
switch (bucketsizeduration) { switch (bucketsizeduration) {
case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms5:
return 5;
case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms10:
return 10;
case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms20:
return 20;
case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50: case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50:
return 50; return 50;
case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms100: case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms100:
return 100; return 100;
case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms150: case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms150:
return 150; return 150;
case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms300: case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms300:
return 300; return 300;
case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms500: case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms500:
return 500; return 500;
case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms1000: case NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms1000:
return 1000; return 1000;
default: default:
return 0; AssertFatal(false, "Invalid bucketSizeDuration %ld\n", bucketsizeduration);
} }
} }
......
...@@ -1087,8 +1087,9 @@ void nr_ue_ul_scheduler(nr_uplink_indication_t *ul_info) ...@@ -1087,8 +1087,9 @@ void nr_ue_ul_scheduler(nr_uplink_indication_t *ul_info)
int lcid = lc_bearer->lcids_ordered; int lcid = lc_bearer->lcids_ordered;
NR_LogicalChannelConfig_t *lcconfig = mac->logicalChannelConfig[lcid - 1]; NR_LogicalChannelConfig_t *lcconfig = mac->logicalChannelConfig[lcid - 1];
NR_LC_SCHEDULING_INFO *sched_lc = &mac->scheduling_info.lc_sched_info[lcid - 1]; NR_LC_SCHEDULING_INFO *sched_lc = &mac->scheduling_info.lc_sched_info[lcid - 1];
int32_t bucketSize_max = // max amount of data that can be buffered/accumulated in a logical channel buffer
sched_lc->bucket_size; // max amount of data that can be buffered/accumulated in a logical channel buffer int32_t bucketSize_max = sched_lc->bucket_size;
AssertFatal(bucketSize_max >= 0, "negative bucketSize_max %d, will never schedule UE: lcid %d\n",bucketSize_max, lcid);
/* /*
measure Bj measure Bj
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment