Commit 34acf720 authored by masayuki.harada's avatar masayuki.harada Committed by Haruki NAOI

Fix scheduled_ul_bytes size remain when no crc report has come from L1.

(cherry picked from commit ce10221c2761fb3058ccb77b73ba87f97d5e2cd2)
parent 45340318
...@@ -3969,6 +3969,17 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -3969,6 +3969,17 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
UE_template->mcs_UL[harq_pid]=10;//cmin (10, openair_daq_vars.target_ue_ul_mcs); UE_template->mcs_UL[harq_pid]=10;//cmin (10, openair_daq_vars.target_ue_ul_mcs);
rb_table_index=5; // for PHR rb_table_index=5; // for PHR
} }
if( (UE_sched_ctrl->ul_scheduled | (1<<harq_pid))>0 ){
UE_template->scheduled_ul_bytes -= UE_template->TBS_UL[harq_pid];
if (UE_template->scheduled_ul_bytes < 0) {
UE_template->scheduled_ul_bytes = 0;
}
UE_template->estimated_ul_buffer -= UE_template->TBS_UL[harq_pid];
if (UE_template->estimated_ul_buffer < 0) {
UE_template->estimated_ul_buffer = 0;
}
}
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2=UE_template->mcs_UL[harq_pid]; UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2=UE_template->mcs_UL[harq_pid];
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid],rb_table[rb_table_index]); UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid],rb_table[rb_table_index]);
......
...@@ -207,6 +207,10 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -207,6 +207,10 @@ rx_sdu(const module_id_t enb_mod_idP,
if (UE_template_ptr->scheduled_ul_bytes < 0) { if (UE_template_ptr->scheduled_ul_bytes < 0) {
UE_template_ptr->scheduled_ul_bytes = 0; UE_template_ptr->scheduled_ul_bytes = 0;
} }
UE_template_ptr->estimated_ul_buffer -= UE_template_ptr->TBS_UL[harq_pid];
if (UE_template_ptr->estimated_ul_buffer < 0) {
UE_template_ptr->estimated_ul_buffer = 0;
}
} else { // sduP == NULL => error } else { // sduP == NULL => error
UE_scheduling_control->pusch_rx_error_num[CC_idP]++; UE_scheduling_control->pusch_rx_error_num[CC_idP]++;
LOG_W(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d ULSCH in error in round %d, ul_cqi %d, UE_id %d, RNTI %x\n", LOG_W(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d ULSCH in error in round %d, ul_cqi %d, UE_id %d, RNTI %x\n",
...@@ -239,6 +243,10 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -239,6 +243,10 @@ rx_sdu(const module_id_t enb_mod_idP,
if (UE_template_ptr->scheduled_ul_bytes < 0) { if (UE_template_ptr->scheduled_ul_bytes < 0) {
UE_template_ptr->scheduled_ul_bytes = 0; UE_template_ptr->scheduled_ul_bytes = 0;
} }
UE_template_ptr->estimated_ul_buffer -= UE_template_ptr->TBS_UL[harq_pid];
if (UE_template_ptr->estimated_ul_buffer < 0) {
UE_template_ptr->estimated_ul_buffer = 0;
}
if (find_RA_id(enb_mod_idP, CC_idP, current_rnti) != -1) { if (find_RA_id(enb_mod_idP, CC_idP, current_rnti) != -1) {
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
......
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