X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_fcfs.c;h=28cc528a30992f71dd749cb8eec04cd4ca4c35b6;hb=73da3ffdd36c5ade0c1cccbe7d2ad4d457897b2f;hp=09e2c64b111e13cedf8f2a8d8e5a1036e65961aa;hpb=65780c0e397afca1bc67923de1a19a420a0e86f3;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; + } } }