uint8_t ret = ROK;
rlcCfgRsp->cellId = rlcCRsp->cellId;
- rlcCfgRsp->ueIdx = rlcCRsp->ueId;
+ rlcCfgRsp->ueId = rlcCRsp->ueId;
+ rlcCfgRsp->result = RLC_DU_APP_RSP_OK;
for(idx = 0; idx < rlcCRsp->numEnt; idx++)
{
if(rlcCRsp->entCfgCfm[idx].status.status == CKW_CFG_CFM_OK)
rlcUeCfg->lCh[lChRbIdx].type = duRlcUeCfg->lcType;
rlcUeCfg->m.amInfo.ul.snLen = duRlcUeCfg->u.amCfg->ulAmCfg.snLenUl;
rlcUeCfg->m.amInfo.ul.staProhTmr = duRlcUeCfg->u.amCfg->ulAmCfg.statProhTmr;
- rlcUeCfg->m.amInfo.ul.reAsmblTmr = duRlcUeCfg->u.amCfg->ulAmCfg.reAssemTmr * RLC_REASSEMBLY_TMR_BASE;
+ rlcUeCfg->m.amInfo.ul.reAsmblTmr = duRlcUeCfg->u.amCfg->ulAmCfg.reAssemTmr;
break;
}
case RLC_MODE_UM:
{
/* UL UM CONFIG */
rlcUeCfg->m.umInfo.ul.snLen = duRlcUeCfg->u.umBiDirCfg->ulUmCfg.snLenUlUm;
- rlcUeCfg->m.umInfo.ul.reAsmblTmr = duRlcUeCfg->u.umBiDirCfg->ulUmCfg.reAssemTmr * RLC_REASSEMBLY_TMR_BASE;
+ rlcUeCfg->m.umInfo.ul.reAsmblTmr = duRlcUeCfg->u.umBiDirCfg->ulUmCfg.reAssemTmr;
/* DL UM CONFIG */
rlcUeCfg->m.umInfo.dl.snLen = duRlcUeCfg->u.umBiDirCfg->dlUmCfg.snLenDlUm;
{
uint8_t lcIdx;
- rlcUeCfg->ueId = ueCfg->ueIdx;
+ rlcUeCfg->ueId = ueCfg->ueId;
rlcUeCfg->cellId = ueCfg->cellId;
rlcUeCfg->numEnt = ueCfg->numLcs;
rlcUeCfg->transId = getTransId();
-
+
for(lcIdx = 0; lcIdx < rlcUeCfg->numEnt; lcIdx++)
{
if(fillLcCfg(gCb, &rlcUeCfg->entCfg[lcIdx], &ueCfg->rlcLcCfg[lcIdx]) != ROK)
{
uint8_t cfgIdx =0;
- cfgRsp->ueId = ueCfg->ueIdx;
+ cfgRsp->ueId = ueCfg->ueId;
cfgRsp->cellId = ueCfg->cellId;
cfgRsp->numEnt = ueCfg->numLcs;
for(cfgIdx =0; cfgIdx<ueCfg->numLcs; cfgIdx++)
if(rrcDelivery)
{
rrcDelivery->cellId = dlRrcMsgInfo->cellId;
- rrcDelivery->ueIdx = dlRrcMsgInfo->ueIdx;
+ rrcDelivery->ueId = dlRrcMsgInfo->ueId;
rrcDelivery->srbId = dlRrcMsgInfo->lcId ;
rrcDelivery->rrcDeliveryStatus.deliveryStatus = PDCP_SN;
rrcDelivery->rrcDeliveryStatus.triggeringMessage = PDCP_SN;
return RFAILED;
}
- datReqInfo->rlcId.rbType = dlRrcMsgInfo->rbType;
- datReqInfo->rlcId.rbId = dlRrcMsgInfo->rbId;
- datReqInfo->rlcId.ueId = dlRrcMsgInfo->ueIdx;
+ datReqInfo->rlcId.rbType = RB_TYPE_SRB;
+ datReqInfo->rlcId.rbId = dlRrcMsgInfo->lcId;
+ datReqInfo->rlcId.ueId = dlRrcMsgInfo->ueId;
datReqInfo->rlcId.cellId = dlRrcMsgInfo->cellId;
- datReqInfo->lcType = dlRrcMsgInfo->lcType;
+ datReqInfo->lcType = LCH_DCCH;
datReqInfo->sduId = ++(rlcCb[pst->dstInst]->dlSduId);
/* Copy fixed buffer to message */
* RFAILED - failure
*
* ****************************************************************/
-uint8_t RlcProcUlData(Pst *pst, RlcData *ulData)
+uint8_t RlcProcUlData(Pst *pst, RlcUlData *ulData)
{
uint8_t ret = ROK;
uint8_t idx, pduIdx;
* and call common channel's handler */
for(idx = 0; idx< ulData->numPdu; idx++)
{
- if(ulData->pduInfo[idx].commCh)
+ if(!dLchPduPres)
{
- RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_UL, RLC_POOL, cLchUlDat, \
- sizeof(RguCDatIndInfo));
- if(!cLchUlDat)
+ RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
+ sizeof(RguDDatIndInfo));
+ if(!dLchUlDat)
{
- DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcProcUlData");
- ret = RFAILED;
- break;
- }
- memset(cLchUlDat, 0, sizeof(RguCDatIndInfo));
-
- cLchUlDat->cellId = ulData->cellId;
- GET_UE_IDX(ulData->rnti, cLchUlDat->rnti);
- cLchUlDat->lcId = ulData->pduInfo[idx].lcId;
-
- /* Copy fixed buffer to message */
- if(ODU_GET_MSG_BUF(RLC_MEM_REGION_UL, RLC_POOL, &cLchUlDat->pdu) != ROK)
- {
- DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcProcUlData");
- RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_UL, RLC_POOL, cLchUlDat, \
- sizeof(RguCDatIndInfo));
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcMacProcUlData");
ret = RFAILED;
break;
}
- oduCpyFixBufToMsg(ulData->pduInfo[idx].pduBuf, cLchUlDat->pdu, \
- ulData->pduInfo[idx].pduLen);
-
- rlcProcCommLcUlData(pst, 0, cLchUlDat);
+ dLchPduPres = TRUE;
}
- else
- {
- if(!dLchPduPres)
- {
- RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
- sizeof(RguDDatIndInfo));
- if(!dLchUlDat)
- {
- DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcMacProcUlData");
- ret = RFAILED;
- break;
- }
- dLchPduPres = TRUE;
- }
- /* Copy fixed buffer to message */
- lcId = ulData->pduInfo[idx].lcId;
- if(ODU_GET_MSG_BUF(RLC_MEM_REGION_UL, RLC_POOL, \
- &dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]) != ROK)
+ /* Copy fixed buffer to message */
+ lcId = ulData->pduInfo[idx].lcId;
+ if(ODU_GET_MSG_BUF(RLC_MEM_REGION_UL, RLC_POOL, \
+ &dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcMacProcUlData");
+ for(pduIdx=0; pduIdx < dLchData[lcId].pdu.numPdu; pduIdx++)
{
- DU_LOG("\nERROR --> RLC : Memory allocation failed at RlcMacProcUlData");
- for(pduIdx=0; pduIdx < dLchData[lcId].pdu.numPdu; pduIdx++)
- {
- ODU_PUT_MSG_BUF(dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]);
- }
- RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
- sizeof(RguDDatIndInfo));
- ret = RFAILED;
- break;
+ ODU_PUT_MSG_BUF(dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu]);
}
- oduCpyFixBufToMsg(ulData->pduInfo[idx].pduBuf, \
- dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu],\
- ulData->pduInfo[idx].pduLen);
-
- dLchData[lcId].pdu.numPdu++;
+ RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_UL, RLC_POOL, dLchUlDat, \
+ sizeof(RguDDatIndInfo));
+ ret = RFAILED;
+ break;
}
+ oduCpyFixBufToMsg(ulData->pduInfo[idx].pduBuf, \
+ dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu],\
+ ulData->pduInfo[idx].pduLen);
+
+ dLchData[lcId].pdu.numPdu++;
}
/* If any PDU received on dedicated logical channel, copy into RguDDatIndInfo
if(dLchPduPres)
{
dLchUlDat->cellId = ulData->cellId;
- GET_UE_IDX(ulData->rnti, dLchUlDat->rnti);
+ GET_UE_ID(ulData->rnti, dLchUlDat->rnti);
for(idx = 0; idx < MAX_NUM_LC; idx++)
{
RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ulData->pduInfo[pduIdx].pduBuf, \
ulData->pduInfo[pduIdx].pduLen);
}
- RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ulData, sizeof(RlcData));
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ulData, sizeof(RlcUlData));
return ROK;
}/* End of RlcProcUlData */
DU_LOG("\nDEBUG --> RLC : Received scheduling report from MAC");
for(idx=0; idx < schRep->numLc; idx++)
{
- /* If it is common channel, fill status indication information
- * and trigger the handler for each common lch separately */
- if(schRep->lcSch[idx].commCh)
+ /* Fill status info structure if at least one channel's scheduling report is received */
+ if(nmbDLch == 0)
{
- RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_DL, RLC_POOL, cLchSchInfo, \
- sizeof(RguCStaIndInfo));
- if(!cLchSchInfo)
- {
- DU_LOG("\nERROR --> RLC: RlcProcSchedResultRpt: Memory allocation failed for cLchSchInfo");
- ret = RFAILED;
- break;
- }
- memset(cLchSchInfo, 0, sizeof(RguCStaIndInfo));
-
- cLchSchInfo->cellId = schRep->cellId;
- cLchSchInfo->lcId = schRep->lcSch[idx].lcId;
- cLchSchInfo->transId = schRep->slotInfo.sfn;
- cLchSchInfo->transId = (cLchSchInfo->transId << 16) | schRep->slotInfo.slot;
- cLchSchInfo->rnti = schRep->rnti;
- rlcProcCommLcSchedRpt(pst, 0, cLchSchInfo);
+ RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_DL, RLC_POOL, dLchSchInfo, \
+ sizeof(RguDStaIndInfo));
+ if(!dLchSchInfo)
+ {
+ DU_LOG("\nERROR --> RLC: RlcProcSchedResultRpt: Memory allocation failed for dLchSchInfo");
+ ret = RFAILED;
+ break;
+ }
+ dLchSchInfo->cellId = schRep->cellId;
+ dLchSchInfo->nmbOfUeGrantPerTti = 1;
+ /* MAC sends Scheduling report for one UE at a time. Hence filling
+ only the 0th index of staInd */
+ dLchSchInfo->staInd[0].rnti = schRep->rnti;
+
+ /* Storing sfn/slot into a single 32-bit variable to be used later*/
+ dLchSchInfo->staInd[0].transId = schRep->slotInfo.sfn;
+ dLchSchInfo->staInd[0].transId = \
+ (dLchSchInfo->staInd[0].transId << 16) | schRep->slotInfo.slot;
+ dLchSchInfo->staInd[0].nmbOfTbs = 1;
+ dLchSchInfo->staInd[0].fillCtrlPdu = true;
}
- else
- {
- /* Fill status info structure if at least one dedicated channel
- * scheduling report is received */
- if(nmbDLch == 0)
- {
- RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_DL, RLC_POOL, dLchSchInfo, \
- sizeof(RguDStaIndInfo));
- if(!dLchSchInfo)
- {
- DU_LOG("\nERROR --> RLC: RlcProcSchedResultRpt: Memory allocation failed for dLchSchInfo");
- ret = RFAILED;
- break;
- }
-
- dLchSchInfo->cellId = schRep->cellId;
- dLchSchInfo->nmbOfUeGrantPerTti = 1;
- /* MAC sends Scheduling report for one UE at a time. Hence filling
- only the 0th index of staInd */
- dLchSchInfo->staInd[0].rnti = schRep->rnti;
-
- /* Storing sfn/slot into a single 32-bit variable to be used later*/
- dLchSchInfo->staInd[0].transId = schRep->slotInfo.sfn;
- dLchSchInfo->staInd[0].transId = \
- (dLchSchInfo->staInd[0].transId << 16) | schRep->slotInfo.slot;
- dLchSchInfo->staInd[0].nmbOfTbs = 1;
- dLchSchInfo->staInd[0].fillCtrlPdu = true;
- }
-
- /* Fill logical channel scheduling info */
- dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].lcId = \
- schRep->lcSch[idx].lcId;
- dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].totBufSize = \
- schRep->lcSch[idx].bufSize;
- nmbDLch++;
- }
+
+ /* Fill logical channel scheduling info */
+ dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].lcId = \
+ schRep->lcSch[idx].lcId;
+ dLchSchInfo->staInd[0].staIndTb[0].lchStaInd[nmbDLch].totBufSize = \
+ schRep->lcSch[idx].bufSize;
+ nmbDLch++;
}
/* Calling handler for all dedicated channels scheduling*/
uint8_t ret = ROK;
RlcCfgInfo *rlcUeCfg = NULLP; //Seed code Rlc cfg struct
RlcCb *rlcUeCb = NULLP;
- RlcCfgCfmInfo *cfgRsp;
+ RlcCfgCfmInfo cfgRsp;
Pst rspPst;
- DU_LOG("\nDEBUG --> RLC: UE reconfig request received. CellID[%d] UEIDX[%d]",ueCfg->cellId, ueCfg->ueIdx);
+ DU_LOG("\nDEBUG --> RLC: UE reconfig request received. CellID[%d] UEID[%d]",ueCfg->cellId, ueCfg->ueId);
rlcUeCb = RLC_GET_RLCCB(pst->dstInst);
RLC_ALLOC(rlcUeCb, rlcUeCfg, sizeof(RlcCfgInfo));
{
DU_LOG("\nERROR --> RLC: Failed to fill configuration at RlcProcUeReconfigReq()");
FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_RECONFIG_RSP);
- memset(cfgRsp, 0, sizeof(RlcCfgCfmInfo));
- fillRlcCfgFailureRsp(cfgRsp, ueCfg);
- SendRlcUeCfgRspToDu(&rspPst, cfgRsp);
+ fillRlcCfgFailureRsp(&cfgRsp, ueCfg);
+ SendRlcUeCfgRspToDu(&rspPst, &cfgRsp);
}
else
{
datReqInfo->rlcId.rbType = RB_TYPE_DRB;
datReqInfo->rlcId.rbId = dlDataMsgInfo->rbId;
- datReqInfo->rlcId.ueId = dlDataMsgInfo->ueIdx;
+ datReqInfo->rlcId.ueId = dlDataMsgInfo->ueId;
datReqInfo->rlcId.cellId = dlDataMsgInfo->cellId;
datReqInfo->lcType = LCH_DTCH;
datReqInfo->sduId = ++(rlcCb[pst->dstInst]->dlSduId);
* Functionality:
* sending UE delete response to DU
*
- * @params[in] uint8_t cellId, uint8_t ueIdx, UeDeleteResult result
+ * @params[in] uint8_t cellId, uint8_t ueId, UeDeleteResult result
*
* @return ROK - success
* RFAILED - failure
* recpord of this snssai
*
*/
-bool rlcFindSliceEntry(uint32_t snssaiVal, uint8_t *snssaiIdx, SlicePmList *sliceStats)
+bool rlcFindSliceEntry(SliceIdentifier snssaiVal, uint8_t *snssaiIdx, SlicePmList *sliceStats)
{
uint8_t cntSlices = sliceStats->numSlice;
for(*snssaiIdx = 0;(*snssaiIdx) < cntSlices; (*snssaiIdx)++)
{
- if(snssaiVal == sliceStats->sliceRecord[*snssaiIdx].networkSliceIdentifier)
+ if((snssaiVal.sst == sliceStats->sliceRecord[*snssaiIdx].networkSliceIdentifier.sst)&&
+ (snssaiVal.sd == sliceStats->sliceRecord[*snssaiIdx].networkSliceIdentifier.sd))
{
return TRUE;
}
}
- DU_LOG("\nERROR --> RLC: Total no of Slice exhausted!");
return FALSE;
}
RlcTptPerSnssai *snssaiNode = NULLP;
Direction dir = DIR_UL;
SlicePmList *sliceStats = NULLP; /*Slice metric */
- uint32_t snssaiVal = 0;
+ SliceIdentifier snssaiVal ;
uint8_t snssaiIdx = 0;
if(snssaiCnt == 0)
while(node)
{
- snssaiVal = 0;
snssaiIdx = 0;
snssaiNode = (RlcTptPerSnssai *)node->node;
- memcpy(&snssaiVal, snssaiNode->snssai, sizeof(Snssai));
-
+ snssaiVal.sst = snssaiNode->snssai->sst;
+ snssaiVal.sd = snssaiNode->snssai->sd[2]+snssaiNode->snssai->sd[1]*10+snssaiNode->snssai->sd[0]*100;
if(rlcFindSliceEntry(snssaiVal, &snssaiIdx, sliceStats) == FALSE)
{
sliceStats->sliceRecord[snssaiIdx].networkSliceIdentifier = snssaiVal;