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 "O1 IP PORT configuration for CM .[Issue-Id: ODUHIGH-196]"
[o-du/l2.git]
/
src
/
5gnrsch
/
sch_ue_mgr.c
diff --git
a/src/5gnrsch/sch_ue_mgr.c
b/src/5gnrsch/sch_ue_mgr.c
index
bb76ede
..
22f16a7
100644
(file)
--- a/
src/5gnrsch/sch_ue_mgr.c
+++ b/
src/5gnrsch/sch_ue_mgr.c
@@
-69,12
+69,12
@@
void SchSendUeCfgRspToMac(uint16_t event, SchUeCfg *ueCfg, Inst inst,\
if(event == EVENT_ADD_UE_CONFIG_REQ_TO_SCH)
{
rspPst.event = EVENT_UE_CONFIG_RSP_TO_MAC;
if(event == EVENT_ADD_UE_CONFIG_REQ_TO_SCH)
{
rspPst.event = EVENT_UE_CONFIG_RSP_TO_MAC;
- DU_LOG("\n
SCH:
Sending UE Config response to MAC");
+ DU_LOG("\n
INFO --> SCH :
Sending UE Config response to MAC");
}
else if(event == EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH)
{
rspPst.event = EVENT_UE_RECONFIG_RSP_TO_MAC;
}
else if(event == EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH)
{
rspPst.event = EVENT_UE_RECONFIG_RSP_TO_MAC;
- DU_LOG("\n
SCH:
Sending UE Reconfig response to MAC");
+ DU_LOG("\n
INFO --> SCH :
Sending UE Reconfig response to MAC");
}
SchUeCfgRspOpts[rspPst.selector](&rspPst, cfgRsp);
}
}
SchUeCfgRspOpts[rspPst.selector](&rspPst, cfgRsp);
}
@@
-276,7
+276,7
@@
SchCellCb *getSchCellCb(uint16_t srcEvent, Inst inst, SchUeCfg *ueCfg)
}
if(idx == MAX_NUM_CELL)
{
}
if(idx == MAX_NUM_CELL)
{
- DU_LOG("\nSCH : Ue create request failed. Invalid cell id %d", ueCfg->cellId);
+ DU_LOG("\n
ERROR -->
SCH : Ue create request failed. Invalid cell id %d", ueCfg->cellId);
SchSendUeCfgRspToMac(srcEvent, ueCfg, inst, RSP_NOK, &cfgRsp);
return NULLP;
}
SchSendUeCfgRspToMac(srcEvent, ueCfg, inst, RSP_NOK, &cfgRsp);
return NULLP;
}
@@
-284,7
+284,7
@@
SchCellCb *getSchCellCb(uint16_t srcEvent, Inst inst, SchUeCfg *ueCfg)
/* Check if max number of UE configured */
if(cellCb->numActvUe > MAX_NUM_UE)
{
/* Check if max number of UE configured */
if(cellCb->numActvUe > MAX_NUM_UE)
{
- DU_LOG("
SCH :
Max number of UE [%d] already configured", MAX_NUM_UE);
+ DU_LOG("
\nERROR --> SCH :
Max number of UE [%d] already configured", MAX_NUM_UE);
SchSendUeCfgRspToMac(srcEvent, ueCfg, inst, RSP_NOK, &cfgRsp);
return NULLP;
}
SchSendUeCfgRspToMac(srcEvent, ueCfg, inst, RSP_NOK, &cfgRsp);
return NULLP;
}
@@
-318,10
+318,10
@@
uint8_t MacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfg)
if(!ueCfg)
{
if(!ueCfg)
{
- DU_LOG("\n
SCH :
Adding UE Config Request failed at MacSchAddUeConfigReq()");
+ DU_LOG("\n
ERROR --> SCH :
Adding UE Config Request failed at MacSchAddUeConfigReq()");
return RFAILED;
}
return RFAILED;
}
- DU_LOG("\n
SCH :
Adding UE Config Request for CRNTI[%d]", ueCfg->crnti);
+ DU_LOG("\n
DEBUG --> SCH :
Adding UE Config Request for CRNTI[%d]", ueCfg->crnti);
cellCb = getSchCellCb(pst->event, inst, ueCfg);
/* Search if UE already configured */
cellCb = getSchCellCb(pst->event, inst, ueCfg);
/* Search if UE already configured */
@@
-331,14
+331,14
@@
uint8_t MacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfg)
{
if((ueCb->crnti == ueCfg->crnti) && (ueCb->state == SCH_UE_STATE_ACTIVE))
{
{
if((ueCb->crnti == ueCfg->crnti) && (ueCb->state == SCH_UE_STATE_ACTIVE))
{
- DU_LOG("\n SCH : CRNTI %d already configured ", ueCfg->crnti);
+ DU_LOG("\n
DEBUG -->
SCH : CRNTI %d already configured ", ueCfg->crnti);
SchSendUeCfgRspToMac(pst->event, ueCfg, inst, RSP_OK, &cfgRsp);
return ROK;
}
}
else
{
SchSendUeCfgRspToMac(pst->event, ueCfg, inst, RSP_OK, &cfgRsp);
return ROK;
}
}
else
{
- DU_LOG("\n SCH : SchUeCb not found at MacSchAddUeConfigReq() ");
+ DU_LOG("\n
ERROR -->
SCH : SchUeCb not found at MacSchAddUeConfigReq() ");
SchSendUeCfgRspToMac(pst->event, ueCfg, inst, RSP_NOK, &cfgRsp);
return RFAILED;
}
SchSendUeCfgRspToMac(pst->event, ueCfg, inst, RSP_NOK, &cfgRsp);
return RFAILED;
}
@@
-384,7
+384,6
@@
uint8_t schFillPuschAlloc(SchUeCb *ueCb, uint16_t pdcchSlot, uint32_t dataVol, S
uint16_t puschSlot = 0;
uint16_t startRb = 0;
uint8_t numRb = 0;
uint16_t puschSlot = 0;
uint16_t startRb = 0;
uint8_t numRb = 0;
- uint8_t mcs = 4;
uint8_t numPdschSymbols= 14;
uint16_t tbSize = 0;
uint8_t buffer = 5;
uint8_t numPdschSymbols= 14;
uint16_t tbSize = 0;
uint8_t buffer = 5;
@@
-395,11
+394,11
@@
uint8_t schFillPuschAlloc(SchUeCb *ueCb, uint16_t pdcchSlot, uint32_t dataVol, S
uint8_t startSymb = ueCb->ueCfg.spCellCfg.servCellCfg.initUlBwp.puschCfg.timeDomRsrcAllocList[0].startSymbol;
uint8_t symbLen = ueCb->ueCfg.spCellCfg.servCellCfg.initUlBwp.puschCfg.timeDomRsrcAllocList[0].symbolLength;
uint8_t startSymb = ueCb->ueCfg.spCellCfg.servCellCfg.initUlBwp.puschCfg.timeDomRsrcAllocList[0].startSymbol;
uint8_t symbLen = ueCb->ueCfg.spCellCfg.servCellCfg.initUlBwp.puschCfg.timeDomRsrcAllocList[0].symbolLength;
- puschSlot = (pdcchSlot + k2) %
SCH_NUM_SLOTS
;
+ puschSlot = (pdcchSlot + k2) %
cellCb->numSlots
;
startRb = cellCb->schUlSlotInfo[puschSlot]->puschCurrentPrb;
tbSize = schCalcTbSize(dataVol + buffer); /* 2 bytes header + some buffer */
startRb = cellCb->schUlSlotInfo[puschSlot]->puschCurrentPrb;
tbSize = schCalcTbSize(dataVol + buffer); /* 2 bytes header + some buffer */
- numRb = schCalcNumPrb(tbSize,
mcs
, numPdschSymbols);
+ numRb = schCalcNumPrb(tbSize,
ueCb->ueCfg.ulModInfo.mcsIndex
, numPdschSymbols);
/* increment PUSCH PRB */
cellCb->schUlSlotInfo[puschSlot]->puschCurrentPrb += numRb;
/* increment PUSCH PRB */
cellCb->schUlSlotInfo[puschSlot]->puschCurrentPrb += numRb;
@@
-411,7
+410,9
@@
uint8_t schFillPuschAlloc(SchUeCb *ueCb, uint16_t pdcchSlot, uint32_t dataVol, S
puschInfo->fdAlloc.numPrb = numRb;
puschInfo->tdAlloc.startSymb = startSymb;
puschInfo->tdAlloc.numSymb = symbLen;
puschInfo->fdAlloc.numPrb = numRb;
puschInfo->tdAlloc.startSymb = startSymb;
puschInfo->tdAlloc.numSymb = symbLen;
- puschInfo->tbInfo.mcs = mcs;
+ puschInfo->tbInfo.qamOrder = ueCb->ueCfg.ulModInfo.modOrder;
+ puschInfo->tbInfo.mcs = ueCb->ueCfg.ulModInfo.mcsIndex;
+ puschInfo->tbInfo.mcsTable = ueCb->ueCfg.ulModInfo.mcsTable;
puschInfo->tbInfo.ndi = 1; /* new transmission */
puschInfo->tbInfo.rv = 0;
puschInfo->tbInfo.tbSize = tbSize;
puschInfo->tbInfo.ndi = 1; /* new transmission */
puschInfo->tbInfo.rv = 0;
puschInfo->tbInfo.tbSize = tbSize;
@@
-430,7
+431,7
@@
uint8_t schFillPuschAlloc(SchUeCb *ueCb, uint16_t pdcchSlot, uint32_t dataVol, S
SCH_ALLOC(schUlSlotInfo->schPuschInfo, sizeof(SchPuschInfo));
if(!schUlSlotInfo->schPuschInfo)
{
SCH_ALLOC(schUlSlotInfo->schPuschInfo, sizeof(SchPuschInfo));
if(!schUlSlotInfo->schPuschInfo)
{
- DU_LOG("SCH: Memory allocation failed in schAllocMsg3Pusch");
+ DU_LOG("
\nERROR -->
SCH: Memory allocation failed in schAllocMsg3Pusch");
return RFAILED;
}
memcpy(schUlSlotInfo->schPuschInfo, puschInfo, sizeof(SchPuschInfo));
return RFAILED;
}
memcpy(schUlSlotInfo->schPuschInfo, puschInfo, sizeof(SchPuschInfo));
@@
-546,10
+547,10
@@
uint8_t MacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfg)
if(!ueCfg)
{
if(!ueCfg)
{
- DU_LOG("\nSCH : Modifying Ue Config request failed at MacSchModUeConfigReq()");
+ DU_LOG("\n
ERROR -->
SCH : Modifying Ue Config request failed at MacSchModUeConfigReq()");
return RFAILED;
}
return RFAILED;
}
- DU_LOG("\nSCH : Modifying Ue Config Request for CRNTI[%d]", ueCfg->crnti);
+ DU_LOG("\n
DEBUG -->
SCH : Modifying Ue Config Request for CRNTI[%d]", ueCfg->crnti);
cellCb = getSchCellCb(pst->event, inst, ueCfg);
/* Search if UE already configured */
cellCb = getSchCellCb(pst->event, inst, ueCfg);
/* Search if UE already configured */
@@
-558,7
+559,7
@@
uint8_t MacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfg)
if(!ueCb)
{
if(!ueCb)
{
- DU_LOG("\n SCH : SchUeCb not found at MacSchModUeConfigReq() ");
+ DU_LOG("\n
ERROR -->
SCH : SchUeCb not found at MacSchModUeConfigReq() ");
SchSendUeCfgRspToMac(pst->event, ueCfg, inst, RSP_NOK, &cfgRsp);
return RFAILED;
}
SchSendUeCfgRspToMac(pst->event, ueCfg, inst, RSP_NOK, &cfgRsp);
return RFAILED;
}