uint8_t MacProcSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp *schUeDelRsp)
{
- uint8_t ueIdx =0, lcIdx = 0, isCrntiValid = 0;
+ uint8_t ueIdx =0, isCrntiValid = 0;
uint16_t cellIdx=0;
uint8_t ret = RFAILED;
UeDeleteStatus result;
rlcStopTmr(gCb,(PTR)rbCb, EVENT_RLC_AMUL_STA_PROH_TMR);
}
+ RLC_FREE(gCb,rbCb->snssai, sizeof (Snssai));
/* on the first loop winSz is always greater than zero
while( ( curSn < windSz ) hence changing to do while */
rbCb->dir = RLC_DIR_BOTH;
rbCb->m.amDl.pollPdu = entCfg->m.amInfo.dl.pollPdu;
- rbCb->m.amDl.pollByte = entCfg->m.amInfo.dl.pollByte;
+ rbCb->m.amDl.pollByte = entCfg->m.amInfo.dl.pollByte;
rbCb->m.amDl.maxRetx = entCfg->m.amInfo.dl.maxRetx;
rbCb->m.amDl.pollRetxTmrInt = entCfg->m.amInfo.dl.pollRetxTmr;
rbCb->m.amDl.snLen = entCfg->m.amInfo.dl.snLen;
return RFAILED;
}
}
+
+ if(entCfg->snssai)
+ {
+ RLC_ALLOC(gCb, rbCb->snssai, sizeof(Snssai));
+ if(rbCb->snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> RLC_DL : rlcCfgFillDlRbCb(): Failed to allocate memory");
+ return RFAILED;
+ }
+ memcpy(rbCb->snssai, entCfg->snssai, sizeof(Snssai));
+ }
rbCb->mode = entCfg->entMode;
rbCb->discTmrInt = entCfg->discardTmr;
rbCb->dir = entCfg->dir;
rbCb->lch.lChId = entCfg->lCh[0].lChId;
rbCb->lch.lChType = entCfg->lCh[0].type;
-
cellCb->lCh[rbCb->lch.lChId - 1].dlRbCb = rbCb;
break;
}
{
return (CKW_CFG_REAS_LCHTYPE_MIS);
}
+
ueCb->lCh[rbCb->lch.lChId - 1].dlRbCb = NULLP;
ueCb->lCh[entCfg->lCh[0].lChId - 1].dlRbCb = rbCb;
}
}
+ if(entCfg->snssai)
+ {
+ if(!rbCb->snssai)
+ {
+ RLC_ALLOC(gCb, rbCb->snssai, sizeof(Snssai));
+ if(rbCb->snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> RLC_DL : rlcCfgFillDlRbCb(): Failed to allocate memory");
+ return RFAILED;
+ }
+ }
+ memcpy(rbCb->snssai,entCfg->snssai,sizeof(Snssai));
+ }
/* AGHOSH */
rbCb->discTmrInt = entCfg->discardTmr;
/* AGHOSH */
/* Assign NULLP to dlRbCb/ulRbCb.
* Delete Hashlist allocated for it if any */
cellCb->lCh[rlcRbCb->lch.lChId - 1].dlRbCb = NULLP;
+ RLC_FREE(gCb,rlcRbCb->snssai, sizeof(Snssai));
RLC_FREE(gCb,rlcRbCb, sizeof(RlcDlRbCb)); /*Vartika: Mem leak fix */
}
/* Get ueCb and delete rbCb from it */
entCfg->rbId);
return (ret);
}
-
ueCb->lCh[rlcRbCb->lch.lChId - 1].dlRbCb = NULLP;
#ifdef LTE_L2_MEAS
{
rbCb->lch.lChId = entCfg->lCh[0].lChId;
rbCb->lch.lChType = entCfg->lCh[0].type;
-
rbCb->dir = entCfg->dir;
rbCb->m.umUl.snLen = entCfg->m.umInfo.ul.snLen;
return RFAILED;
}
}
+
+ if(entCfg->snssai)
+ {
+ if(!rbCb->snssai)
+ {
+ RLC_ALLOC(gCb, rbCb->snssai, sizeof(Snssai));
+ if(rbCb->snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> RLC_UL : rlcCfgFillUlRbCb(): Failed to allocate memory for snssai ");
+ return RFAILED;
+ }
+ }
+ memcpy(rbCb->snssai, entCfg->snssai, sizeof(Snssai));
+ }
rbCb->mode = entCfg->entMode;
return ROK;
rbCb->dir = entCfg->dir;
rbCb->lch.lChId = entCfg->lCh[0].lChId;
rbCb->lch.lChType = entCfg->lCh[0].type;
-
cellCb->lCh[rbCb->lch.lChId - 1].ulRbCb = rbCb;
break;
}
break;
}
}
+
+ if(entCfg->snssai)
+ {
+ if(!rbCb->snssai)
+ {
+ RLC_ALLOC(gCb, rbCb->snssai, sizeof(Snssai));
+ if(rbCb->snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> RLC_UL : rlcCfgUpdateUlRb(): Failed to allocate memory for snssai ");
+ return RFAILED;
+ }
+ }
+ memcpy(rbCb->snssai,entCfg->snssai,sizeof(Snssai));
+ }
+
return (CKW_CFG_REAS_NONE);
}
if( RLC_MODE_UM == rbCbLst[idx]->mode)
{
rlcUmmFreeDlRbCb(gCb,rbCbLst[idx]);
-
RLC_FREE (gCb,rbCbLst[idx], sizeof (RlcDlRbCb));
}
else if( RLC_MODE_AM == rbCbLst[idx]->mode)
else if(RLC_MODE_TM == rbCbLst[idx]->mode)
{
cmLListCatLList(&(gCb->u.dlCb->toBeFreed.sduLst),&(rbCbLst[idx]->m.tm.sduQ));
+ RLC_FREE (gCb,rbCbLst[idx]->snssai, sizeof (Snssai));
RLC_FREE (gCb,rbCbLst[idx], sizeof (RlcDlRbCb));
}
rlcAmmFreeUlRbCb(gCb,rbCbLst[idx]);
}
- RLC_FREE (gCb,rbCbLst[idx], sizeof (RlcUlRbCb));
+ RLC_FREE(gCb,rbCbLst[idx], sizeof (RlcUlRbCb));
}
}
/* Discard new changes ends */
CmLteRlcId rlcId; /*!< RLC Identifier */
RlcLchInfo lch; /*!< Logical Channel Info */
+ Snssai *snssai;
CmLteRlcMode mode; /*!< Entity Mode */
uint8_t dir; /*!< Direction for UL/DL */
Inst inst; /*!< Tapa Instance where rb created */
RlcCfgCfmInfo *cfmInfo
)
{
+ uint8_t cfgIdx=0;
RlcCb *tRlcCb;
RlcCfgCfmInfo *cfgCfm;
RlcUlCfgTmpData *cfgTmpData;
RLC_FREE_SHRABL_BUF(pst->region, pst->pool, cfmInfo, sizeof(RlcCfgCfmInfo));
/* free the cfgInfo that came from LM */
- RLC_PST_FREE(pst->region, pst->pool, cfgTmpData->cfgInfo, sizeof(RlcCfgInfo));
+ for(cfgIdx=0; cfgIdx<cfgTmpData->cfgInfo->numEnt; cfgIdx++)
+ {
+ RLC_FREE(tRlcCb, cfgTmpData->cfgInfo->entCfg[cfgIdx].snssai, sizeof(Snssai));
+ }
+ RLC_FREE(tRlcCb, cfgTmpData->cfgInfo, sizeof(RlcCfgInfo));
RLC_FREE(tRlcCb,cfgTmpData,sizeof(RlcUlCfgTmpData));
return ROK;
* RlcEntCfgInfo pointer
* RlcBearerCfg pointer
* Config Type
- * @return void
+ * @return ROK - SUCCESS
+ * RFAILED - FAILURE
*
* ****************************************************************/
-void fillLcCfg(RlcEntCfgInfo *rlcUeCfg, RlcBearerCfg *duRlcUeCfg, uint8_t cfgType)
+uint8_t fillLcCfg(RlcCb *gCb, RlcEntCfgInfo *rlcUeCfg, RlcBearerCfg *duRlcUeCfg)
{
uint8_t lChRbIdx = 0;
rlcUeCfg->rbType = duRlcUeCfg->rbType; // SRB or DRB
rlcUeCfg->lCh[lChRbIdx].lChId = duRlcUeCfg->lcId;
rlcUeCfg->lCh[lChRbIdx].type = duRlcUeCfg->lcType;
+ if(duRlcUeCfg->snssai)
+ {
+ RLC_ALLOC(gCb, rlcUeCfg->snssai, sizeof(Snssai));
+ if(rlcUeCfg->snssai == NULLP)
+ {
+ DU_LOG("\nERROR --> RLC : fillLcCfg(): Failed to allocate memory for snssai");
+ return RFAILED;
+ }
+ memcpy(rlcUeCfg->snssai, duRlcUeCfg->snssai, sizeof(Snssai));
+ }
fillEntModeAndDir(&rlcUeCfg->entMode, &rlcUeCfg->dir, duRlcUeCfg->rlcMode);
- rlcUeCfg->cfgType = cfgType;
+ rlcUeCfg->cfgType = duRlcUeCfg->configType;
switch(rlcUeCfg->entMode)
{
default:
break;
}/* End of switch(entMode) */
+ return ROK;
}
/*******************************************************************
* @params[in]
* RlcEntCfgInfo pointer
* RlcBearerCfg pointer
- * @return void
+ * @return ROK - Success
+ * RFAILED - Failure
*
******************************************************************/
-void fillRlcCfg(RlcCfgInfo *rlcUeCfg, RlcUeCfg *ueCfg)
+uint8_t fillRlcCfg(RlcCb *gCb, RlcCfgInfo *rlcUeCfg, RlcUeCfg *ueCfg)
{
uint8_t lcIdx;
for(lcIdx = 0; lcIdx < rlcUeCfg->numEnt; lcIdx++)
{
- fillLcCfg(&rlcUeCfg->entCfg[lcIdx], &ueCfg->rlcLcCfg[lcIdx], ueCfg->rlcLcCfg[lcIdx].configType);
+ if(fillLcCfg(gCb, &rlcUeCfg->entCfg[lcIdx], &ueCfg->rlcLcCfg[lcIdx]) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : fillRlcCfg(): Failed to fill LC configuration");
+ return RFAILED;
+ }
}
+ return ROK;
}
+/*******************************************************************
+ *
+ * @brief Fill RlcCfgCfmInfo structure for sending failure response to DU
+ *
+ * @details
+ *
+ * Function : fillRlcCfgFailureRsp
+ *
+ * Functionality:
+ * Fill RlcCfgCfmInfo structure for sending failure response to DU
+ *
+ * @params[in] RlcCfgCfmInfo *cfgRsp, RlcUeCfg *ueCfg
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void fillRlcCfgFailureRsp(RlcCfgCfmInfo *cfgRsp, RlcUeCfg *ueCfg)
+{
+ uint8_t cfgIdx =0;
+
+ cfgRsp->ueId = ueCfg->ueIdx;
+ cfgRsp->cellId = ueCfg->cellId;
+ cfgRsp->numEnt = ueCfg->numLcs;
+ for(cfgIdx =0; cfgIdx<ueCfg->numLcs; cfgIdx++)
+ {
+ cfgRsp->entCfgCfm[cfgIdx].rbId = ueCfg->rlcLcCfg[cfgIdx].rbId;
+ cfgRsp->entCfgCfm[cfgIdx].rbType = ueCfg->rlcLcCfg[cfgIdx].rbType;
+ cfgRsp->entCfgCfm[cfgIdx].status.status = RLC_DU_APP_RSP_NOK;
+ cfgRsp->entCfgCfm[cfgIdx].status.reason = CKW_CFG_REAS_NONE;
+ }
+}
/*******************************************************************
*
* @brief Handles Ue Create Request from DU APP
uint8_t RlcProcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg)
{
uint8_t ret = ROK;
- RlcCfgInfo *rlcUeCfg = NULLP;
RlcCb *gCb;
+ RlcCfgInfo *rlcUeCfg = NULLP;
+ RlcCfgCfmInfo cfgRsp;
+ Pst rspPst;
gCb = RLC_GET_RLCCB(pst->dstInst);
RLC_ALLOC(gCb, rlcUeCfg, sizeof(RlcCfgInfo));
else
{
memset(rlcUeCfg, 0, sizeof(RlcCfgInfo));
- fillRlcCfg(rlcUeCfg, ueCfg);
- ret = RlcProcCfgReq(pst, rlcUeCfg);
+ ret = fillRlcCfg(gCb, rlcUeCfg, ueCfg);
if(ret != ROK)
- DU_LOG("\nERROR --> RLC: Failed to configure Add/Mod/Del entities at RlcProcUeCreateReq()");
+ {
+ DU_LOG("\nERROR --> RLC: Failed to fill configuration at RlcProcUeCreateReq()");
+ FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_CREATE_RSP);
+ fillRlcCfgFailureRsp(&cfgRsp, ueCfg);
+ SendRlcUeCfgRspToDu(&rspPst, cfgRsp);
+ }
+ else
+ {
+ ret = RlcProcCfgReq(pst, rlcUeCfg);
+ if(ret != ROK)
+ DU_LOG("\nERROR --> RLC: Failed to configure Add/Mod/Del entities at RlcProcUeCreateReq()");
+ }
}
RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueCfg, sizeof(RlcUeCfg));
return ret;
uint8_t ret = ROK;
RlcCfgInfo *rlcUeCfg = NULLP; //Seed code Rlc cfg struct
RlcCb *rlcUeCb = NULLP;
-
+ RlcCfgCfmInfo *cfgRsp;
+ Pst rspPst;
+
DU_LOG("\nDEBUG --> RLC: UE reconfig request received. CellID[%d] UEIDX[%d]",ueCfg->cellId, ueCfg->ueIdx);
rlcUeCb = RLC_GET_RLCCB(pst->dstInst);
else
{
memset(rlcUeCfg, 0, sizeof(RlcCfgInfo));
- fillRlcCfg(rlcUeCfg, ueCfg);
- ret = RlcProcCfgReq(pst, rlcUeCfg);
+ ret = fillRlcCfg(rlcUeCb, rlcUeCfg, ueCfg);
if(ret != ROK)
- DU_LOG("\nERROR --> RLC: Failed to configure Add/Mod/Del entities at RlcProcUeReconfigReq()");
+ {
+ DU_LOG("\nERROR --> RLC: Failed to fill configuration at RlcProcUeReconfigReq()");
+ FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_RECONFIG_RSP);
+ fillRlcCfgFailureRsp(&cfgRsp, ueCfg);
+ SendRlcUeCfgRspToDu(&rspPst, cfgRsp);
+ }
+ else
+ {
+ ret = RlcProcCfgReq(pst, rlcUeCfg);
+ if(ret != ROK)
+ DU_LOG("\nERROR --> RLC: Failed to configure Add/Mod/Del entities at RlcProcUeReconfigReq()");
+ }
}
RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueCfg, sizeof(RlcUeCfg));
#ifdef LTE_L2_MEAS
RlcL2MeasRbCb rbL2Cb; /**< RB measurement L2 Cb */
RlcUlUeCb *ueCb; /*!< Pointer to UeCb */
- uint8_t qci; /**< qci of the RB */
+ uint8_t qci; /**< qci of the RB */
RlcL2MeasIpThruput l2MeasIpThruput; /**< Holds related parameter for
DL/Ul ip throughput>*/
#endif /* LTE_L2_MEAS */
CmLteRlcId rlcId; /**< RLC Identifier */
- RlcLchInfo lch; /**< Logical Channel Info */
+ RlcLchInfo lch; /**< Logical Channel Info */
+ Snssai *snssai; /**< Snssai Info */
CmLteRlcMode mode; /**< Entity Mode */
- uint8_t dir; /**< Direction for UL/DL */
+ uint8_t dir; /**< Direction for UL/DL */
Inst inst; /**< Tapa where Rb created Instance id */
SpId k1wuSapId; /**< KWU sap Id, to get the KwuSapCb */
SpId udxSapId; /**< KWU sap Id, to get the KwuSapCb */
- uint32_t transId; /**< Transaction Id for RLC */
+ uint32_t transId; /**< Transaction Id for RLC */
union
{
RlcUmUl umUl; /**< UM mode Ul elements */
{
/* cat the SDU queue to the to be freed list */
+ RLC_FREE (gCb,rbCb->snssai, sizeof (Snssai));
cmLListCatLList(&(gCb->u.dlCb->toBeFreed.sduLst),&(rbCb->m.umDl.sduQ));
rlcUtlRaiseDlCleanupEvent(gCb);
curSn++;
}while ( curSn < RLC_RCV_BUF_BIN_SIZE);
+ RLC_FREE(gCb,rbCb->snssai, sizeof (Snssai));
RLC_FREE(gCb,rbCb->m.umUl.recBufLst, (RLC_RCV_BUF_BIN_SIZE * sizeof(CmLListCp)));
rbCb->m.umUl.recBufLst = NULLP;
RlcCfgInfo *cfg
)
{
+ uint8_t cfgIdx = 0;
RlcCb *tRlcCb;
RlcUlCfgTmpData *cfgTmpData;
#if (ERRCLASS & ERRCLS_INT_PAR)
if (pst->dstInst >= MAX_RLC_INSTANCES)
{
+ for(cfgIdx=0; cfgIdx<cfg->numEnt; cfgIdx++)
+ {
+ RLC_PST_FREE(pst->region, pst->pool, cfg->entCfg[cfgIdx].snssai, sizeof(Snssai));
+ }
RLC_PST_FREE(pst->region, pst->pool, cfg, sizeof(RlcCfgInfo));
return RFAILED;
}
if (cfgTmpData == NULLP)
{
+ for(cfgIdx=0; cfgIdx<cfg->numEnt; cfgIdx++)
+ {
+ RLC_PST_FREE(pst->region, pst->pool, cfg->entCfg[cfgIdx].snssai, sizeof(Snssai));
+ }
RLC_PST_FREE(pst->region, pst->pool, cfg, sizeof(RlcCfgInfo));
return RFAILED;
}
if (rlcDbmAddUlTransaction(tRlcCb, cfgTmpData) != ROK)
{
DU_LOG("\nERROR --> RLC_UL : Addition to UL transId Lst Failed");
+ for(cfgIdx=0; cfgIdx<cfg->numEnt; cfgIdx++)
+ {
+ RLC_PST_FREE(pst->region, pst->pool, cfg->entCfg[cfgIdx].snssai, sizeof(Snssai));
+ }
RLC_PST_FREE(pst->region, pst->pool, cfg, sizeof(RlcCfgInfo));
return RFAILED;
if (txBuf && txBuf->pduLst.first)
{
while(txBuf->pduLst.first)
- {
- RlcDlPduInfo *pduInfo = (RlcDlPduInfo *)(txBuf->pduLst.first->node);
- ODU_PUT_MSG_BUF(pduInfo->pdu);
- /* Delete node from the txBuf Pdu lst */
- cmLListDelFrm(&txBuf->pduLst, txBuf->pduLst.first);
- RLC_FREE(gCb, pduInfo, sizeof(RlcDlPduInfo));
- }
+ {
+ RlcDlPduInfo *pduInfo = (RlcDlPduInfo *)(txBuf->pduLst.first->node);
+ ODU_PUT_MSG_BUF(pduInfo->pdu);
+ /* Delete node from the txBuf Pdu lst */
+ cmLListDelFrm(&txBuf->pduLst, txBuf->pduLst.first);
+ RLC_FREE(gCb, pduInfo, sizeof(RlcDlPduInfo));
+ }
rlcUtlDelTxBuf(RLC_AMDL.txBufLst, txBuf, gCb);
if(gCb->u.dlCb->shutdownReceived == 0)
{
(*toBeFreed)--;
- }
+ }
}
RLC_AMDL.txNextAck = (RLC_AMDL.txNextAck + 1) & RLC_AMDL.snModMask;
MODAMT(RLC_AMDL.txNext, mTxNext, RLC_AMDL.txNextAck,RLC_AMDL.snModMask);
}
+ RLC_FREE(gCb, rbCb->snssai, sizeof(Snssai));
if(*toBeFreed == 0)
{
return (TRUE);
typedef struct rlcEntCfgInfo
{
uint8_t cfgType; /*!< Type of Configuration -
- ADD/MODIFY/DELETE/RE-ESTABLISH/
- DELTEUE */
+ ADD/MODIFY/DELETE/RE-ESTABLISH/
+ DELTEUE */
uint8_t rbId; /* RB ID. The allowed
- Values are [0..255] */
+ Values are [0..255] */
uint8_t rbType; /* Type of the RB - can be SRB or DRB */
uint8_t qci; /*!< qCI value Associated with that RB */
- CkwLChInfo lCh[CM_LTE_MAX_LOGCH_PER_RB]; /*!< Logical channel
+ Snssai *snssai; /* Snssai Associated with logical channel */
+ CkwLChInfo lCh[CM_LTE_MAX_LOGCH_PER_RB]; /*!< Logical channel
information
In case of AM mode:
idx = 0 implies DL and
idx = 1 implies UL
In case of TM/UM idx 0 is only
applicable */
- CmLteRlcMode entMode; /*!< Entity mode: AM, UM or TM */
+ CmLteRlcMode entMode; /*!< Entity mode: AM, UM or TM */
uint8_t dir; /*!< Direction: It can be either
UL / DL for TM mode
UL / DL or BOTH for UM mode
Configuration Information from RRC to RLC */
typedef struct rlcCfgInfo
{
- uint32_t transId; /*!< Transaction Id */
+ uint32_t transId; /*!< Transaction Id */
CmLteRnti ueId; /*!< UE ID */
CmLteCellId cellId; /*!< Cell ID */
- uint8_t numEnt; /*!< Number of entities to
- configure */
- RlcEntCfgInfo entCfg[CKW_MAX_ENT_CFG]; /*!< Array of Entities to be
- configure */
+ uint8_t numEnt; /*!< Number of entities to configure */
+ RlcEntCfgInfo entCfg[CKW_MAX_ENT_CFG]; /*!< Array of Entities to be configure */
}RlcCfgInfo;
/** @brief
Entity Configuration Confirmation Information */
typedef struct rlcEntCfgCfmInfo
{
- uint8_t rbId; /*!< rb ID */
- uint8_t rbType; /*!< RB type - can be SRB or DRB */
+ uint8_t rbId; /*!< rb ID */
+ uint8_t rbType; /*!< RB type - can be SRB or DRB */
CmStatus status; /*!< Status of the confirmation */
}RlcEntCfgCfmInfo;
typedef enum
{
- RLC_DU_APP_RSP_NOK,
- RLC_DU_APP_RSP_OK
+ RLC_DU_APP_RSP_OK = 1,
+ RLC_DU_APP_RSP_NOK
}RlcRsp;
typedef struct ulAmCfg
uint8_t rbType;
uint8_t lcId;
uint8_t lcType;
+ Snssai *snssai;
RlcMode rlcMode;
union
{
DU_LOG("\nERROR --> DU_APP: Invalid Rlc Mode %d at freeRlcLcCfg()", lcCfg->rlcMode);
break;
}
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->snssai, sizeof(Snssai));
}
/*******************************************************************
}
}
+/*******************************************************************
+*
+* @brief Function to extract Snssai Cfg Info from CU
+*
+* @details
+*
+* Function : extractDrbSnssaiCfg
+*
+* Functionality: Function to extract Drb Snssai Cfg Info from CU
+*
+* @params[in] DRB_Information_t *drbInfo, Snssai *snssai
+* @return ROK/RFAILED
+*
+* ****************************************************************/
+
+uint8_t extractDrbSnssaiCfg(SNSSAI_t *RecvSnssai, Snssai **snssaiToBeShared)
+{
+ if(!(*snssaiToBeShared))
+ {
+ DU_ALLOC_SHRABL_BUF((*snssaiToBeShared), sizeof(Snssai));
+ if(snssaiToBeShared == NULLP)
+ {
+ DU_LOG("\nERROR --> DUAPP : extractDrbSnssaiCfg(): Memory failed at allocating for SNSSAI ");
+ return RFAILED;
+ }
+ }
+ if(RecvSnssai)
+ {
+ memcpy(&(*snssaiToBeShared)->sst, RecvSnssai->sST.buf, RecvSnssai->sST.size);
+ if(RecvSnssai->sD)
+ {
+ memcpy((*snssaiToBeShared)->sd, RecvSnssai->sD->buf, RecvSnssai->sD->size);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DUAPP : extractDrbSnssaiCfg(): Received Null pointer of Snssai->SD");
+ return RFAILED;
+ }
+ }
+ return ROK;
+}
+
/*******************************************************************
*
* @brief Function to procRlcLcCfg
* ****************************************************************/
void procRlcLcCfg(uint8_t rbId, uint8_t lcId, uint8_t rbType, uint8_t rlcMode,\
- uint8_t configType, RLC_Config_t *f1RlcCfg, RlcBearerCfg *lcCfg)
+ uint8_t configType, RLC_Config_t *f1RlcCfg, RlcBearerCfg *lcCfg, QoSInformation_t *qoSInformation)
{
+ DRB_Information_t *drbInfo;
lcCfg->rbId = rbId;
lcCfg->configType = configType;
{
extractRlcModeCfg(lcCfg->rlcMode, lcCfg, f1RlcCfg);
}
+ if(qoSInformation != NULLP)
+ {
+ if(qoSInformation->present == QoSInformation_PR_choice_extension)
+ {
+ if(qoSInformation->choice.choice_extension->value.present ==\
+ QoSInformation_ExtIEs__value_PR_DRB_Information)
+ {
+ drbInfo = &qoSInformation->choice.choice_extension->value.choice.DRB_Information;
+ if(extractDrbSnssaiCfg(&drbInfo->sNSSAI, &lcCfg->snssai) != ROK)
+ {
+ DU_LOG("\nERROR --> DUAPP: Unable to extract Snssai information at procRlcLcCfg()");
+ return RFAILED;
+ }
+ }
+ }
+ }
}
-
-
/*******************************************************************
*
* @brief Fills DrbQos Info received by CU
}
return ROK;
}
+
/*******************************************************************
*
* @brief Function to extract Drb Qos Cfg Info from CU
extractQosInfo(macLcToAdd->drbQos, &drbInfo->dRB_QoS);
macLcToAdd->dlLcCfg.lcp = macLcToAdd->drbQos->ngRanRetPri.priorityLevel;
}
- if(!macLcToAdd->snssai)
- {
- DU_ALLOC_SHRABL_BUF(macLcToAdd->snssai, sizeof(Snssai));
- if(macLcToAdd->snssai == NULLP)
- {
- DU_LOG("\nERROR --> DUAPP : Memory failed at allocating SNSSAI at extractDrbQosCfg()");
- return RFAILED;
- }
- }
- memcpy(&macLcToAdd->snssai->sst, drbInfo->sNSSAI.sST.buf, \
- drbInfo->sNSSAI.sST.size);
- if(drbInfo->sNSSAI.sD)
+ if(extractDrbSnssaiCfg(&drbInfo->sNSSAI, &macLcToAdd->snssai) != ROK)
{
- memcpy(macLcToAdd->snssai->sd, drbInfo->sNSSAI.sD->buf, \
- drbInfo->sNSSAI.sD->size);
+ DU_LOG("\nERROR --> DUAPP: Unable to extract Snssai information at extractDrbQosCfg()");
+ return RFAILED;
}
return ROK;
}
/* Filling RLC/MAC Config*/
memset(&ueCfgDb->macLcCfg[idx], 0, sizeof(LcCfg));
memset(&ueCfgDb->rlcLcCfg[idx], 0, sizeof(RlcBearerCfg));
- procRlcLcCfg(rbId, lcId, rbType, rlcMode, CONFIG_UNKNOWN, f1RlcCfg, &(ueCfgDb->rlcLcCfg[idx]));
+ procRlcLcCfg(rbId, lcId, rbType, rlcMode, CONFIG_UNKNOWN, f1RlcCfg, &(ueCfgDb->rlcLcCfg[idx]), NULLP);
if(procMacLcCfg(lcId, rbType, CONFIG_UNKNOWN, NULL, NULL, NULL, macUlLcCfg, &ueCfgDb->macLcCfg[idx], NULL) != ROK)
{
DU_LOG("\nERROR --> DU APP : Failed while filling MAC LC config at extractRlcCfgToAddMod()");
* ****************************************************************/
uint8_t procSrbListToSetup(SRBs_ToBeSetup_Item_t * srbItem, LcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd)
{
- uint8_t ret = ROK;
/* Filling RLC INFO */
- procRlcLcCfg(srbItem->sRBID, srbItem->sRBID, RB_TYPE_SRB, RLC_AM, CONFIG_ADD, NULL, rlcLcToAdd);
+ procRlcLcCfg(srbItem->sRBID, srbItem->sRBID, RB_TYPE_SRB, RLC_AM, CONFIG_ADD, NULL, rlcLcToAdd, NULL);
/* Filling MAC INFO */
- ret = procMacLcCfg(srbItem->sRBID, RB_TYPE_SRB, CONFIG_ADD, NULL,NULL, NULL, NULL, macLcToAdd, NULL);
- if(ret == RFAILED)
+ if(procMacLcCfg(srbItem->sRBID, RB_TYPE_SRB, CONFIG_ADD, NULL,NULL, NULL, NULL, macLcToAdd, NULL) != ROK)
{
DU_LOG("\nERROR --> F1AP : Failed at MAC LC Cfg in procSrbListToSetup()");
- return ret;
+ return RFAILED;
}
- return ret;
+
+ return ROK;
}
* Functionality: Fills Drb List received by CU
* for both MAC and RLC
*
- * @params[in] SRBs_ToBeSetup_Item_t pointer
- * LcCfg pointer,
- * RlcBearerCfg pointer
+ * @params[in] DRBs_ToBeSetup_Item_t , DRBs_ToBeSetupMod_Item_t,
+ * DRBs_ToBeModified_Item_t , lcId, LcCfg pointer,
+ * RlcBearerCfg , UpTnlCfg, RlcUeCfg
* @return void
*
* ****************************************************************/
uint8_t procDrbListToSetupMod(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbItem,\
-DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem, LcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd, UpTnlCfg *upTnlInfo)
+DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem, LcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd, UpTnlCfg *upTnlInfo, RlcUeCfg *storedRlcUeCfg)
{
+ uint8_t cfgIdx = 0;
+ RlcMode rlcModeInfo;
if(drbItem != NULLP)
{
/* Filling RLC INFO */
- procRlcLcCfg(drbItem->dRBID, lcId, RB_TYPE_DRB, drbItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd);
+ procRlcLcCfg(drbItem->dRBID, lcId, RB_TYPE_DRB, drbItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd, &drbItem->\
+ qoSInformation);
/* Filling MAC INFO */
if(procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_ADD, drbItem, NULL, NULL, NULL, macLcToAdd, upTnlInfo) != ROK)
}
else if(drbSetupModItem != NULLP)
{
- procRlcLcCfg(drbSetupModItem->dRBID, lcId, RB_TYPE_DRB, drbSetupModItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd);
+ procRlcLcCfg(drbSetupModItem->dRBID, lcId, RB_TYPE_DRB, drbSetupModItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd,
+ &drbSetupModItem->qoSInformation);
if(procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_ADD, NULL, drbSetupModItem, NULL, NULL, macLcToAdd, upTnlInfo) != ROK)
{
{
/* Drb to Mod IEs doesnot have rlcMode to be modified
* in ASN. Hence no change in RLC configurations */
+ if(storedRlcUeCfg != NULLP)
+ {
+ for(cfgIdx = 0; cfgIdx < storedRlcUeCfg->numLcs; cfgIdx++)
+ {
+ if(storedRlcUeCfg->rlcLcCfg[cfgIdx].lcId == lcId)
+ {
+ rlcModeInfo = storedRlcUeCfg->rlcLcCfg[cfgIdx].rlcMode;
+ break;
+ }
+ }
+ }
+
+ procRlcLcCfg(drbModItem->dRBID, lcId, RB_TYPE_DRB, rlcModeInfo, CONFIG_MOD, NULL, rlcLcToAdd, drbModItem->qoSInformation);
if(procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_MOD, NULL, NULL, drbModItem, NULL, macLcToAdd, upTnlInfo) != ROK)
{
DU_LOG("\nERROR --> F1AP : Failed at RLC LC Cfg in procDrbListToSetupMod()");
* ****************************************************************/
uint8_t extractDrbListToSetupMod(DRBs_ToBeSetup_List_t *drbCfg, DRBs_ToBeSetupMod_List_t *drbSetupModCfg,\
- DRBs_ToBeModified_List_t *drbModCfg, uint8_t drbCount, DuUeCfg *ueCfgDb, uint32_t *drbBitMap)
+ DRBs_ToBeModified_List_t *drbModCfg, uint8_t drbCount, DuUeCfg *ueCfgDb, uint32_t *drbBitMap, RlcUeCfg *rlcUeCfg)
{
uint8_t ret, drbIdx, lcId = 0;
DRBs_ToBeSetup_Item_t *drbItem = NULLP;
}
ret = procDrbListToSetupMod(lcId, NULL, NULL, &(drbModItem->value.choice.DRBs_ToBeModified_Item),\
&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs],\
- &ueCfgDb->upTnlInfo[ueCfgDb->numDrb]);
+ &ueCfgDb->upTnlInfo[ueCfgDb->numDrb], rlcUeCfg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> F1AP : Failed at extractDrbListToSetupMod() for Modified List");
{
drbItem = &drbCfg->list.array[drbIdx]->value.choice.DRBs_ToBeSetup_Item;
ret = procDrbListToSetupMod(lcId, drbItem, NULL, NULL, &ueCfgDb->macLcCfg[ueCfgDb->numMacLcs],\
- &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], &ueCfgDb->upTnlInfo[ueCfgDb->numDrb]);
+ &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], &ueCfgDb->upTnlInfo[ueCfgDb->numDrb], rlcUeCfg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> F1AP : Failed at extractDrbListToSetupMod() for DrbSetup List");
drbSetupModItem = (DRBs_ToBeSetupMod_ItemIEs_t *) drbSetupModCfg->list.array[drbIdx];
ret = procDrbListToSetupMod(lcId, NULL, &(drbSetupModItem->value.choice.DRBs_ToBeSetupMod_Item), NULL,\
&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs],\
- &ueCfgDb->upTnlInfo[ueCfgDb->numDrb]);
+ &ueCfgDb->upTnlInfo[ueCfgDb->numDrb], rlcUeCfg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> F1AP : Failed at extractDrbListToSetupMod() for DrbSetupMod List");
break;
}
}
- ueCfgDb->numRlcLcs++;
}
+ ueCfgDb->numRlcLcs++;
ueCfgDb->numMacLcs++;
ueCfgDb->numDrb++;
{
drbCfg = &ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRBs_ToBeSetup_List;
- if(extractDrbListToSetupMod(drbCfg, NULL, NULL, drbCfg->list.count, &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap))
+ if(extractDrbListToSetupMod(drbCfg, NULL, NULL, drbCfg->list.count, &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap, NULLP))
{
DU_LOG("\nERROR --> DU APP : Failed at extractDrbListToSetupMod()");
//TODO: Update the failure cause in ue context Setup Response
choice.DRBs_ToBeSetupMod_List;
if(extractDrbListToSetupMod(NULL, drbSetupModCfg, NULL, drbSetupModCfg->list.count,\
- &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap))
+ &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap, NULL))
{
DU_LOG("\nERROR --> DU APP : Failed at extractDrbListToSetupMod() for DrbSetupModList");
ret = RFAILED;
drbModifiedCfg = &ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.\
choice.DRBs_ToBeModified_List;
if(extractDrbListToSetupMod(NULL, NULL, drbModifiedCfg, drbSetupModCfg->list.count,\
- &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap))
+ &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap, &duUeCb->rlcUeCfg))
{
DU_LOG("\nERROR --> DU APP : Failed at extractDrbListToSetupMod() for DrbModifiedList");
ret = RFAILED;
(ueCfgDb->macLcCfg[dbIdx].configType == CONFIG_MOD))
{
ueCfgDb->macLcCfg[dbIdx].configType = CONFIG_MOD;
- ret = fillMacLcCfgToAddMod(&macUeCfg->lcCfgList[dbIdx], &ueCfgDb->macLcCfg[dbIdx], &duMacDb->lcCfgList[lcIdx], FALSE);
+ ret = fillMacLcCfgToAddMod(&macUeCfg->lcCfgList[dbIdx], &ueCfgDb->macLcCfg[dbIdx],\
+ &duMacDb->lcCfgList[lcIdx], FALSE);
}
}
else
return ret;
}
+/******************************************************************
+ *
+ * @brief Fills Snssai information
+ *
+ * @details
+ *
+ * Function : fillSnssaiInfo
+ *
+ * Functionality: Fills Snssai information
+ *
+ * @params[in] LcCfg *snssaiTobeSend, LcCfg *snssaiDb, LcCfg *oldSnssai,
+ * Bool toUpdateg
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ *****************************************************************/
+uint8_t fillSnssaiInfo(Snssai *snssaiTobeSend, Snssai *snssaiDb, Snssai **oldSnssai, Bool toUpdate)
+{
+ if(!toUpdate)
+ {
+ if(snssaiDb)
+ snssaiTobeSend = snssaiDb;
+ else if(oldSnssai)
+ snssaiTobeSend = *oldSnssai;
+ else
+ snssaiTobeSend = NULL;
+ }
+ else
+ {
+ if(snssaiDb)
+ {
+ if(*oldSnssai)
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, *oldSnssai, sizeof(Snssai));
+
+ DU_ALLOC_SHRABL_BUF(*oldSnssai, sizeof(Snssai));
+ if(*oldSnssai == NULL)
+ {
+ DU_LOG("\nERROR --> DU APP : Memory Alloc Failed at fillSnssaiInfo()");
+ return RFAILED;
+ }
+ memcpy(*oldSnssai, snssaiDb, sizeof(Snssai));
+ }
+ }
+ return ROK;
+}
/******************************************************************
*
* @brief Fills RlcBearerCfg structure
if(ret == ROK)
rlcUeCfg->numLcs++;
else
- memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
+ memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
}
else
{
/* MOD */
ueCfgDb->rlcLcCfg[dbIdx].configType = CONFIG_MOD; /* update Db for MOD type */
memcpy(&rlcUeCfg->rlcLcCfg[dbIdx], &ueCfgDb->rlcLcCfg[dbIdx], sizeof(RlcBearerCfg));
+ fillSnssaiInfo(rlcUeCfg->rlcLcCfg[dbIdx].snssai, ueCfgDb->rlcLcCfg[dbIdx].snssai,\
+ &duRlcDb->rlcLcCfg[lcIdx].snssai,false);
}
}
else
{
/* ADD/ DEL Config Type */
memcpy(&rlcUeCfg->rlcLcCfg[dbIdx], &ueCfgDb->rlcLcCfg[dbIdx], sizeof(RlcBearerCfg));
+ fillSnssaiInfo(rlcUeCfg->rlcLcCfg[dbIdx].snssai, ueCfgDb->rlcLcCfg[dbIdx].snssai, NULL, false);
}
rlcUeCfg->numLcs++;
}
lcCfg->lcId = f1UeDbLcCfg->lcId;
lcCfg->lcType = f1UeDbLcCfg->lcType;
lcCfg->rlcMode = f1UeDbLcCfg->rlcMode;
+
switch(lcCfg->rlcMode)
{
case RLC_AM :
- {
- if(!lcCfg->u.amCfg)
- {
- DU_ALLOC_SHRABL_BUF(lcCfg->u.amCfg, sizeof(AmBearerCfg));
+ {
if(!lcCfg->u.amCfg)
- return RFAILED;
- }
- /* DL AM */
- lcCfg->u.amCfg->dlAmCfg.snLenDl = f1UeDbLcCfg->u.amCfg->dlAmCfg.snLenDl;
- lcCfg->u.amCfg->dlAmCfg.pollRetxTmr = f1UeDbLcCfg->u.amCfg->dlAmCfg.pollRetxTmr;
- lcCfg->u.amCfg->dlAmCfg.pollPdu = f1UeDbLcCfg->u.amCfg->dlAmCfg.pollPdu;
- lcCfg->u.amCfg->dlAmCfg.pollByte = f1UeDbLcCfg->u.amCfg->dlAmCfg.pollByte;
- lcCfg->u.amCfg->dlAmCfg.maxRetxTh = f1UeDbLcCfg->u.amCfg->dlAmCfg.maxRetxTh;
-
- /* UL AM */
- lcCfg->u.amCfg->ulAmCfg.snLenUl = f1UeDbLcCfg->u.amCfg->ulAmCfg.snLenUl;
- lcCfg->u.amCfg->ulAmCfg.reAssemTmr = f1UeDbLcCfg->u.amCfg->ulAmCfg.reAssemTmr;
- lcCfg->u.amCfg->ulAmCfg.statProhTmr = f1UeDbLcCfg->u.amCfg->ulAmCfg.statProhTmr;
- break;
- }
+ {
+ DU_ALLOC_SHRABL_BUF(lcCfg->u.amCfg, sizeof(AmBearerCfg));
+ if(!lcCfg->u.amCfg)
+ return RFAILED;
+ }
+ /* DL AM */
+ lcCfg->u.amCfg->dlAmCfg.snLenDl = f1UeDbLcCfg->u.amCfg->dlAmCfg.snLenDl;
+ lcCfg->u.amCfg->dlAmCfg.pollRetxTmr = f1UeDbLcCfg->u.amCfg->dlAmCfg.pollRetxTmr;
+ lcCfg->u.amCfg->dlAmCfg.pollPdu = f1UeDbLcCfg->u.amCfg->dlAmCfg.pollPdu;
+ lcCfg->u.amCfg->dlAmCfg.pollByte = f1UeDbLcCfg->u.amCfg->dlAmCfg.pollByte;
+ lcCfg->u.amCfg->dlAmCfg.maxRetxTh = f1UeDbLcCfg->u.amCfg->dlAmCfg.maxRetxTh;
+
+ /* UL AM */
+ lcCfg->u.amCfg->ulAmCfg.snLenUl = f1UeDbLcCfg->u.amCfg->ulAmCfg.snLenUl;
+ lcCfg->u.amCfg->ulAmCfg.reAssemTmr = f1UeDbLcCfg->u.amCfg->ulAmCfg.reAssemTmr;
+ lcCfg->u.amCfg->ulAmCfg.statProhTmr = f1UeDbLcCfg->u.amCfg->ulAmCfg.statProhTmr;
+ break;
+ }
case RLC_UM_BI_DIRECTIONAL :
- {
- if(!lcCfg->u.umBiDirCfg)
- {
- DU_ALLOC_SHRABL_BUF(lcCfg->u.umBiDirCfg, sizeof(UmBiDirBearerCfg));
- if(!lcCfg->u.umBiDirCfg)
- return RFAILED;
+ {
+ if(!lcCfg->u.umBiDirCfg)
+ {
+ DU_ALLOC_SHRABL_BUF(lcCfg->u.umBiDirCfg, sizeof(UmBiDirBearerCfg));
+ if(!lcCfg->u.umBiDirCfg)
+ return RFAILED;
+ }
+ /* UL UM BI DIR INFO */
+ lcCfg->u.umBiDirCfg->ulUmCfg.snLenUlUm = f1UeDbLcCfg->u.umBiDirCfg->ulUmCfg.snLenUlUm;
+ lcCfg->u.umBiDirCfg->ulUmCfg.reAssemTmr = f1UeDbLcCfg->u.umBiDirCfg->ulUmCfg.reAssemTmr;
+ /* DL UM BI DIR INFO */
+ lcCfg->u.umBiDirCfg->dlUmCfg.snLenDlUm = f1UeDbLcCfg->u.umBiDirCfg->dlUmCfg.snLenDlUm;
+ break;
}
- /* UL UM BI DIR INFO */
- lcCfg->u.umBiDirCfg->ulUmCfg.snLenUlUm = f1UeDbLcCfg->u.umBiDirCfg->ulUmCfg.snLenUlUm;
- lcCfg->u.umBiDirCfg->ulUmCfg.reAssemTmr = f1UeDbLcCfg->u.umBiDirCfg->ulUmCfg.reAssemTmr;
- /* DL UM BI DIR INFO */
- lcCfg->u.umBiDirCfg->dlUmCfg.snLenDlUm = f1UeDbLcCfg->u.umBiDirCfg->dlUmCfg.snLenDlUm;
- break;
- }
case RLC_UM_UNI_DIRECTIONAL_UL :
- {
- if(!lcCfg->u.umUniDirUlCfg)
- {
- DU_ALLOC_SHRABL_BUF(lcCfg->u.umUniDirUlCfg, sizeof(UmUniDirUlBearerCfg));
- if(!lcCfg->u.umUniDirUlCfg)
- return RFAILED;
- }
- lcCfg->u.umUniDirUlCfg->ulUmCfg.snLenUlUm = f1UeDbLcCfg->u.umUniDirUlCfg->ulUmCfg.snLenUlUm;
- lcCfg->u.umUniDirUlCfg->ulUmCfg.reAssemTmr = f1UeDbLcCfg->u.umUniDirUlCfg->ulUmCfg.reAssemTmr;
- break;
+ {
+ if(!lcCfg->u.umUniDirUlCfg)
+ {
+ DU_ALLOC_SHRABL_BUF(lcCfg->u.umUniDirUlCfg, sizeof(UmUniDirUlBearerCfg));
+ if(!lcCfg->u.umUniDirUlCfg)
+ return RFAILED;
+ }
+ lcCfg->u.umUniDirUlCfg->ulUmCfg.snLenUlUm = f1UeDbLcCfg->u.umUniDirUlCfg->ulUmCfg.snLenUlUm;
+ lcCfg->u.umUniDirUlCfg->ulUmCfg.reAssemTmr = f1UeDbLcCfg->u.umUniDirUlCfg->ulUmCfg.reAssemTmr;
+ break;
- }
+ }
case RLC_UM_UNI_DIRECTIONAL_DL :
- {
- if(!lcCfg->u.umUniDirDlCfg)
- {
- DU_ALLOC_SHRABL_BUF(lcCfg->u.umUniDirDlCfg, sizeof(UmUniDirDlBearerCfg));
- if(!lcCfg->u.umUniDirDlCfg)
- return RFAILED;
+ {
+ if(!lcCfg->u.umUniDirDlCfg)
+ {
+ DU_ALLOC_SHRABL_BUF(lcCfg->u.umUniDirDlCfg, sizeof(UmUniDirDlBearerCfg));
+ if(!lcCfg->u.umUniDirDlCfg)
+ return RFAILED;
+ }
+ lcCfg->u.umUniDirDlCfg->dlUmCfg.snLenDlUm = f1UeDbLcCfg->u.umUniDirDlCfg->dlUmCfg.snLenDlUm;
+ break;
}
- lcCfg->u.umUniDirDlCfg->dlUmCfg.snLenDlUm = f1UeDbLcCfg->u.umUniDirDlCfg->dlUmCfg.snLenDlUm;
- break;
- }
default:
DU_LOG("\nERROR --> DU_APP: Invalid Rlc Mode %d at fillRlcCfgToAddMod()", lcCfg->rlcMode);
- return RFAILED;
+ return RFAILED;
}
return ROK;
}
numLcs = rlcUeCfg->numLcs;
for(lcIdx = 0; lcIdx < numLcs; lcIdx++)
{
- if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].lcId == rlcUeCfg->rlcLcCfg[lcIdx].lcId)
- {
- if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].configType == CONFIG_MOD)
- {
- ret = fillRlcCfgToAddMod(&rlcUeCfg->rlcLcCfg[lcIdx], &f1UeDb->duUeCfg.rlcLcCfg[dbIdx]);
- }
- else if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].configType == CONFIG_DEL)
- {
- /* Free memory at matched lcIdx index */
- freeRlcLcCfg(&rlcUeCfg->rlcLcCfg[lcIdx]);
- rlcUeCfg->numLcs--;
- for(lcDelIdx = lcIdx; lcDelIdx < rlcUeCfg->numLcs; lcDelIdx++)
- {
- ret = fillRlcCfgToAddMod(&rlcUeCfg->rlcLcCfg[lcDelIdx], &rlcUeCfg->rlcLcCfg[lcDelIdx+1]);
- freeRlcLcCfg(&rlcUeCfg->rlcLcCfg[lcDelIdx+1]);
- if(ret == RFAILED)
- {
+ if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].lcId == rlcUeCfg->rlcLcCfg[lcIdx].lcId)
+ {
+ if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].configType == CONFIG_MOD)
+ {
+ ret = fillRlcCfgToAddMod(&rlcUeCfg->rlcLcCfg[lcIdx], &f1UeDb->duUeCfg.rlcLcCfg[dbIdx]);
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU APP : Failed to modify LC at Idx %d in duUpdateRlcCfg()", lcDelIdx);
+ break;
+ }
+ fillSnssaiInfo(NULL, f1UeDb->duUeCfg.rlcLcCfg[dbIdx].snssai, &rlcUeCfg->rlcLcCfg[lcIdx].snssai, true);
+ }
+ else if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].configType == CONFIG_DEL)
+ {
+ /* Free memory at matched lcIdx index */
+ freeRlcLcCfg(&rlcUeCfg->rlcLcCfg[lcIdx]);
+ rlcUeCfg->numLcs--;
+ for(lcDelIdx = lcIdx; lcDelIdx < rlcUeCfg->numLcs; lcDelIdx++)
+ {
+ ret = fillRlcCfgToAddMod(&rlcUeCfg->rlcLcCfg[lcDelIdx], &rlcUeCfg->rlcLcCfg[lcDelIdx+1]);
+ fillSnssaiInfo(NULL, rlcUeCfg->rlcLcCfg[lcDelIdx+1].snssai, &rlcUeCfg->rlcLcCfg[lcDelIdx].snssai,\
+ true);
+ freeRlcLcCfg(&rlcUeCfg->rlcLcCfg[lcDelIdx+1]);
+ if(ret == RFAILED)
+ {
DU_LOG("\nERROR --> DU APP : Failed to delete LC at Idx %d in duUpdateRlcCfg()", lcDelIdx);
- break;
- }
- }
- }
- }
+ break;
+ }
+ }
+ }
+ }
}
if(f1UeDb->duUeCfg.rlcLcCfg[dbIdx].configType == CONFIG_ADD)
{
- ret = fillRlcCfgToAddMod(&rlcUeCfg->rlcLcCfg[lcIdx], &f1UeDb->duUeCfg.rlcLcCfg[dbIdx]);
- if(ret == ROK)
- rlcUeCfg->numLcs++;
+ ret = fillRlcCfgToAddMod(&rlcUeCfg->rlcLcCfg[lcIdx], &f1UeDb->duUeCfg.rlcLcCfg[dbIdx]);
+ if(ret == ROK)
+ {
+ fillSnssaiInfo(NULL, f1UeDb->duUeCfg.rlcLcCfg[dbIdx].snssai, &rlcUeCfg->rlcLcCfg[ rlcUeCfg->numLcs].snssai,\
+ true);
+ rlcUeCfg->numLcs++;
+ }
}
}
return ret;
}
-
/*******************************************************************
*
* @brief Function to fill Tunnel Config to Add/Mod
break;
}
}
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->snssai, sizeof(Snssai));
}
memset(ueCfg, 0, sizeof(RlcUeCfg));
}
void freeF1UeDb(F1UeContextSetupDb *f1UeDb);
uint8_t sendUeDeleteReqToMac(uint16_t cellId, uint8_t ueId, uint16_t crnti);
uint8_t sendUeDeleteReqToRlc(uint16_t cellId, uint8_t ueId);
+uint8_t fetchLcId(uint8_t drbId);
#endif
/**********************************************************************