DU_LOG("\nERROR --> RLC_DL : deletion Failed due to[%d]",
entCfgCfm->status.reason);
}
+ else
+ {
+ DU_LOG("\nDEBUG --> RLC_DL: UE information is deleted for UEIdx[%d] and CellId[%d]",\
+ cfg->ueId, cfg->cellId);
+ }
break;
}
case CKW_CFG_DELETE_CELL:
if(tRlcCb->u.ulCb->rlcUlUdxEventType == EVENT_RLC_UE_CREATE_REQ)
{
FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_CREATE_RSP);
+ SendRlcUeCfgRspToDu(&rspPst, cfgCfm);
}
else if(tRlcCb->u.ulCb->rlcUlUdxEventType == EVENT_RLC_UE_RECONFIG_REQ)
{
FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_RECONFIG_RSP);
+ SendRlcUeCfgRspToDu(&rspPst, cfgCfm);
+ }
+ else if (tRlcCb->u.ulCb->rlcUlUdxEventType == EVENT_RLC_UE_DELETE_REQ)
+ {
+ FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_DELETE_RSP);
+ if(sendRlcUeDeleteRspToDu(cfgCfm->ueId, cfgCfm->cellId, SUCCESSFUL) != ROK)
+ {
+ DU_LOG("ERROR --> RLC_UL: rlcUlUdxCfgCfm(): Failed to send UE delete response ");
+ return RFAILED;
+ }
}
- SendRlcUeRspToDu(&rspPst, cfgCfm);
/* free the memory from DL */
RLC_FREE_SHRABL_BUF(pst->region,
rlcCfgApplyDelUlUe(gCb, cfgTmpData);
RLC_MEM_CPY(entCfgCfm,
&cfgTmpData->cfgEntData[idx].entUlCfgCfm,
- sizeof(RlcEntCfgCfmInfo));
+ sizeof(RlcEntCfgCfmInfo));
}
else
{
ret = unpackRlcUeReconfigReq(RlcProcUeReconfigReq, pst, mBuf);
break;
}
+ case EVENT_RLC_UE_DELETE_REQ:
+ {
+ ret = unpackRlcUeDeleteReq(RlcProcUeDeleteReq, pst, mBuf);
+ break;
+ }
case LKW_EVT_STS_REQ:
{
* -# RFAILED
*
*************************************************************/
-uint8_t SendRlcUeRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp)
+uint8_t SendRlcUeCfgRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp)
{
/* jump to specific primitive depending on configured selector */
uint8_t ret = ROK;
ret = (*rlcUeCfgRspOpts[pst->selector])(pst, ueRsp);
if(ret)
{
- DU_LOG("\nERROR --> RLC: Failed at SendRlcUeRspToDu()");
+ DU_LOG("\nERROR --> RLC: Failed at SendRlcUeCfgRspToDu()");
RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeCfgRsp));
}
}
}
}
return ret;
-} /* end of SendRlcUeRspToDu */
+} /* end of SendRlcUeCfgRspToDu */
/**********************************************************************
End of file
/* This file stores defines used at RLC interface */
uint8_t fillRlcUeCfgRsp(RlcUeCfgRsp *rlcCfgRsp, RlcCfgCfmInfo *rlcCRsp);
-uint8_t SendRlcUeRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp);
+uint8_t SendRlcUeCfgRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp);
+uint8_t sendRlcUeDeleteRspToDu(uint8_t ueIdx, uint16_t cellId, UeDeleteResult result);
/**********************************************************************
End of file
#include "du_app_rlc_inf.h"
#include "rlc_utils.h"
#include "rlc_upr_inf_api.h"
+
/*******************************************************************
*
* @brief Fills RLC UL UE Cfg Rsp from RlcCRsp
RLC_SHRABL_STATIC_BUF_FREE(pst->region, pst->pool, dlDataMsgInfo, sizeof(RlcDlUserDataInfo));
return ROK;
}
+
+/*******************************************************************
+ *
+ * @brief sending UE delete response to DU
+ *
+ * @details
+ *
+ * Function : sendRlcUeDeleteRspToDu
+ *
+ * Functionality:
+ * sending UE delete response to DU
+ *
+ * @params[in] uint8_t ueIdx, uint8_t cellId, UeDeleteResult result
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t sendRlcUeDeleteRspToDu(uint8_t ueIdx, uint16_t cellId, UeDeleteResult result)
+{
+ Pst pst;
+ RlcUeDeleteRsp *ueDeleteRsp = NULLP;
+
+ FILL_PST_RLC_TO_DUAPP(pst, RLC_UL_INST, EVENT_RLC_UE_DELETE_RSP);
+
+ RLC_ALLOC_SHRABL_BUF(pst.region, pst.pool, ueDeleteRsp, sizeof(RlcUeDeleteRsp));
+ if(!ueDeleteRsp)
+ {
+ DU_LOG("\nERROR --> RLC: sendRlcUeDeleteRspToDu(): Memory allocation failed ");
+ return RFAILED;
+ }
+ else
+ {
+ ueDeleteRsp->cellId = cellId;
+ ueDeleteRsp->ueIdx = ueIdx;
+ ueDeleteRsp->result = result;
+
+ if(rlcSendUeDeleteRspToDu(&pst, ueDeleteRsp) == ROK)
+ {
+ DU_LOG("\nDEBUG --> RLC: UE Delete response send successfully");
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: SendRlcUeDeleteRspToDu():Failed to send UE Delete response to DU");
+ RLC_FREE_SHRABL_BUF(pst.region, pst.pool, ueDeleteRsp, sizeof(RlcUeDeleteRsp));
+ return RFAILED;
+ }
+ }
+ return ROK;
+}
+
+/* ****************************************************************
+*
+* @brief filling RLC UE delete configuration
+*
+* @details
+*
+* Function : fillRlcCfgInfo
+*
+* Functionality: filling RLC UE delete configuration
+*
+* @params[in] RlcUlUeCb *ueCb, RlcCfgInfo *rlcUeCfg
+*
+* @return void
+*
+* ****************************************************************/
+
+void fillRlcUeDelInfo(RlcUlUeCb *ueCb, RlcCfgInfo *rlcUeCfg)
+{
+ uint8_t lcIdx;
+
+ rlcUeCfg->ueId = ueCb->ueId;
+ rlcUeCfg->cellId = ueCb->cellId;
+ rlcUeCfg->numEnt = 0;
+ for(lcIdx=0; lcIdx<RLC_MAX_LCH_PER_UE && rlcUeCfg->numEnt < 1; lcIdx++)
+ {
+ if(ueCb->lCh[lcIdx].ulRbCb != NULLP)
+ {
+ rlcUeCfg->entCfg[rlcUeCfg->numEnt].rbId = 0;
+ rlcUeCfg->entCfg[rlcUeCfg->numEnt].rbType = 0;
+ rlcUeCfg->entCfg[rlcUeCfg->numEnt].cfgType = CKW_CFG_DELETE_UE;
+ rlcUeCfg->numEnt++;
+ }
+ }
+}
+
+/*******************************************************************
+*
+* @brief Handles Ue delete Request from DU APP
+*
+* @details
+*
+* Function : RlcProcUeDeleteReq
+*
+* Functionality:
+* Handles Ue delete Request from DU APP
+*
+* @params[in] Post structure pointer
+* RlcUeDelete pointer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t RlcProcUeDeleteReq(Pst *pst, RlcUeDelete *ueDelete)
+{
+ uint8_t ret = ROK;
+ RlcCb *gRlcCb = NULLP;
+ RlcCfgInfo *rlcUeCfg = NULLP;
+ RlcUlUeCb *ueCb = NULLP;
+ UeDeleteResult result=SUCCESSFUL;
+
+ DU_LOG("\nDEBUG --> RLC: UE Delete request received. CellID[%d] UEIDX[%d]",ueDelete->cellId, ueDelete->ueIdx);
+
+ if(ueDelete != NULLP)
+ {
+ gRlcCb = RLC_GET_RLCCB(pst->dstInst);
+ rlcDbmFetchUlUeCb(gRlcCb,ueDelete->ueIdx, ueDelete->cellId, &ueCb);
+ if(ueCb != NULLP)
+ {
+ if(ueDelete->cellId == ueCb->cellId)
+ {
+ RLC_ALLOC(gRlcCb, rlcUeCfg, sizeof(RlcCfgInfo));
+ if(rlcUeCfg == NULLP)
+ {
+ DU_LOG("\nERROR --> RLC: deleteRlcUeCb(): Failed to allocate memory");
+ ret = RFAILED;
+ }
+ else
+ {
+ memset(rlcUeCfg, 0, sizeof(RlcCfgInfo));
+ fillRlcUeDelInfo(ueCb, rlcUeCfg);
+ if(RlcProcCfgReq(pst, rlcUeCfg) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC: deleteRlcUeCb(): Failed to delete UE information");
+ result = INVALID_UEID;
+ }
+ }
+ }
+ else
+ {
+ result = INVALID_CELLID;
+ }
+ }
+ else
+ {
+ result = INVALID_UEID;
+ }
+
+ if(result != SUCCESSFUL)
+ {
+ ret = sendRlcUeDeleteRspToDu(ueDelete->ueIdx, ueDelete->cellId, result);
+ if(ret != ROK)
+ {
+ DU_LOG("\nERROR --> RLC: RlcProcUeDeleteReq():Failed to send UE Delete response to DU");
+ }
+ }
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueDelete, sizeof(RlcUeDelete));
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: RlcProcUeDeleteReq(): Recieved NULL pointer UE Delete ");
+ ret = RFAILED;
+ }
+ return ret;
+}
+
/**********************************************************************
End of file
**********************************************************************/
packRlcUlUserDataToDu /* 2 - Light weight loosely coupled */
};
+RlcDuUeDeleteRsp rlcUeDeleteRspOpts[] =
+{
+ packRlcDuUeDeleteRsp, /* 0 - loosely coupled */
+ DuProcRlcUeDeleteRsp, /* 1 - tightly coupled */
+ packRlcDuUeDeleteRsp /* 2 - LWLC loosely coupled */
+};
+
/*******************************************************************
*
* @brief Sends UL RRC Message Info to DU APP
{
return (*rlcSendRrcDeliveryReportToDuOpts[pst->selector])(pst, rrcDelivery);
}
-
/*******************************************************************
*
* @brief Sends DL RRC Message Status to DU APP
return (*rlcSendUlUserDataToDuOpts[pst->selector])(pst, ulUserData);
}
+/*******************************************************************
+ *
+ * @brief Sends Ue Delete Rsp to DU APP
+ *
+ * @details
+ *
+ * Function : rlcSendUeDeleteRspToDu
+ *
+ * Functionality: Sends Ue Delete Rsp to DU APP
+ *
+ * @params[in] Pst *pst, RlcUeDeleteRsp *ueDeleteRsp
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t rlcSendUeDeleteRspToDu(Pst *pst, RlcUeDeleteRsp *ueDeleteRsp)
+{
+ return (*rlcUeDeleteRspOpts[pst->selector])(pst, ueDeleteRsp);
+}
+
/**********************************************************************
End of file
**********************************************************************/
uint8_t rlcSendRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDelivery);
uint8_t rlcSendDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp);
uint8_t rlcSendUlUserDataToDu(Pst *pst, RlcUlUserDatInfo *ulUserData);
-
+uint8_t rlcSendUeDeleteRspToDu(Pst *pst, RlcUeDeleteRsp *ueDeleteRsp);
/**********************************************************************
End of file
**********************************************************************/
return RFAILED;
}
+
+/*******************************************************************
+*
+* @brief Packs and Sends UE Delete Request from DUAPP to RLC
+*
+* @details
+*
+* Function : packDuRlcUeDeleteReq
+*
+* Functionality:
+* Packs and Sends UE Delete Request from DUAPP to RLC
+*
+*
+* @params[in] Post structure pointer
+* RlcUeDelete pointer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packDuRlcUeDeleteReq(Pst *pst, RlcUeDelete *ueDelete)
+{
+ Buffer *mBuf = NULLP;
+
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeDeleteReq");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)ueDelete, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeDeleteReq");
+ return RFAILED;
+ }
+
+ return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+* @brief Unpacks UE Delete Request received from DU APP
+*
+* @details
+*
+* Function : unpackRlcUeDeleteReq
+*
+* Functionality:
+* Unpacks UE Delete Request received from DU APP
+*
+* @params[in] Pointer to Handler
+* Post structure pointer
+* Message Buffer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcUeDeleteReq(DuRlcUeDeleteReq func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ RlcUeDelete *ueDelete;
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDelete, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, ueDelete);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Delete Request ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+ return RFAILED;
+}
+
+/*******************************************************************
+*
+* @brief Packs and Sends UE Del Response from RLC to DUAPP
+*
+* @details
+*
+* Function : packRlcDuUeDeleteRsp
+*
+* Functionality:
+* Packs and Sends UE Del Response from RLC to DUAPP
+*
+*
+* @params[in] Post structure pointer
+* RlcUeDeleteRsp *ueDelRsp
+*
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packRlcDuUeDeleteRsp(Pst *pst, RlcUeDeleteRsp *ueDelRsp)
+{
+ Buffer *mBuf = NULLP;
+
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeDeleteRsp");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)ueDelRsp, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeDeleteRsp");
+ return RFAILED;
+ }
+
+ return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+*
+* @brief Unpacks UE Del Response received from DU APP
+*
+* @details
+*
+* Function : unpackRlcUeDeleteRsp
+*
+* Functionality:
+* Unpacks UE Del Response received from DU APP
+*
+* @params[in] Pointer to Handler
+* Post structure pointer
+* Message Buffer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcUeDeleteRsp(RlcDuUeDeleteRsp func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ RlcUeDeleteRsp *ueDeleteRsp = NULLP;
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDeleteRsp, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, ueDeleteRsp);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Del Response ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+
+ return RFAILED;
+}
+
/**********************************************************************
End of file
***********************************************************************/
#define EVENT_DL_RRC_MSG_RSP_TO_DU 217
#define EVENT_DL_USER_DATA_TRANS_TO_RLC 218
#define EVENT_UL_USER_DATA_TRANS_TO_DU 219
-
+#define EVENT_RLC_UE_DELETE_REQ 220
+#define EVENT_RLC_UE_DELETE_RSP 221
#define RB_ID_SRB 0
#define RB_ID_DRB 1
RLC_CFG_REAS_INVALID_RGUSAP /*!< Invalid RGU SAP ID */
}FailureReason;
+typedef enum
+{
+ SUCCESSFUL , /*!< No Failure */
+ INVALID_CELLID , /*!< CellId not present */
+ INVALID_UEID , /*!< UEId not present */
+}UeDeleteResult;
+
typedef enum
{
RLC_AM, //Acknowledged Mode
int16_t pollPdu; /* Used to trigger a poll for every pollPdu.*/
int32_t pollByte; /* Poll_Byte in bytes. */
uint8_t maxRetxTh; /* Max_Retx_Threshold */
-
+
}DlAmCfg;
typedef struct dlUmCfg
FailureReason reason;
}RlcUeCfgRsp;
+typedef struct rlcUeDelete
+{
+ uint16_t cellId;
+ uint8_t ueIdx;
+}RlcUeDelete;
+
+typedef struct rlcUeDeleteRsp
+{
+ uint16_t cellId;
+ uint8_t ueIdx;
+ UeDeleteResult result;
+}RlcUeDeleteRsp;
+
/* UL RRC Message from RLC to DU APP */
typedef struct ulRrcMsgInfo
{
Pst *pst,
RlcUeCfgRsp *ueCfgRsp));
+/* UE Delete Response from RLC to DU APP*/
+typedef uint8_t (*RlcDuUeDeleteRsp) ARGS((
+ Pst *pst,
+ RlcUeDeleteRsp *ueDelRsp));
+
/* UL RRC Message from RLC to DU APP */
typedef uint8_t (*RlcUlRrcMsgToDuFunc) ARGS((
Pst *pst,
Pst *pst,
RrcDeliveryReport *rrcDeliveryReport));
+/* UE Reconfig Request from DU APP to RLC */
typedef uint8_t (*DuRlcUeReconfigReq) ARGS((
Pst *pst,
RlcUeCfg *ueCfg ));
+/* UE Delete Request from DU APP to RLC */
+typedef uint8_t (*DuRlcUeDeleteReq) ARGS((
+ Pst *pst,
+ RlcUeDelete *ueDelete));
+
/* DL RRC Message from RLC to DU APP */
typedef uint8_t (*RlcDlRrcMsgRspToDuFunc) ARGS((
Pst *pst,
uint8_t unpackRlcUlUserDataToDu(RlcUlUserDataToDuFunc func, Pst *pst, Buffer *mBuf);
uint8_t packRlcDlUserDataToRlc(Pst *pst, RlcDlUserDataInfo *dlDataMsg);
uint8_t unpackRlcDlUserDataToRlc(DuRlcDlUserDataToRlcFunc func, Pst *pst, Buffer *mBuf);
+uint8_t packDuRlcUeDeleteReq(Pst *pst, RlcUeDelete *ueDelete);
+uint8_t unpackRlcUeDeleteReq(DuRlcUeDeleteReq func, Pst *pst, Buffer *mBuf);
+uint8_t packRlcDuUeDeleteRsp(Pst *pst, RlcUeDeleteRsp *ueDeleteRsp);
+uint8_t unpackRlcUeDeleteRsp(RlcDuUeDeleteRsp func, Pst *pst, Buffer *mBuf);
/* Event Handler function declarations */
uint8_t RlcProcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
uint8_t DuProcRlcDlRrcMsgRsp(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsg);
uint8_t DuProcRlcUlUserDataTrans(Pst *pst, RlcUlUserDatInfo *ulUserData);
uint8_t RlcProcDlUserDataTransfer(Pst *pst, RlcDlUserDataInfo *dlDataMsgInfo);
-
+uint8_t RlcProcUeDeleteReq(Pst *pst, RlcUeDelete *ueDelete);
+uint8_t DuProcRlcUeDeleteRsp(Pst *pst, RlcUeDeleteRsp *delRsp);
#endif /* RLC_INF_H */
/**********************************************************************
uint8_t duBuildAndSendUeContextModReq(uint16_t cellId, uint16_t crnti, DuUeCfg *duUeCfg);
uint8_t BuildAndSendUeContextReleaseReq(uint16_t cellId, uint8_t ueIdx);
uint8_t BuildAndSendUeContextReleaseComplete(uint32_t gnbCuUeF1apId, uint32_t gnbDuUeF1apId);
+uint8_t duProcUeDeleteReq(uint16_t cellId, uint16_t crnti);
/**********************************************************************
End of file
**********************************************************************/
switch(pst->srcEnt)
{
case ENTDUAPP:
- {
- switch(pst->event)
- {
- case EVTCFG:
- {
- DU_LOG("\n****** Received initial configs at DU APP ******\n");
- duProcCfgComplete();
- ODU_PUT_MSG_BUF(mBuf);
- break;
- }
- default:
- {
- DU_LOG("\nERROR --> DU_APP : Invalid event received at duActvTsk from ENTDUAPP");
- ODU_PUT_MSG_BUF(mBuf);
- ret = RFAILED;
- }
- }
+ {
+ switch(pst->event)
+ {
+ case EVTCFG:
+ {
+ DU_LOG("\n****** Received initial configs at DU APP ******\n");
+ duProcCfgComplete();
+ ODU_PUT_MSG_BUF(mBuf);
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> DU_APP : Invalid event received at duActvTsk from ENTDUAPP");
+ ODU_PUT_MSG_BUF(mBuf);
+ ret = RFAILED;
+ }
+ }
- break;
- }
+ break;
+ }
case ENTRLC:
- {
- switch(pst->event)
- {
- case LKW_EVT_CFG_CFM:
- {
- ret = unpackRlcConfigCfm(DuHdlRlcCfgComplete, pst, mBuf);
- break;
- }
- case LKW_EVT_CNTRL_CFM:
- {
- ret = cmUnpkLkwCntrlCfm(duHdlRlcCntrlCfgComplete, pst, mBuf);
- break;
- }
- case LKW_EVT_STA_IND:
- {
- break;
- }
- case EVENT_RLC_UE_CREATE_RSP:
- {
- ret = unpackRlcUeCfgRsp(DuProcRlcUeCfgRsp, pst, mBuf);
- break;
- }
- case EVENT_RLC_UE_RECONFIG_RSP:
- {
- ret = unpackRlcUeCfgRsp(DuProcRlcUeCfgRsp, pst, mBuf);
- break;
- }
- case EVENT_UL_RRC_MSG_TRANS_TO_DU:
- {
- ret = unpackRlcUlRrcMsgToDu(DuProcRlcUlRrcMsgTrans, pst, mBuf);
- break;
- }
- case EVENT_RRC_DELIVERY_MSG_TRANS_TO_DU:
- {
- ret = unpackRrcDeliveryReportToDu(DuProcRlcRrcDeliveryReport, pst, mBuf);
- break;
- }
- case EVENT_DL_RRC_MSG_RSP_TO_DU:
- {
- ret = unpackRlcDlRrcMsgRspToDu(DuProcRlcDlRrcMsgRsp, pst, mBuf);
- break;
- }
- case EVENT_UL_USER_DATA_TRANS_TO_DU:
- {
- ret = unpackRlcUlUserDataToDu(DuProcRlcUlUserDataTrans, pst, mBuf);
- break;
- }
- default:
- {
- DU_LOG("\nERROR --> DU_APP : Invalid event %d received at duActvTsk from ENTRLC", \
- pst->event);
- ODU_PUT_MSG_BUF(mBuf);
- ret = RFAILED;
- }
- }
- break;
- }
+ {
+ switch(pst->event)
+ {
+ case LKW_EVT_CFG_CFM:
+ {
+ ret = unpackRlcConfigCfm(DuHdlRlcCfgComplete, pst, mBuf);
+ break;
+ }
+ case LKW_EVT_CNTRL_CFM:
+ {
+ ret = cmUnpkLkwCntrlCfm(duHdlRlcCntrlCfgComplete, pst, mBuf);
+ break;
+ }
+ case LKW_EVT_STA_IND:
+ {
+ break;
+ }
+ case EVENT_RLC_UE_CREATE_RSP:
+ {
+ ret = unpackRlcUeCfgRsp(DuProcRlcUeCfgRsp, pst, mBuf);
+ break;
+ }
+ case EVENT_RLC_UE_RECONFIG_RSP:
+ {
+ ret = unpackRlcUeCfgRsp(DuProcRlcUeCfgRsp, pst, mBuf);
+ break;
+ }
+ case EVENT_RLC_UE_DELETE_RSP:
+ {
+ ret = unpackRlcUeDeleteRsp(DuProcRlcUeDeleteRsp, pst, mBuf);
+ break;
+ }
+ case EVENT_UL_RRC_MSG_TRANS_TO_DU:
+ {
+ ret = unpackRlcUlRrcMsgToDu(DuProcRlcUlRrcMsgTrans, pst, mBuf);
+ break;
+ }
+ case EVENT_RRC_DELIVERY_MSG_TRANS_TO_DU:
+ {
+ ret = unpackRrcDeliveryReportToDu(DuProcRlcRrcDeliveryReport, pst, mBuf);
+ break;
+ }
+ case EVENT_DL_RRC_MSG_RSP_TO_DU:
+ {
+ ret = unpackRlcDlRrcMsgRspToDu(DuProcRlcDlRrcMsgRsp, pst, mBuf);
+ break;
+ }
+ case EVENT_UL_USER_DATA_TRANS_TO_DU:
+ {
+ ret = unpackRlcUlUserDataToDu(DuProcRlcUlUserDataTrans, pst, mBuf);
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> DU_APP : Invalid event %d received at duActvTsk from ENTRLC", \
+ pst->event);
+ ODU_PUT_MSG_BUF(mBuf);
+ ret = RFAILED;
+ }
+ }
+ break;
+ }
case ENTMAC:
- {
- switch(pst->event)
- {
- //Config complete
- case EVTCFG:
- {
- ODU_PUT_MSG_BUF(mBuf);
- break;
- }
- case EVTLRGCFGCFM:
- {
- ret = cmUnpkLrgCfgCfm(duHdlMacCfgComplete, pst, mBuf);
- break;
- }
- case EVTLRGCNTRLCFM:
- {
- break;
- }
- case EVTMACSCHGENCFGCFM:
- {
- ret = cmUnpkLrgSchCfgCfm(duHdlSchCfgComplete, pst, mBuf);
- break;
- }
- case EVENT_MAC_CELL_CONFIG_CFM:
- {
- ret = unpackMacCellCfgCfm(duHandleMacCellCfgCfm, pst, mBuf);
- break;
- }
- case EVENT_MAC_CELL_UP_IND:
- {
- ret = unpackMacCellUpInd(duHandleCellUpInd, pst, mBuf);
- break;
- }
- case EVENT_MAC_STOP_IND:
- {
- ret = unpackMacStopInd(duHandleStopInd, pst, mBuf);
- break;
- }
- case EVENT_MAC_UL_CCCH_IND:
- {
- ret = unpackMacUlCcchInd(duHandleUlCcchInd, pst, mBuf);
- break;
- }
- case EVENT_MAC_UE_CREATE_RSP:
- {
- ret = unpackDuMacUeCfgRsp(DuProcMacUeCfgRsp, pst, mBuf);
- break;
- }
+ {
+ switch(pst->event)
+ {
+ //Config complete
+ case EVTCFG:
+ {
+ ODU_PUT_MSG_BUF(mBuf);
+ break;
+ }
+ case EVTLRGCFGCFM:
+ {
+ ret = cmUnpkLrgCfgCfm(duHdlMacCfgComplete, pst, mBuf);
+ break;
+ }
+ case EVTLRGCNTRLCFM:
+ {
+ break;
+ }
+ case EVTMACSCHGENCFGCFM:
+ {
+ ret = cmUnpkLrgSchCfgCfm(duHdlSchCfgComplete, pst, mBuf);
+ break;
+ }
+ case EVENT_MAC_CELL_CONFIG_CFM:
+ {
+ ret = unpackMacCellCfgCfm(duHandleMacCellCfgCfm, pst, mBuf);
+ break;
+ }
+ case EVENT_MAC_CELL_UP_IND:
+ {
+ ret = unpackMacCellUpInd(duHandleCellUpInd, pst, mBuf);
+ break;
+ }
+ case EVENT_MAC_STOP_IND:
+ {
+ ret = unpackMacStopInd(duHandleStopInd, pst, mBuf);
+ break;
+ }
+ case EVENT_MAC_UL_CCCH_IND:
+ {
+ ret = unpackMacUlCcchInd(duHandleUlCcchInd, pst, mBuf);
+ break;
+ }
+ case EVENT_MAC_UE_CREATE_RSP:
+ {
+ ret = unpackDuMacUeCfgRsp(DuProcMacUeCfgRsp, pst, mBuf);
+ break;
+ }
case EVENT_MAC_UE_RECONFIG_RSP:
- {
- ret = unpackDuMacUeCfgRsp(DuProcMacUeCfgRsp, pst, mBuf);
- break;
- }
- case EVENT_MAC_UE_DELETE_RSP:
- {
- ret = unpackDuMacUeDeleteRsp(DuProcMacUeDeleteRsp, pst, mBuf);
- break;
- }
- default:
- {
- DU_LOG("\nERROR --> DU_APP : Invalid event received at duActvTsk from ENTMAC");
- ODU_PUT_MSG_BUF(mBuf);
- ret = RFAILED;
- }
- }
+ {
+ ret = unpackDuMacUeCfgRsp(DuProcMacUeCfgRsp, pst, mBuf);
+ break;
+ }
+ case EVENT_MAC_UE_DELETE_RSP:
+ {
+ ret = unpackDuMacUeDeleteRsp(DuProcMacUeDeleteRsp, pst, mBuf);
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> DU_APP : Invalid event received at duActvTsk from ENTMAC");
+ ODU_PUT_MSG_BUF(mBuf);
+ ret = RFAILED;
+ }
+ }
- break;
- }
+ break;
+ }
case ENTSCTP:
- {
- switch(pst->event)
- {
- case EVENT_CU_DATA:
- {
- F1APMsgHdlr(mBuf);
- break;
- }
- case EVENT_SCTP_NTFY:
- {
- ret = cmUnpkSctpNtfy(duSctpNtfyHdl, pst, mBuf);
- break;
- }
- case EVENT_RIC_DATA:
- {
- E2APMsgHdlr(mBuf);
- break;
- }
- default:
- {
- DU_LOG("\nERROR --> DU_APP : Invalid event received at duActvTsk from ENTSCTP");
- ret = RFAILED;
- }
+ {
+ switch(pst->event)
+ {
+ case EVENT_CU_DATA:
+ {
+ F1APMsgHdlr(mBuf);
+ break;
+ }
+ case EVENT_SCTP_NTFY:
+ {
+ ret = cmUnpkSctpNtfy(duSctpNtfyHdl, pst, mBuf);
+ break;
+ }
+ case EVENT_RIC_DATA:
+ {
+ E2APMsgHdlr(mBuf);
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> DU_APP : Invalid event received at duActvTsk from ENTSCTP");
+ ret = RFAILED;
+ }
- }
- ODU_PUT_MSG_BUF(mBuf);
- break;
- }
+ }
+ ODU_PUT_MSG_BUF(mBuf);
+ break;
+ }
case ENTEGTP:
- {
- switch(pst->event)
- {
- case EVTCFGCFM:
- {
- unpackEgtpCfgCfm(duHdlEgtpCfgComplete, mBuf);
- break;
- }
- case EVTSRVOPENCFM:
- {
- unpackEgtpSrvOpenCfm(duHdlEgtpSrvOpenComplete, mBuf);
- break;
- }
- case EVTTNLMGMTCFM:
- {
- unpackEgtpTnlMgmtCfm(duHdlEgtpTnlMgmtCfm, mBuf);
- break;
- }
- default:
- {
- DU_LOG("\nERROR --> DU_APP : Invalid event[%d] received at duActvTsk from ENTEGTP", pst->event);
- ret = RFAILED;
- }
- }
- ODU_PUT_MSG_BUF(mBuf);
- break;
- }
+ {
+ switch(pst->event)
+ {
+ case EVTCFGCFM:
+ {
+ unpackEgtpCfgCfm(duHdlEgtpCfgComplete, mBuf);
+ break;
+ }
+ case EVTSRVOPENCFM:
+ {
+ unpackEgtpSrvOpenCfm(duHdlEgtpSrvOpenComplete, mBuf);
+ break;
+ }
+ case EVTTNLMGMTCFM:
+ {
+ unpackEgtpTnlMgmtCfm(duHdlEgtpTnlMgmtCfm, mBuf);
+ break;
+ }
+ default:
+ {
+ DU_LOG("\nERROR --> DU_APP : Invalid event[%d] received at duActvTsk from ENTEGTP", pst->event);
+ ret = RFAILED;
+ }
+ }
+ ODU_PUT_MSG_BUF(mBuf);
+ break;
+ }
default:
- {
- DU_LOG("\nERROR --> DU_APP : DU APP can not process message from Entity %d", pst->srcEnt);
- ODU_PUT_MSG_BUF(mBuf);
- ret = RFAILED;
- }
+ {
+ DU_LOG("\nERROR --> DU_APP : DU APP can not process message from Entity %d", pst->srcEnt);
+ ODU_PUT_MSG_BUF(mBuf);
+ ret = RFAILED;
+ }
}
ODU_EXIT_TASK();
packDuMacUeDeleteReq /* Light weight-loose coupling */
};
+DuRlcUeDeleteReq packRlcUeDeleteReqOpts[] =
+{
+ packDuRlcUeDeleteReq, /* Loose coupling */
+ RlcProcUeDeleteReq, /* TIght coupling */
+ packDuRlcUeDeleteReq /* Light weight-loose coupling */
+};
/*******************************************************************
*
rlcUeCfg->ueIdx = ueIdx;
for(dbIdx = 0; (dbIdx < ueCfgDb->numRlcLcs && ret == ROK); dbIdx++)
{
- ret = fillDefaultRlcModeCfg(ueCfgDb->rlcLcCfg[dbIdx].rlcMode, &ueCfgDb->rlcLcCfg[dbIdx]);
- if(ret == RFAILED)
- {
- DU_LOG("\n ERROR --> DU APP : Failed to fill Rlc Mode at fillRlcUeCfg()");
- memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
- return ret;
- }
- /* Fill Rlc Ue Cfg List for ADD/MOD/DEL */
- for(lcIdx = 0; lcIdx < duRlcDb->numLcs; lcIdx++)
- {
- if(ueCfgDb->rlcLcCfg[dbIdx].lcId == duRlcDb->rlcLcCfg[lcIdx].lcId)
- {
- lcIdFound = true;
- if((ueCfgDb->rlcLcCfg[dbIdx].configType == CONFIG_UNKNOWN)||
- (ueCfgDb->rlcLcCfg[dbIdx].configType == CONFIG_MOD))
- {
- /* MOD */
- ueCfgDb->rlcLcCfg[dbIdx].configType = CONFIG_MOD; /* update Db for MOD type */
- memcpy(&rlcUeCfg->rlcLcCfg[dbIdx], &ueCfgDb->rlcLcCfg[dbIdx], sizeof(RlcBearerCfg));
- }
- }
- else
- lcIdFound = false;
- }
- if(!lcIdFound)
- {
- /* ADD/ DEL Config Type */
- memcpy(&rlcUeCfg->rlcLcCfg[dbIdx], &ueCfgDb->rlcLcCfg[dbIdx], sizeof(RlcBearerCfg));
- }
- rlcUeCfg->numLcs++;
+ ret = fillDefaultRlcModeCfg(ueCfgDb->rlcLcCfg[dbIdx].rlcMode, &ueCfgDb->rlcLcCfg[dbIdx]);
+ if(ret == RFAILED)
+ {
+ DU_LOG("\n ERROR --> DU APP : Failed to fill Rlc Mode at fillRlcUeCfg()");
+ memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
+ return ret;
+ }
+ /* Fill Rlc Ue Cfg List for ADD/MOD/DEL */
+ for(lcIdx = 0; lcIdx < duRlcDb->numLcs; lcIdx++)
+ {
+ if(ueCfgDb->rlcLcCfg[dbIdx].lcId == duRlcDb->rlcLcCfg[lcIdx].lcId)
+ {
+ lcIdFound = true;
+ if((ueCfgDb->rlcLcCfg[dbIdx].configType == CONFIG_UNKNOWN)||
+ (ueCfgDb->rlcLcCfg[dbIdx].configType == CONFIG_MOD))
+ {
+ /* MOD */
+ ueCfgDb->rlcLcCfg[dbIdx].configType = CONFIG_MOD; /* update Db for MOD type */
+ memcpy(&rlcUeCfg->rlcLcCfg[dbIdx], &ueCfgDb->rlcLcCfg[dbIdx], sizeof(RlcBearerCfg));
+ }
+ }
+ else
+ lcIdFound = false;
+ }
+ if(!lcIdFound)
+ {
+ /* ADD/ DEL Config Type */
+ memcpy(&rlcUeCfg->rlcLcCfg[dbIdx], &ueCfgDb->rlcLcCfg[dbIdx], sizeof(RlcBearerCfg));
+ }
+ rlcUeCfg->numLcs++;
}
}
return ret;
}
return ROK;
}
+
/*******************************************************************
*
* @brief Function to delete Pdsch ServCellCfg
* @return void
*
* ****************************************************************/
+
void deletePdschServCellCfg(PdschServCellCfg *pdschServCellCfg)
{
DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL,pdschServCellCfg->maxMimoLayers, sizeof(uint8_t));
* RFAILED - failure
*
*******************************************************************/
+
void deleteMacUeCfg(MacUeCfg *ueCfg)
{
uint8_t lcCfgIdx;
}
memset(ueCfg, 0, sizeof(MacUeCfg));
}
+
/*******************************************************************
*
* @brief Handle UE delete response from MAC
* RFAILED - failure
*
* ****************************************************************/
+
uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp)
{
uint16_t cellIdx=0;
}
return ROK;
}
+
+/*******************************************************************
+*
+* @brief delete RlcUeCfg from duCb
+*
+* @details
+*
+* Function : deleteDuRlcUeCfg
+*
+* Functionality:
+* delete RlcUeCfg from duCb
+*
+* @params[in] Post structure
+* Pointer to RlcUeCfg
+* @return ROK - success
+* RFAILED - failure
+*
+*****************************************************************/
+
+void deleteDuRlcUeCfg(RlcUeCfg *ueCfg)
+{
+ uint8_t lcIdx = 0;
+ RlcBearerCfg *lcCfg= NULLP;
+ if(ueCfg)
+ {
+ for(lcIdx =0 ; lcIdx < ueCfg->numLcs ; lcIdx++)
+ {
+ lcCfg = &ueCfg->rlcLcCfg[lcIdx];
+ switch(lcCfg->rlcMode)
+ {
+ case RLC_AM :
+ {
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.amCfg, sizeof(AmBearerCfg));
+ break;
+ }
+ case RLC_UM_BI_DIRECTIONAL :
+ {
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.umBiDirCfg, sizeof(UmBiDirBearerCfg));
+ break;
+ }
+ case RLC_UM_UNI_DIRECTIONAL_UL :
+ {
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.umUniDirUlCfg, sizeof(UmUniDirUlBearerCfg));
+ break;
+ }
+ case RLC_UM_UNI_DIRECTIONAL_DL :
+ {
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.umUniDirDlCfg, sizeof(UmUniDirDlBearerCfg));
+ break;
+ }
+ }
+ }
+ memset(ueCfg, 0, sizeof(RlcUeCfg));
+ }
+}
+
+/*******************************************************************
+*
+* @brief Processes UE Delete Rsp received from RLC
+*
+* @details
+*
+* Function : DuProcRlcUeDeleteRsp
+*
+* Functionality:
+* Processes UE Delete Rsp received from RLC
+*
+* @params[in] Post structure
+* Pointer to RlcUeDeleteRsp
+* @return ROK - success
+* RFAILED - failure
+*
+*****************************************************************/
+
+uint8_t DuProcRlcUeDeleteRsp(Pst *pst, RlcUeDeleteRsp *delRsp)
+{
+ uint8_t ueIdx = 0, ret = ROK;
+ uint16_t cellIdx = 0;
+ if(delRsp)
+ {
+ ueIdx = delRsp->ueIdx;
+ GET_CELL_IDX(delRsp->cellId, cellIdx);
+
+ if(delRsp->result == SUCCESSFUL)
+ {
+ DU_LOG("\nINFO --> DU_APP: RLC UE Delete Response : SUCCESS [UE IDX:%d]", ueIdx);
+ if(duCb.actvCellLst[cellIdx]!=NULLP)
+ {
+ deleteDuRlcUeCfg(&duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].rlcUeCfg);
+ }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP: RLC UE Delete Response : FAILED [UE IDX:%d]", ueIdx);
+ ret = RFAILED;
+ }
+ DU_FREE_SHRABL_BUF(pst->region, pst->pool, delRsp, sizeof(RlcUeDeleteRsp));
+
+ }
+ return ret;
+}
+
/*******************************************************************
*
* @brief Sending UE Delete Req To Mac
* Functionality:
* sending UE Delete Req To Mac
*
-* @params[in] uint8_t cellId, uint8_t ueId
+* @params[in] cellId, ueIdx, crnti
* @return ROK - success
* RFAILED - failure
*
Pst pst;
uint8_t ret=ROK;
MacUeDelete *ueDelete = NULLP;
-
+
DU_ALLOC_SHRABL_BUF(ueDelete, sizeof(MacUeDelete));
if(ueDelete)
{
}
/*******************************************************************
-*
-* @brief Du preocess Ue Delete Req to MAC and RLC
-*
-* @details
-*
-* Function : duProcUeDeleteReq
-*
-* Functionality: Du process Ue Delete Req to MAC and RLC
-*
-* @params[in] cellId, crnti
-* @return ROK - success
-* RFAILED - failure
-*
-* ****************************************************************/
+ *
+ * @brief Sending UE Delete Req To Rlc
+ *
+ * @details
+ *
+ * Function : sendUeDeleteReqToRlc
+ *
+ * Functionality:
+ * Sending UE Delete Req To Rlc
+ *
+ * @params[in] cellId, ueIdx
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ *****************************************************************/
+
+uint8_t sendUeDeleteReqToRlc(uint16_t cellId, uint8_t ueIdx)
+{
+ uint8_t ret;
+ Pst pst;
+ RlcUeDelete *ueDelete;
+
+ DU_ALLOC_SHRABL_BUF(ueDelete, sizeof(RlcUeDelete));
+ if(ueDelete !=NULLP)
+ {
+ ueDelete->cellId = cellId;
+ ueDelete->ueIdx = ueIdx;
+ FILL_PST_DUAPP_TO_RLC(pst, RLC_UL_INST, EVENT_RLC_UE_DELETE_REQ);
+
+ ret = (*packRlcUeDeleteReqOpts[pst.selector])(&pst, ueDelete);
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU_APP : sendUeDeleteReqToRlc():Failed to send UE Delete Req to RLC");
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, ueDelete, sizeof(RlcUeDelete));
+ }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP: sendUeDeleteReqToRlc():Memory allocation failed");
+ ret = RFAILED;
+ }
+ return ret;
+}
+
+/*******************************************************************
+ *
+ * @brief DU processes UE delete req from CU and sends to MAC and RLC
+ *
+ * @details
+ *
+ * Function : duProcUeDeleteReq
+ *
+ * Functionality: DU processes UE delete req from CU and sends to MAC
+ * and RLC
+ *
+ * @params[in] cellId, crnti
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
uint8_t duProcUeDeleteReq(uint16_t cellId, uint16_t crnti)
{
uint16_t cellIdx = 0;
{
if(duCb.actvCellLst[cellIdx]->ueCb[ueIdx-1].crnti == crnti)
{
+ if(sendUeDeleteReqToRlc(cellId, ueIdx) == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU APP : duProcUeDeleteReq():Failed to build UE delete req for RLC ");
+ return RFAILED;
+ }
if(sendUeDeleteReqToMac(cellId, ueIdx, crnti) == RFAILED)
{
DU_LOG("\nERROR --> DU APP : duProcUeDeleteReq(): Failed to build UE delete req for MAC ");
/**********************************************************************
End of file
- ***********************************************************************/
+***********************************************************************/