From 7d8658f5ef9fbdf2bd0d914aefa9a419c3838612 Mon Sep 17 00:00:00 2001 From: Nick Hedberg Date: Mon, 27 Jan 2025 17:38:03 +0100 Subject: [PATCH] Correct ULSCH minimum RB condition Assume the minimum grant (min_rb) size to be the bandwidth part size. As an example: rbStart 0, min_rb=bwpSize=106. This should pass, hence modify these two conditions. Co-authored-by: Robert Schmidt --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 258f3c8c76..c554dc7cea 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1968,7 +1968,7 @@ static void pf_ul(module_id_t module_id, const uint16_t slbitmap = SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols); while (rbStart < bwpSize && (rballoc_mask[rbStart + bwpStart] & slbitmap)) rbStart++; - if (rbStart + min_rb >= bwpSize) { + if (rbStart + min_rb > bwpSize) { LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not allocate continuous UL data: no resources (rbStart %d, min_rb %d, bwpSize %d)\n", UE->rnti, @@ -2121,7 +2121,7 @@ static void pf_ul(module_id_t module_id, while (rbStart + max_rbSize < bwpSize && !(rballoc_mask[rbStart + bwpStart + max_rbSize] & slbitmap)) max_rbSize++; - if (rbStart + min_rb >= bwpSize || max_rbSize < min_rb) { + if (rbStart + min_rb > bwpSize || max_rbSize < min_rb) { reset_beam_status(&nrmac->beam_info, frame, slot, iterator->UE->UE_beam_index, slots_per_frame, dci_beam.new_beam); reset_beam_status(&nrmac->beam_info, sched_frame, sched_slot, iterator->UE->UE_beam_index, slots_per_frame, beam.new_beam); LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not allocate UL data: no resources (rbStart %d, min_rb %d, bwpSize %d)\n",