improve tracking of sched_ul_bytes in nr_rx_sdu() by using sdu_lenP instead of sched_pusch.tb_size
sched_ul_bytes tracks the volume of in-flight data. When data is successfully received, sched_ul_bytes is decreased in nr_rx_sdu(). In case of reusing HARQ processes, the tb_size stored there is not correct. Therefore use the actual SDU size instead.
This commit is contained in:
@@ -749,8 +749,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
|
||||
LOG_D(NR_MAC, "Received PDU at MAC gNB \n");
|
||||
|
||||
UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt = 0;
|
||||
const uint32_t tb_size = UE_scheduling_control->ul_harq_processes[harq_pid].sched_pusch.tb_size;
|
||||
UE_scheduling_control->sched_ul_bytes -= tb_size;
|
||||
UE_scheduling_control->sched_ul_bytes -= sdu_lenP;
|
||||
if (UE_scheduling_control->sched_ul_bytes < 0)
|
||||
UE_scheduling_control->sched_ul_bytes = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user