X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_slice_based.c;h=0526401fb1460d512c7fafe954c73989e64f7a71;hb=49856df248fd976b4a9882ca4e650fc0bc3e4ee3;hp=656e66a96d5e27ec4fe4911dc4eac6ee4e429e08;hpb=12da8be0c4941e107b9ff0d18ce5b6eb7f5f7d20;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_slice_based.c b/src/5gnrsch/sch_slice_based.c index 656e66a96..0526401fb 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 @@ -905,7 +906,7 @@ uint8_t schSliceBasedScheduleUlLc(SlotTimingInfo dciTime, SlotTimingInfo puschTi uint16_t startPrb = 0; uint32_t totDataReq = 0; /* in bytes */ SchUeCb *ueCb; - SchPuschInfo *puschInfo; + SchPuschInfo *puschInfo = NULLP; DciInfo *dciInfo = NULLP; cell = (*hqP)->hqEnt->cell; @@ -934,16 +935,15 @@ uint8_t schSliceBasedScheduleUlLc(SlotTimingInfo dciTime, SlotTimingInfo puschTi /* Update PUSCH allocation */ if(schFillPuschAlloc(ueCb, puschTime, totDataReq, startSymb, symbLen, startPrb, isRetx, *hqP) == ROK) { - if(cell->schUlSlotInfo[puschTime.slot]->schPuschInfo) + if(cell->schUlSlotInfo[puschTime.slot]->schPuschInfo[ueCb->ueId - 1]) { - puschInfo = cell->schUlSlotInfo[puschTime.slot]->schPuschInfo; + puschInfo = cell->schUlSlotInfo[puschTime.slot]->schPuschInfo[ueCb->ueId - 1]; if(puschInfo != NULLP) { /* Fill DCI for UL grant */ schFillUlDci(ueCb, puschInfo, dciInfo, isRetx, *hqP); ueCb->srRcvd = false; ueCb->bsrRcvd = false; - cell->schUlSlotInfo[puschTime.slot]->puschUe = ueCb->ueId; if(schSpcHqProcCb->lcCb.dedLcList.count != 0) updateBsrAndLcList(&(schSpcHqProcCb->lcCb.dedLcList), ueCb->bsrInfo, ROK); updateBsrAndLcList(&(schSpcHqProcCb->lcCb.defLcList), ueCb->bsrInfo, ROK); @@ -975,12 +975,13 @@ 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; @@ -1054,7 +1055,7 @@ uint32_t schSliceBasedScheduleDlLc(SlotTimingInfo pdcchTime, SlotTimingInfo pdsc } /*[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*/ @@ -1070,7 +1071,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*/ @@ -1264,7 +1265,7 @@ void schSliceBasedScheduleSlot(SchCellCb *cell, SlotTimingInfo *slotInd, Inst sc else { #ifdef NR_DRX - schHdlDrxInActvStrtTmr(cell, &cell->ueCb[ueId-1], PHY_DELTA_DL + SCHED_DELTA); + schHdlDrxInActvStrtTmr(cell, &cell->ueCb[ueId-1], gConfigInfo.gPhyDeltaDl + SCHED_DELTA); #endif } } @@ -1299,7 +1300,7 @@ void schSliceBasedScheduleSlot(SchCellCb *cell, SlotTimingInfo *slotInd, Inst sc else { #ifdef NR_DRX - schHdlDrxInActvStrtTmr(cell, &cell->ueCb[ueId-1], PHY_DELTA_UL + SCHED_DELTA); + schHdlDrxInActvStrtTmr(cell, &cell->ueCb[ueId-1], gConfigInfo.gPhyDeltaUl + SCHED_DELTA); #endif } }