X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_slice_based.c;h=ece81a09b9a1a6f89bb73f4631ee2f31e223ed46;hb=f73456bd55152c329601f8286ae67fe9875025bc;hp=2ed18e276363ef06fa254326d144c08ce93d57fd;hpb=b8b1f60bdc23cfcbb6e78e046439ec9676f9c6e1;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_slice_based.c b/src/5gnrsch/sch_slice_based.c index 2ed18e276..ece81a09b 100644 --- a/src/5gnrsch/sch_slice_based.c +++ b/src/5gnrsch/sch_slice_based.c @@ -40,6 +40,7 @@ File: sch_slice_based.c #include "du_app_mac_inf.h" #include "mac_sch_interface.h" #include "sch.h" +#include "sch_tmr.h" #include "sch_utils.h" #include "sch_slice_based.h" #ifdef NR_DRX @@ -941,7 +942,6 @@ uint8_t schSliceBasedScheduleUlLc(SlotTimingInfo dciTime, SlotTimingInfo puschTi { /* Fill DCI for UL grant */ schFillUlDci(ueCb, puschInfo, dciInfo, isRetx, *hqP); - memcpy(&dciInfo->slotIndInfo, &dciTime, sizeof(SlotTimingInfo)); ueCb->srRcvd = false; ueCb->bsrRcvd = false; cell->schUlSlotInfo[puschTime.slot]->puschUe = ueCb->ueId; @@ -976,17 +976,18 @@ uint8_t schSliceBasedScheduleUlLc(SlotTimingInfo dciTime, SlotTimingInfo puschTi * RFAILED * * ****************************************************************/ -uint32_t schSliceBasedScheduleDlLc(SlotTimingInfo pdcchTime, SlotTimingInfo pdschTime, uint8_t pdschNumSymbols, bool isRetx, SchDlHqProcCb **hqP) +uint32_t schSliceBasedScheduleDlLc(SlotTimingInfo pdcchTime, SlotTimingInfo pdschTime, uint8_t pdschNumSymbols,\ + uint16_t *startPrb, bool isRetx, SchDlHqProcCb **hqP) { SchSliceBasedHqProcCb *schSpcHqProcCb; SchUeCb *ueCb; uint8_t lcIdx = 0; - uint16_t startPrb = 0, maxFreePRB = 0; + uint16_t maxFreePRB = 0; uint16_t mcsIdx = 0; uint32_t accumalatedSize = 0; CmLListCp *lcLL = NULLP; uint16_t rsvdDedicatedPRB = 0; - DlMsgAlloc *dciSlotAlloc; + DlMsgSchInfo *dciSlotAlloc; /* TX_PAYLOAD_HDR_LEN: Overhead which is to be Added once for any UE while estimating Accumulated TB Size * Following flag added to keep the record whether TX_PAYLOAD_HDR_LEN is added to the first Node getting allocated. @@ -1002,7 +1003,7 @@ uint32_t schSliceBasedScheduleDlLc(SlotTimingInfo pdcchTime, SlotTimingInfo pdsc { /*Re-Initalization per UE*/ /* scheduled LC data fill */ - dciSlotAlloc->dlMsgSchedInfo[dciSlotAlloc->numSchedInfo].numLc = 0; + dciSlotAlloc->transportBlock[0].numLc = 0; isTxPayloadLenAdded = FALSE; /*Re-initlaize the flag for every UE*/ accumalatedSize = 0; @@ -1028,17 +1029,14 @@ uint32_t schSliceBasedScheduleDlLc(SlotTimingInfo pdcchTime, SlotTimingInfo pdsc { DU_LOG("\nERROR --> SCH : Updation in LC List Failed"); /* Free the dl ded msg info allocated in macSchDlRlcBoInfo */ - if(dciSlotAlloc->numSchedInfo == 0) + if(!dciSlotAlloc->dlMsgPdschCfg) { - SCH_FREE(dciSlotAlloc, sizeof(DlMsgAlloc)); + SCH_FREE(dciSlotAlloc, sizeof(DlMsgSchInfo)); (*hqP)->hqEnt->cell->schDlSlotInfo[pdcchTime.slot]->dlMsgAlloc[ueCb->ueId -1] = NULL; } - else - memset(&dciSlotAlloc->dlMsgSchedInfo[dciSlotAlloc->numSchedInfo], 0, sizeof(DlMsgSchInfo)); - return false; + return accumalatedSize; } } - ueCb->dlInfo.dlLcCtxt[lcIdx].bo = 0; }//End of for loop if ((schSpcHqProcCb->lcCb.defLcList.count == 0) && (schSpcHqProcCb->lcCb.dedLcList.count == 0)) @@ -1047,21 +1045,18 @@ uint32_t schSliceBasedScheduleDlLc(SlotTimingInfo pdcchTime, SlotTimingInfo pdsc UNSET_ONE_BIT((*hqP)->hqEnt->ue->ueId, (*hqP)->hqEnt->cell->boIndBitMap); /* Free the dl ded msg info allocated in macSchDlRlcBoInfo */ - if(dciSlotAlloc->numSchedInfo == 0) + if(!dciSlotAlloc->dlMsgPdschCfg) { - SCH_FREE(dciSlotAlloc, sizeof(DlMsgAlloc)); + SCH_FREE(dciSlotAlloc, sizeof(DlMsgSchInfo)); (*hqP)->hqEnt->cell->schDlSlotInfo[pdcchTime.slot]->dlMsgAlloc[ueCb->ueId -1] = NULL; } - else - memset(&dciSlotAlloc->dlMsgSchedInfo[dciSlotAlloc->numSchedInfo], 0, sizeof(DlMsgSchInfo)); - /*TRUE because this UE has nothing to be scheduled*/ - return true; + return accumalatedSize; } } /*[Step3]: Calculate Best FREE BLOCK with MAX PRB count*/ - maxFreePRB = searchLargestFreeBlock((*hqP)->hqEnt->cell, pdschTime, &startPrb, DIR_DL); + maxFreePRB = searchLargestFreeBlock((*hqP)->hqEnt->cell, pdschTime, startPrb, DIR_DL); /*[Step4]: Estimation of PRB and BO which can be allocated to each LC in * the list based on RRM policy*/ @@ -1077,7 +1072,7 @@ uint32_t schSliceBasedScheduleDlLc(SlotTimingInfo pdcchTime, SlotTimingInfo pdsc if((schSpcHqProcCb->lcCb.dedLcList.count == NULLP) || ((maxFreePRB < rsvdDedicatedPRB))) { schSpcHqProcCb->lcCb.sharedNumPrb = maxFreePRB; - DU_LOG("\nDEBUG --> SCH : DL Only Default Slice is scheduled, sharedPRB Count:%d",\ + DU_LOG("\nDEBUG --> SCH : DL Only Default Slice is scheduled, sharedPRB Count:%d",\ schSpcHqProcCb->lcCb.sharedNumPrb); /*PRB Alloc for Default LCs*/