Merge remote-tracking branch 'origin/fix-int-type-ulsch-id' into integration_2025_w12 (!3328)
Fix ULSCH ID type to handle large max_nb_pusch values (ULSCH procedures) The ULSCH_id variable is currently defined as uint8_t, which limits its range to 0-255. However, gNB->max_nb_pusch can exceed this range depending on the configuration (buffer_ul_slots and MAX_MOBILES_PER_GNB). This can lead to incorrect behavior or undefined results when max_nb_pusch is larger than 255. This commit changes the type of ULSCH_id from uint8_t to int to accommodate larger values of max_nb_pusch. The issue was observed when running the OAI gNB with MAX_MOBILES_PER_GNB set to 64 UEs. The root cause was traced back to the changes to UL processing introduced in !2952.
This commit is contained in:
@@ -316,7 +316,7 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, boo
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
|
||||
int nb_pusch = 0;
|
||||
for (uint8_t ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) {
|
||||
for (int ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) {
|
||||
if (ulsch_to_decode[ULSCH_id]) {
|
||||
nb_pusch++;
|
||||
}
|
||||
@@ -329,7 +329,7 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, boo
|
||||
uint8_t ULSCH_ids[nb_pusch];
|
||||
uint32_t G[nb_pusch];
|
||||
int pusch_id = 0;
|
||||
for (uint8_t ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) {
|
||||
for (int ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) {
|
||||
|
||||
if (ulsch_to_decode[ULSCH_id]) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user