From b15eefb05f543e58615df2e5ec48190d274eebba Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Tue, 2 Aug 2022 18:25:00 +0200 Subject: [PATCH] srsenb,nr: fix calculation of allocated bytes on pending UL HARQ preventing UL rate to achieve maximum. --- srsgnb/src/stack/mac/sched_nr_ue.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srsgnb/src/stack/mac/sched_nr_ue.cc b/srsgnb/src/stack/mac/sched_nr_ue.cc index ef205bb552..c14be2a1fa 100644 --- a/srsgnb/src/stack/mac/sched_nr_ue.cc +++ b/srsgnb/src/stack/mac/sched_nr_ue.cc @@ -228,7 +228,7 @@ void ue::new_slot(slot_point pdcch_slot) // Discount UL HARQ pending bytes to BSR for (uint32_t pid = 0; pid < cc->harq_ent.nof_ul_harqs(); ++pid) { if (not cc->harq_ent.ul_harq(pid).empty()) { - common_ctxt.pending_ul_bytes -= std::min(cc->harq_ent.ul_harq(pid).tbs(), common_ctxt.pending_ul_bytes); + common_ctxt.pending_ul_bytes -= std::min(cc->harq_ent.ul_harq(pid).tbs() / 8, common_ctxt.pending_ul_bytes); if (last_sr_slot.valid() and cc->harq_ent.ul_harq(pid).harq_slot_tx() > last_sr_slot) { last_sr_slot.clear(); }