X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_fcfs.c;h=28cc528a30992f71dd749cb8eec04cd4ca4c35b6;hb=refs%2Fchanges%2F98%2F12298%2F1;hp=09e2c64b111e13cedf8f2a8d8e5a1036e65961aa;hpb=f73456bd55152c329601f8286ae67fe9875025bc;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_fcfs.c b/src/5gnrsch/sch_fcfs.c index 09e2c64b1..28cc528a3 100644 --- a/src/5gnrsch/sch_fcfs.c +++ b/src/5gnrsch/sch_fcfs.c @@ -1158,12 +1158,13 @@ void schFcfsScheduleSlot(SchCellCb *cell, SlotTimingInfo *slotInd, Inst schInst) bool isMsg4Pending = false, isMsg4Scheduled = false; bool isDlMsgPending = false, isDlMsgScheduled = false; bool isUlGrantPending = false, isUlGrantScheduled = false; + bool isNodeFreed = false; fcfsCell = (SchFcfsCellCb *)cell->schSpcCell; /* Select first UE in the linked list to be scheduled next */ pendingUeNode = fcfsCell->ueToBeScheduled.first; - if(pendingUeNode) + while(pendingUeNode) { if(pendingUeNode->node) { @@ -1215,6 +1216,7 @@ void schFcfsScheduleSlot(SchCellCb *cell, SlotTimingInfo *slotInd, Inst schInst) if(isRarScheduled || isMsg4Scheduled) { schFcfsRemoveUeFrmScheduleLst(cell, pendingUeNode); + isNodeFreed = true; } /* If RAR/MSG4 is pending but couldnt be scheduled then, * put this UE at the end of linked list to be scheduled later */ @@ -1319,9 +1321,23 @@ void schFcfsScheduleSlot(SchCellCb *cell, SlotTimingInfo *slotInd, Inst schInst) else { schFcfsRemoveUeFrmScheduleLst(cell, pendingUeNode); + isNodeFreed = true; } } } + if(cell->schDlSlotInfo[slotInd->slot]->prbAlloc.numPrbAlloc >= MAX_NUM_RB) + { + DU_LOG("\nINFO --> SCH: No PRB available to proceed with next UE"); + return; + } + if(isNodeFreed == false) + { + pendingUeNode= pendingUeNode->next; + } + else + { + pendingUeNode = fcfsCell->ueToBeScheduled.first; + } } }