From 92e272ce3ecaf6df26e22e87d84015d4f2aec0fc Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 30 Apr 2021 14:08:27 +0100 Subject: [PATCH] limit minimum UL grant size to accommodate both BSR and RLC headers --- srsenb/src/stack/mac/sched_ue_ctrl/sched_ue_cell.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/srsenb/src/stack/mac/sched_ue_ctrl/sched_ue_cell.cc b/srsenb/src/stack/mac/sched_ue_ctrl/sched_ue_cell.cc index f844aced3..c6876b008 100644 --- a/srsenb/src/stack/mac/sched_ue_ctrl/sched_ue_cell.cc +++ b/srsenb/src/stack/mac/sched_ue_ctrl/sched_ue_cell.cc @@ -439,7 +439,7 @@ int get_required_prb_dl(const sched_ue_cell& cell, uint32_t get_required_prb_ul(const sched_ue_cell& cell, uint32_t req_bytes) { - const static int MIN_ALLOC_BYTES = 10; + const static int MIN_ALLOC_BYTES = 10; /// There should be enough space for RLC header + BSR + some payload if (req_bytes == 0) { return 0; } @@ -458,9 +458,7 @@ uint32_t get_required_prb_ul(const sched_ue_cell& cell, uint32_t req_bytes) uint32_t final_tbs = std::get<3>(ret); while (final_tbs < MIN_ALLOC_BYTES and req_prbs < cell.cell_cfg->nof_prb()) { // Note: If PHR<0 is limiting the max nof PRBs per UL grant, the UL grant may become too small to fit any - // data other than headers + BSR. Besides, forcing unnecessary segmentation, it may additionally - // forbid the UE from fitting small RRC messages (e.g. RRCReconfComplete) in the UL grants. - // To avoid TBS<10, we force an increase the nof required PRBs. + // data other than headers + BSR. In this edge-case, force an increase the nof required PRBs. req_prbs++; final_tbs = compute_tbs_approx(req_prbs); }