Commit 934cc715 authored by Kuroiwa Kenichi's avatar Kuroiwa Kenichi Committed by shono.takafumi

Initialize scheduled_ul_bytes

(cherry picked from commit b0d6c5150db520bd7840d1604c3f82a0b59bc218)
parent 4cce7638
...@@ -2458,7 +2458,10 @@ void ulsch_scheduler_pre_ue_select_fairRR( ...@@ -2458,7 +2458,10 @@ void ulsch_scheduler_pre_ue_select_fairRR(
UE_sched_ctl = &UE_info->UE_sched_ctrl[UE_id]; UE_sched_ctl = &UE_info->UE_sched_ctrl[UE_id];
int bytes_to_schedule = UE_info->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_info->UE_template[CC_id][UE_id].scheduled_ul_bytes; int bytes_to_schedule = UE_info->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_info->UE_template[CC_id][UE_id].scheduled_ul_bytes;
if (bytes_to_schedule < 0) bytes_to_schedule = 0; if (bytes_to_schedule < 0) {
bytes_to_schedule = 0;
UE_list->UE_template[CC_id][UE_id].scheduled_ul_bytes = 0;
}
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti); rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
if ( (bytes_to_schedule > 0) || (UE_info->UE_template[CC_id][UE_id].ul_SR > 0) || if ( (bytes_to_schedule > 0) || (UE_info->UE_template[CC_id][UE_id].ul_SR > 0) ||
......
...@@ -553,6 +553,8 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -553,6 +553,8 @@ rx_sdu(const module_id_t enb_mod_idP,
UE_template_ptr->ul_buffer_info[LCGID1] + UE_template_ptr->ul_buffer_info[LCGID1] +
UE_template_ptr->ul_buffer_info[LCGID2] + UE_template_ptr->ul_buffer_info[LCGID2] +
UE_template_ptr->ul_buffer_info[LCGID3]; UE_template_ptr->ul_buffer_info[LCGID3];
UE_template_ptr->scheduled_ul_bytes = 0;
RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = (payload_ptr[0] & 0x3f); RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = (payload_ptr[0] & 0x3f);
if (UE_id == UE_info->list.head) { if (UE_id == UE_info->list.head) {
...@@ -598,6 +600,8 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -598,6 +600,8 @@ rx_sdu(const module_id_t enb_mod_idP,
UE_template_ptr->ul_buffer_info[LCGID1] + UE_template_ptr->ul_buffer_info[LCGID1] +
UE_template_ptr->ul_buffer_info[LCGID2] + UE_template_ptr->ul_buffer_info[LCGID2] +
UE_template_ptr->ul_buffer_info[LCGID3]; UE_template_ptr->ul_buffer_info[LCGID3];
UE_template_ptr->scheduled_ul_bytes = 0;
LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR. Size is LCGID0 = %u LCGID1 = %u LCGID2 = %u LCGID3 = %u\n", LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR. Size is LCGID0 = %u LCGID1 = %u LCGID2 = %u LCGID3 = %u\n",
enb_mod_idP, enb_mod_idP,
CC_idP, CC_idP,
...@@ -794,6 +798,9 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -794,6 +798,9 @@ rx_sdu(const module_id_t enb_mod_idP,
UE_template_ptr->ul_buffer_info[1] + UE_template_ptr->ul_buffer_info[1] +
UE_template_ptr->ul_buffer_info[2] + UE_template_ptr->ul_buffer_info[2] +
UE_template_ptr->ul_buffer_info[3]; UE_template_ptr->ul_buffer_info[3];
if (UE_template_ptr->estimated_ul_buffer == 0) {
UE_template_ptr->scheduled_ul_bytes = 0;
}
//UE_template_ptr->estimated_ul_buffer += UE_template_ptr->estimated_ul_buffer / 4; //UE_template_ptr->estimated_ul_buffer += UE_template_ptr->estimated_ul_buffer / 4;
} }
...@@ -859,6 +866,9 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -859,6 +866,9 @@ rx_sdu(const module_id_t enb_mod_idP,
UE_template_ptr->ul_buffer_info[1] + UE_template_ptr->ul_buffer_info[1] +
UE_template_ptr->ul_buffer_info[2] + UE_template_ptr->ul_buffer_info[2] +
UE_template_ptr->ul_buffer_info[3]; UE_template_ptr->ul_buffer_info[3];
if (UE_template_ptr->estimated_ul_buffer == 0) {
UE_template_ptr->scheduled_ul_bytes = 0;
}
} }
if ((rx_lengths[i] < SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0)) { // MAX SIZE OF transport block if ((rx_lengths[i] < SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0)) { // MAX SIZE OF transport block
......
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