Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "[Epic-ID: ODUHIGH-461][Task-ID: ODUHIGH-468]Unused files and functions removed...
[o-du/l2.git]
/
src
/
5gnrsch
/
sch_common.c
diff --git
a/src/5gnrsch/sch_common.c
b/src/5gnrsch/sch_common.c
index
a16cda5
..
c8a6cca
100644
(file)
--- a/
src/5gnrsch/sch_common.c
+++ b/
src/5gnrsch/sch_common.c
@@
-413,15
+413,26
@@
uint16_t fillPucchResourceInfo(SchPucchInfo *schPucchInfo, Inst inst, SlotTiming
SchCellCb *cell = schCb[inst].cells[inst];
SchPucchCfgCmn *pucchCfg = NULLP;
SchBwpParams *ulBwp = NULLP;
SchCellCb *cell = schCb[inst].cells[inst];
SchPucchCfgCmn *pucchCfg = NULLP;
SchBwpParams *ulBwp = NULLP;
+#ifdef NR_DRX
+ SchUeCb *ueCb = NULLP;
+#endif
uint16_t startPrb;
GET_UE_ID(schPucchInfo->rnti, ueId);
ueIdx = ueId -1;
uint16_t startPrb;
GET_UE_ID(schPucchInfo->rnti, ueId);
ueIdx = ueId -1;
- if(cell->ueCb[ueIdx].ueCfg.spCellCfg.servCellCfg.initUlBwp.pucchCfgPres)
+#ifdef NR_DRX
+ ueCb = schGetUeCb(cell, schPucchInfo->rnti);
+ if(ueCb->ueDrxInfoPres)
+ {
+ if(!ueCb->drxUeCb.drxUlUeActiveStatus)
+ return RFAILED;
+ }
+#endif
+ if(cell->ueCb[ueIdx].ueCfg.spCellCfg.servCellRecfg.initUlBwp.pucchCfgPres)
{
/* fill pucch dedicated cfg */
ret = fillUlSchedPucchDedicatedCfg(cell,\
{
/* fill pucch dedicated cfg */
ret = fillUlSchedPucchDedicatedCfg(cell,\
- &cell->ueCb[ueIdx].ueCfg.spCellCfg.servCell
C
fg.initUlBwp.pucchCfg, &slotInfo, schPucchInfo);
+ &cell->ueCb[ueIdx].ueCfg.spCellCfg.servCell
Rec
fg.initUlBwp.pucchCfg, &slotInfo, schPucchInfo);
if(ret == RFAILED)
{
memset(schPucchInfo, 0, sizeof(SchPucchInfo));
if(ret == RFAILED)
{
memset(schPucchInfo, 0, sizeof(SchPucchInfo));
@@
-470,13
+481,16
@@
uint16_t fillPucchResourceInfo(SchPucchInfo *schPucchInfo, Inst inst, SlotTiming
uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst)
{
int ret = ROK;
uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst)
{
int ret = ROK;
+#ifdef NR_DRX
+ SchUeCb *ueCb;
+#endif
UlSchedInfo ulSchedInfo;
SchUlSlotInfo *schUlSlotInfo = NULLP;
SlotTimingInfo ulTimingInfo;
memset(&ulSchedInfo, 0, sizeof(UlSchedInfo));
/* add PHY delta */
UlSchedInfo ulSchedInfo;
SchUlSlotInfo *schUlSlotInfo = NULLP;
SlotTimingInfo ulTimingInfo;
memset(&ulSchedInfo, 0, sizeof(UlSchedInfo));
/* add PHY delta */
- ADD_DELTA_TO_TIME(cell->slotInfo,ulTimingInfo,PHY_DELTA_UL+SCHED_DELTA);
+ ADD_DELTA_TO_TIME(cell->slotInfo,ulTimingInfo,PHY_DELTA_UL+SCHED_DELTA
, cell->numSlots
);
ulSchedInfo.cellId = cell->cellId;
ulSchedInfo.slotIndInfo.cellId = ulSchedInfo.cellId;
ulSchedInfo.cellId = cell->cellId;
ulSchedInfo.slotIndInfo.cellId = ulSchedInfo.cellId;
@@
-491,6
+505,15
@@
uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst)
if(schUlSlotInfo->schPuschInfo)
{
ulSchedInfo.crnti = schUlSlotInfo->schPuschInfo->crnti;
if(schUlSlotInfo->schPuschInfo)
{
ulSchedInfo.crnti = schUlSlotInfo->schPuschInfo->crnti;
+ /* Check the ue drx status if the UE is active for uplink scheduling or not */
+#ifdef NR_DRX
+ ueCb = schGetUeCb(cell, ulSchedInfo.crnti);
+ if(ueCb->ueDrxInfoPres)
+ {
+ if(!ueCb->drxUeCb.drxUlUeActiveStatus)
+ return RFAILED;
+ }
+#endif
ulSchedInfo.dataType |= SCH_DATATYPE_PUSCH;
memcpy(&ulSchedInfo.schPuschInfo, schUlSlotInfo->schPuschInfo,
sizeof(SchPuschInfo));
ulSchedInfo.dataType |= SCH_DATATYPE_PUSCH;
memcpy(&ulSchedInfo.schPuschInfo, schUlSlotInfo->schPuschInfo,
sizeof(SchPuschInfo));
@@
-507,6
+530,10
@@
uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst)
memcpy(&ulSchedInfo.schPucchInfo, &schUlSlotInfo->schPucchInfo,
sizeof(SchPucchInfo));
}
memcpy(&ulSchedInfo.schPucchInfo, &schUlSlotInfo->schPucchInfo,
sizeof(SchPucchInfo));
}
+ else
+ {
+ return RFAILED;
+ }
memset(&schUlSlotInfo->schPucchInfo, 0, sizeof(SchPucchInfo));
}
memset(&schUlSlotInfo->schPucchInfo, 0, sizeof(SchPucchInfo));
}
@@
-744,7
+771,7
@@
uint16_t schAllocPucchResource(SchCellCb *cell, SlotTimingInfo pucchTime, uint16
/* set HARQ flag to true */
schUlSlotInfo->schPucchInfo.harqFlag = true;
schUlSlotInfo->schPucchInfo.numHarqBits = 1; /* 1 bit for HARQ */
/* set HARQ flag to true */
schUlSlotInfo->schPucchInfo.harqFlag = true;
schUlSlotInfo->schPucchInfo.numHarqBits = 1; /* 1 bit for HARQ */
- ADD_DELTA_TO_TIME(pucchTime, pucchTime, 3); /* SLOT_DELAY=3 */
+ ADD_DELTA_TO_TIME(pucchTime, pucchTime, 3
, cell->numSlots
); /* SLOT_DELAY=3 */
cmLListAdd2Tail(&(ueCb->hqDlmap[pucchTime.slot]->hqList), &hqP->ulSlotLnk);
}
return ROK;
cmLListAdd2Tail(&(ueCb->hqDlmap[pucchTime.slot]->hqList), &hqP->ulSlotLnk);
}
return ROK;
@@
-789,8
+816,8
@@
uint8_t schDlRsrcAllocDlMsg(SchCellCb *cell, SlotTimingInfo slotTime, uint16_t c
GET_UE_ID(crnti, ueId);
ueCb = cell->ueCb[ueId-1];
GET_UE_ID(crnti, ueId);
ueCb = cell->ueCb[ueId-1];
- coreset1 = ueCb.ueCfg.spCellCfg.servCell
C
fg.initDlBwp.pdcchCfg.cRSetToAddModList[0];
- pdschCfg = ueCb.ueCfg.spCellCfg.servCell
C
fg.initDlBwp.pdschCfg;
+ coreset1 = ueCb.ueCfg.spCellCfg.servCell
Rec
fg.initDlBwp.pdcchCfg.cRSetToAddModList[0];
+ pdschCfg = ueCb.ueCfg.spCellCfg.servCell
Rec
fg.initDlBwp.pdschCfg;
/* fill BWP */
bwp->freqAlloc.numPrb = MAX_NUM_RB;
/* fill BWP */
bwp->freqAlloc.numPrb = MAX_NUM_RB;
@@
-1972,7
+1999,8
@@
uint8_t schCalculateUlTbs(SchUeCb *ueCb, SlotTimingInfo puschTime, uint8_t symbL
*******************************************************************/
bool schProcessSrOrBsrReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, bool isRetx, SchUlHqProcCb **hqP)
{
*******************************************************************/
bool schProcessSrOrBsrReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, bool isRetx, SchUlHqProcCb **hqP)
{
- bool k2Found = FALSE, ret = RFAILED;
+ bool k2Found = FALSE;
+ uint8_t ret = RFAILED;
uint8_t startSymb = 0, symbLen = 0;
uint8_t k2TblIdx = 0, k2Index = 0, k2Val = 0;
uint16_t startPrb = 0;
uint8_t startSymb = 0, symbLen = 0;
uint8_t k2TblIdx = 0, k2Index = 0, k2Val = 0;
uint16_t startPrb = 0;
@@
-2006,13
+2034,13
@@
bool schProcessSrOrBsrReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId
}
/* Calculating time frame to send DCI for SR */
}
/* Calculating time frame to send DCI for SR */
- ADD_DELTA_TO_TIME(currTime, dciTime, PHY_DELTA_DL + SCHED_DELTA);
+ ADD_DELTA_TO_TIME(currTime, dciTime, PHY_DELTA_DL + SCHED_DELTA
, cell->numSlots
);
#ifdef NR_TDD
if(schGetSlotSymbFrmt(dciTime.slot, cell->slotFrmtBitMap) == DL_SLOT)
#endif
{
#ifdef NR_TDD
if(schGetSlotSymbFrmt(dciTime.slot, cell->slotFrmtBitMap) == DL_SLOT)
#endif
{
- if(ueCb->ueCfg.spCellCfg.servCell
C
fg.initUlBwp.k2TblPrsnt)
- k2InfoTbl = &ueCb->ueCfg.spCellCfg.servCell
C
fg.initUlBwp.k2InfoTbl;
+ if(ueCb->ueCfg.spCellCfg.servCell
Rec
fg.initUlBwp.k2TblPrsnt)
+ k2InfoTbl = &ueCb->ueCfg.spCellCfg.servCell
Rec
fg.initUlBwp.k2InfoTbl;
else
k2InfoTbl = &cell->cellCfg.schInitialUlBwp.k2InfoTbl;
else
k2InfoTbl = &cell->cellCfg.schInitialUlBwp.k2InfoTbl;
@@
-2020,7
+2048,7
@@
bool schProcessSrOrBsrReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId
{
k2Index = k2InfoTbl->k2TimingInfo[dciTime.slot].k2Indexes[k2TblIdx];
{
k2Index = k2InfoTbl->k2TimingInfo[dciTime.slot].k2Indexes[k2TblIdx];
- if(!ueCb->ueCfg.spCellCfg.servCell
C
fg.initUlBwp.k2TblPrsnt)
+ if(!ueCb->ueCfg.spCellCfg.servCell
Rec
fg.initUlBwp.k2TblPrsnt)
{
k2Val = cell->cellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[k2Index].k2;
startSymb = cell->cellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[k2Index].startSymbol;
{
k2Val = cell->cellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[k2Index].k2;
startSymb = cell->cellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[k2Index].startSymbol;
@@
-2028,13
+2056,13
@@
bool schProcessSrOrBsrReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId
}
else
{
}
else
{
- k2Val = ueCb->ueCfg.spCellCfg.servCell
C
fg.initUlBwp.puschCfg.timeDomRsrcAllocList[k2Index].k2;
- startSymb = ueCb->ueCfg.spCellCfg.servCell
C
fg.initUlBwp.puschCfg.timeDomRsrcAllocList[k2Index].startSymbol;
- symbLen = ueCb->ueCfg.spCellCfg.servCell
C
fg.initUlBwp.puschCfg.timeDomRsrcAllocList[k2Index].symbolLength;
+ k2Val = ueCb->ueCfg.spCellCfg.servCell
Rec
fg.initUlBwp.puschCfg.timeDomRsrcAllocList[k2Index].k2;
+ startSymb = ueCb->ueCfg.spCellCfg.servCell
Rec
fg.initUlBwp.puschCfg.timeDomRsrcAllocList[k2Index].startSymbol;
+ symbLen = ueCb->ueCfg.spCellCfg.servCell
Rec
fg.initUlBwp.puschCfg.timeDomRsrcAllocList[k2Index].symbolLength;
}
/* Check for number of Symbol of PUSCH should be same as original in case of transmisson*/
/* Calculating time frame to send PUSCH for SR */
}
/* Check for number of Symbol of PUSCH should be same as original in case of transmisson*/
/* Calculating time frame to send PUSCH for SR */
- ADD_DELTA_TO_TIME(dciTime, puschTime, k2Val);
+ ADD_DELTA_TO_TIME(dciTime, puschTime, k2Val
, cell->numSlots
);
#ifdef NR_TDD
if(schGetSlotSymbFrmt(puschTime.slot, cell->slotFrmtBitMap) == DL_SLOT)
continue;
#ifdef NR_TDD
if(schGetSlotSymbFrmt(puschTime.slot, cell->slotFrmtBitMap) == DL_SLOT)
continue;
@@
-2044,14
+2072,18
@@
bool schProcessSrOrBsrReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId
continue;
}
k2Found = true;
continue;
}
k2Found = true;
+ if(hqP)
+ {
+ ADD_DELTA_TO_TIME(puschTime, (*hqP)->puschTime, 0, cell->numSlots);
+ }
break;
}
}
break;
}
}
-
+
if(k2Found == true)
{
ret = schCalculateUlTbs(ueCb, puschTime, symbLen, &startPrb, &totDataReq, isRetx, *hqP);
if(k2Found == true)
{
ret = schCalculateUlTbs(ueCb, puschTime, symbLen, &startPrb, &totDataReq, isRetx, *hqP);
-
+
if(totDataReq > 0 && ret == ROK)
{
SCH_ALLOC(dciInfo, sizeof(DciInfo));
if(totDataReq > 0 && ret == ROK)
{
SCH_ALLOC(dciInfo, sizeof(DciInfo));
@@
-2097,7
+2129,12
@@
bool schProcessSrOrBsrReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId
updateBsrAndLcList(&((*hqP)->ulLcPrbEst.defLcList), ueCb->bsrInfo, RFAILED);
}
}
updateBsrAndLcList(&((*hqP)->ulLcPrbEst.defLcList), ueCb->bsrInfo, RFAILED);
}
}
- return (ret);
+ else
+ {
+ DU_LOG("\nERROR --> SCH : schProcessSrOrBsrReq(): K2 value is not found");
+ return false;
+ }
+ return true;
}
}