}
RLC_FREE(tRlcCb, cfgCfm, sizeof(RlcCfgCfmInfo));
}
+ else if (tRlcCb->u.ulCb->rlcUlUdxEventType == EVENT_RLC_UE_REESTABLISH_REQ)
+ {
+ if(sendRlcUeReestablishRspToDu(cfgCfm->cellId, cfgCfm->ueId, SUCCESSFUL) != ROK)
+ {
+ DU_LOG("ERROR --> RLC_UL: rlcUlUdxCfgCfm(): Failed to send UE Reestablishment response to DU ");
+ RLC_FREE(tRlcCb, cfgCfm, sizeof(RlcCfgCfmInfo));
+ return RFAILED;
+ }
+ RLC_FREE(tRlcCb, cfgCfm, sizeof(RlcCfgCfmInfo));
+ }
/* free the memory from DL */
RLC_FREE_SHRABL_BUF(pst->region, pst->pool, cfmInfo, sizeof(RlcCfgCfmInfo));
uint8_t fillRlcUeCfgRsp(RlcUeCfgRsp *rlcCfgRsp, RlcCfgCfmInfo *rlcCRsp);
uint8_t SendRlcUeCfgRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp);
uint8_t sendRlcUeDeleteRspToDu(uint16_t cellId, uint8_t ueId, CauseOfResult status);
-
+uint8_t sendRlcUeReestablishRspToDu(uint16_t cellId,uint8_t ueId, CauseOfResult status);
/**********************************************************************
End of file
**********************************************************************/
sendSlicePmToDu(sliceStats);
return ROK;
}
+
+/*******************************************************************
+ *
+ * @brief sending UE reestablishment response to DU
+ *
+ * @details
+ *
+ * Function : sendRlcUeReestablishRspToDu
+ *
+ * Functionality:
+ * sending UE reestablishment response to DU
+ *
+ * @params[in] uint8_t cellId, uint8_t ueId, CauseOfResult status
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t sendRlcUeReestablishRspToDu(uint16_t cellId,uint8_t ueId, CauseOfResult status)
+{
+ Pst pst;
+ RlcUeReestablishRsp *ueReestablishRsp = NULLP;
+
+ FILL_PST_RLC_TO_DUAPP(pst, RLC_UL_INST, EVENT_RLC_UE_REESTABLISH_RSP);
+
+ RLC_ALLOC_SHRABL_BUF(pst.region, pst.pool, ueReestablishRsp, sizeof(RlcUeReestablishRsp));
+ if(!ueReestablishRsp)
+ {
+ DU_LOG("\nERROR --> RLC: sendRlcUeReestablishRspToDu(): Memory allocation failed ");
+ return RFAILED;
+ }
+ else
+ {
+ ueReestablishRsp->cellId = cellId;
+ ueReestablishRsp->ueId = ueId;
+ ueReestablishRsp->status = status;
+
+ if(rlcSendUeReestablishRspToDu(&pst, ueReestablishRsp) == ROK)
+ {
+ DU_LOG("\nDEBUG --> RLC: UE Reestablishment response send successfully");
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: SendRlcUeReestablishRspToDu():Failed to send UE Reestablishment response to DU");
+ RLC_FREE_SHRABL_BUF(pst.region, pst.pool, ueReestablishRsp, sizeof(RlcUeReestablishRsp));
+ return RFAILED;
+ }
+ }
+ return ROK;
+}
+
+/*******************************************************************
+*
+* @brief Handles Ue reestablishment Request from DU APP
+*
+* @details
+*
+* Function : RlcProcUeReestablishReq
+*
+* Functionality:
+* Handles Ue reestablishment Request from DU APP
+*
+* @params[in] Post structure pointer
+* RlcUeReestablishReq pointer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t RlcProcUeReestablishReq(Pst *pst, RlcUeReestablishReq *ueReestablishReq)
+{
+ uint8_t ret = RFAILED;
+ RlcCb *gRlcCb = NULLP;
+ RlcUlUeCb *ueCb = NULLP;
+ CauseOfResult status =SUCCESSFUL;
+
+ if(ueReestablishReq != NULLP)
+ {
+ gRlcCb = RLC_GET_RLCCB(pst->dstInst);
+ rlcDbmFetchUlUeCb(gRlcCb,ueReestablishReq->ueId, ueReestablishReq->cellId, &ueCb);
+ if(ueCb != NULLP)
+ {
+ if(ueReestablishReq->cellId == ueCb->cellId)
+ {
+ /* TODO :
+ * Step 1: Fill the RlcCfgInfo structure with data from the ueReestablishReq, just as we did in fillRlcCfg function and set
+ * ConfigType = CONFIG_REESTABLISH
+ * Step 2: To finish processing of Ue Reestablishment, call the RlcProcCfgReq function */
+ }
+ else
+ {
+ status = CELLID_INVALID;
+ DU_LOG("\nERROR --> SCH : RlcProcUeReestablishReq(): cell Id[%d] not found", ueReestablishReq->cellId);
+ }
+ }
+ else
+ {
+ status = UEID_INVALID;
+ DU_LOG("\nERROR --> SCH : RlcProcUeReestablishReq(): ue Id[%d] not found", ueReestablishReq->cellId);
+ }
+
+ if(status != SUCCESSFUL)
+ {
+ if(sendRlcUeReestablishRspToDu(ueReestablishReq->cellId, ueReestablishReq->ueId, status) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC: RlcProcUeReestablishReq():Failed to send UE Reestablishment response to DU");
+ }
+ }
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueReestablishReq, sizeof(RlcUeDelete));
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: RlcProcUeReestablishReq(): Recieved NULL pointer UE Reestablishment ");
+ }
+ return ret;
+}
/**********************************************************************
- End of file
-**********************************************************************/
+ End of file
+ **********************************************************************/
ret = unpackRlcUeDeleteReq(RlcProcUeDeleteReq, pst, mBuf);
break;
}
+ case EVENT_RLC_UE_REESTABLISH_REQ:
+ {
+ ret = unpackRlcUeReestablishReq(RlcProcUeReestablishReq, pst, mBuf);
+ break;
+ }
case LKW_EVT_STS_REQ:
{
DuProcRlcSliceMetrics, /* 1 - tightly coupled */
packRlcDuSlicePm /* 2 - LWLC loosely coupled */
};
+
+RlcDuUeReestablishRsp rlcUeReestablishRspOpts[] =
+{
+ packRlcDuUeReestablishRsp, /* 0 - loosely coupled */
+ DuProcRlcUeReestablishRsp, /* 1 - tightly coupled */
+ packRlcDuUeReestablishRsp /* 2 - LWLC loosely coupled */
+};
+
/*******************************************************************
*
* @brief Sends UL RRC Message Info to DU APP
{
return (*rlcSlicePmOpts[pst->selector])(pst, sliceStats);
}
+
+/*******************************************************************
+ *
+ * @brief Sends Ue Reestablishment Rsp to DU APP
+ *
+ * @details
+ *
+ * Function : rlcSendUeReestablishRspToDu
+ *
+ * Functionality: Sends Ue Reestablishment Rsp to DU APP
+ *
+ * @params[in] Pst *pst, RlcUeReestablishRsp *ueReestablishRsp
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t rlcSendUeReestablishRspToDu(Pst *pst, RlcUeReestablishRsp *ueReestablishRsp)
+{
+ return (*rlcUeReestablishRspOpts[pst->selector])(pst, ueReestablishRsp);
+}
+
/**********************************************************************
End of file
**********************************************************************/
uint8_t rlcSendUlUserDataToDu(Pst *pst, RlcUlUserDatInfo *ulUserData);
uint8_t rlcSendUeDeleteRspToDu(Pst *pst, RlcUeDeleteRsp *ueDeleteRsp);
uint8_t rlcSendSlicePmToDu(Pst *pst, SlicePmList *sliceStats);
+uint8_t rlcSendUeReestablishRspToDu(Pst *pst, RlcUeReestablishRsp *ueReestablishRsp);
/**********************************************************************
End of file
**********************************************************************/
CONFIG_UNKNOWN,
CONFIG_ADD,
CONFIG_MOD,
- CONFIG_DEL
+ CONFIG_DEL,
+ CONFIG_REESTABLISH
}ConfigType;
#ifdef NR_TDD
return RFAILED;
}
+
+/*******************************************************************
+*
+* @brief Packs and Sends UE Reestablishment Req from DUAPP to RLC
+*
+* @details
+*
+* Function : packDuRlcUeReestablishReq
+*
+* Functionality:
+* Packs and Sends UE Reestablishment Req from DUAPP to RLC
+*
+*
+* @params[in] Post structure pointer
+* RlcUeReestablishReq pointer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packDuRlcUeReestablishReq(Pst *pst, RlcUeReestablishReq *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 packDuRlcUeReestablishReq");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)ueDelete, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeReestablishReq");
+ return RFAILED;
+ }
+
+ return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+* @brief Unpacks UE Reestablishment Req received from DU APP
+*
+* @details
+*
+* Function : unpackRlcUeReestablishReq
+*
+* Functionality:
+* Unpacks UE Reestablishment Req received from DU APP
+*
+* @params[in] Pointer to Handler
+* Post structure pointer
+* Message Buffer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcUeReestablishReq(DuRlcUeReestablishReq func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ RlcUeReestablishReq *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 Reestablishment Req ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+ return RFAILED;
+}
+
+/*******************************************************************
+*
+* @brief Packs and Sends UE Reestablishment Response from RLC to DUAPP
+*
+* @details
+*
+* Function : packRlcDuUeReestablishRsp
+*
+* Functionality:
+* Packs and Sends UE Reestablishment Response from RLC to DUAPP
+*
+*
+* @params[in] Post structure pointer
+* RlcUeReestablishRsp *ueReestablish
+*
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packRlcDuUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *ueReestablish)
+{
+ 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 packRlcDuUeReestablishRsp");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)ueReestablish, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeReestablishRsp");
+ return RFAILED;
+ }
+
+ return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+*
+* @brief Unpacks UE Reestablishment Response received from DU APP
+*
+* @details
+*
+* Function : unpackRlcUeReestablishRsp
+*
+* Functionality:
+* Unpacks UE Reestablishment Response received from DU APP
+*
+* @params[in] Pointer to Handler
+* Post structure pointer
+* Message Buffer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcUeReestablishRsp(RlcDuUeReestablishRsp func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ RlcUeReestablishRsp *ueReestablishRsp = NULLP;
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&ueReestablishRsp, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, ueReestablishRsp);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Reestablishment Response ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+
+ return RFAILED;
+}
/**********************************************************************
End of file
***********************************************************************/
#define EVENT_RLC_UE_DELETE_REQ 220
#define EVENT_RLC_UE_DELETE_RSP 221
#define EVENT_RLC_SLICE_PM_TO_DU 222
+#define EVENT_RLC_UE_REESTABLISH_REQ 223
+#define EVENT_RLC_UE_REESTABLISH_RSP 224
#define RB_ID_SRB 0
#define RB_ID_DRB 1
bool isLcAddModRspSent;
}RlcBearerCfg;
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.3 UE Reconfiguration */
typedef struct rlcUeRecfg
{
uint16_t cellId;
RlcBearerCfg rlcLcCfgRel[MAX_NUM_LC];
}RlcUeRecfg;
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.1 UE Create */
typedef struct rlcUeCfg
{
uint16_t cellId;
RlcBearerCfg rlcLcCfgAdd[MAX_NUM_LC];
}RlcUeCfg;
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.2 UE Create Response */
typedef struct rlcUeCfgRsp
{
uint16_t cellId;
FailureReason reason;
}RlcUeCfgRsp;
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.5 UE Delete Response */
typedef struct rlcUeDelete
{
uint16_t cellId;
uint8_t ueId;
}RlcUeDelete;
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.6 UE Delete Response */
typedef struct rlcUeDeleteRsp
{
uint16_t cellId;
CauseOfResult status;
}RlcUeDeleteRsp;
-/* UL RRC Message from RLC to DU APP */
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.8 UL RRC Message Transfer*/
typedef struct ulRrcMsgInfo
{
uint16_t cellId; /* Cell Id */
uint8_t *rrcMsg; /* RRC Message (UL-DCCH Message) */
}RlcUlRrcMsgInfo;
-/* UL User Data from RLC to DU APP */
-typedef struct ulUserDatInfo
-{
- uint16_t cellId; /* Cell Id */
- uint16_t ueId; /* UE Id */
- uint8_t rbId;
- uint16_t msgLen; /* User data length (in bytes) */
- uint8_t *userData; /* User data (UL-DTCH Message) */
-}RlcUlUserDatInfo;
-
-/* DL RRC Message from DU APP to RLC */
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.7 DL RRC Message Transfer */
typedef struct dlRrcMsgInfo
{
uint16_t cellId; /* Cell Id */
uint8_t *rrcMsg; /* RRC Message (DL-DCCH Message) */
}RlcDlRrcMsgInfo;
-/* DL RRC Message Rsp From RLC to DU APP */
+/* UL User Data from RLC to DU APP */
+typedef struct ulUserDatInfo
+{
+ uint16_t cellId; /* Cell Id */
+ uint16_t ueId; /* UE Id */
+ uint8_t rbId;
+ uint16_t msgLen; /* User data length (in bytes) */
+ uint8_t *userData; /* User data (UL-DTCH Message) */
+}RlcUlUserDatInfo;
+
+/* DL RRC Message Rsp From RLC to DU APP */
typedef struct dlRrcMsgRsp
{
uint16_t cellId; /* Cell Id */
DlMsgState state; /* Dl RRC Msg State */
}RlcDlRrcMsgRsp;
-/* RRC delivery message from RLC to DU APP */
-typedef struct rrcDeliveryStatus
-{
- uint16_t deliveryStatus;
- uint16_t triggeringMessage;
-}RrcDeliveryStatus;
-
typedef struct
{
uint32_t sd:24;
SlicePm *sliceRecord;
}SlicePmList;
-typedef struct rrcDeliveryReportInfo
-{
- uint16_t cellId;
- uint16_t ueId;
- uint8_t srbId;
- RrcDeliveryStatus rrcDeliveryStatus;
-}RrcDeliveryReport;
-
/* DL Data Message from DU APP to RLC */
typedef struct dlDataMsgInfo
{
Buffer *dlMsg; /* DL Data */
}RlcDlUserDataInfo;
+/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.9 UL RRC Message Delivery Report */
+typedef struct rrcDeliveryStatus
+{
+ uint16_t deliveryStatus;
+ uint16_t triggeringMessage;
+}RrcDeliveryStatus;
+
+typedef struct rrcDeliveryReportInfo
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ uint8_t srbId;
+ RrcDeliveryStatus rrcDeliveryStatus;
+}RrcDeliveryReport;
+
+/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.11 UE RLC Re-establishment Req */
+
+typedef struct rlcUeReestablishReq
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ uint8_t numLcsToReestablish;
+ uint8_t lcToReestablish[MAX_NUM_LC];
+}RlcUeReestablishReq;
+
+/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.12 UE RLC Re-establishment Rsp */
+typedef struct rlcUeReestablishRsp
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ CauseOfResult status;
+}RlcUeReestablishRsp;
+
/* Function Pointers */
/* UE create Request from DU APP to RLC*/
typedef uint8_t (*DuRlcUeCreateReq) ARGS((
Pst *pst,
SlicePmList *sliceStats));
+/* UE Re-establishment Request from DU APP to RLC */
+typedef uint8_t (*DuRlcUeReestablishReq) ARGS((
+ Pst *pst,
+ RlcUeReestablishReq *ueReestablishReq));
+
+/* UE Re-establishment Response from RLC to DU APP*/
+typedef uint8_t (*RlcDuUeReestablishRsp) ARGS((
+ Pst *pst,
+ RlcUeReestablishRsp *ueDelRsp));
+
/* Pack/Unpack function declarations */
uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
uint8_t unpackRlcUeCreateReq(DuRlcUeCreateReq func, Pst *pst, Buffer *mBuf);
uint8_t unpackRlcUeDeleteRsp(RlcDuUeDeleteRsp func, Pst *pst, Buffer *mBuf);
uint8_t packRlcDuSlicePm(Pst *pst, SlicePmList *sliceStats);
uint8_t unpackRlcSlicePm(RlcSlicePmToDuFunc func, Pst *pst, Buffer *mBuf);
+uint8_t packDuRlcUeReestablishReq(Pst *pst, RlcUeReestablishReq *ueReestablish);
+uint8_t unpackRlcUeReestablishReq(DuRlcUeReestablishReq func, Pst *pst, Buffer *mBuf);
+uint8_t packRlcDuUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *ueReestablishRsp);
+uint8_t unpackRlcUeReestablishRsp(RlcDuUeReestablishRsp func, Pst *pst, Buffer *mBuf);
/* Event Handler function declarations */
uint8_t RlcProcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
uint8_t RlcProcUeDeleteReq(Pst *pst, RlcUeDelete *ueDelete);
uint8_t DuProcRlcUeDeleteRsp(Pst *pst, RlcUeDeleteRsp *delRsp);
uint8_t DuProcRlcSliceMetrics(Pst *pst, SlicePmList *sliceStats);
+uint8_t RlcProcUeReestablishReq(Pst *pst, RlcUeReestablishReq *ueReestablish);
+uint8_t DuProcRlcUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *delRsp);
#endif /* RLC_INF_H */
/**********************************************************************
ret = unpackRlcSlicePm(DuProcRlcSliceMetrics, pst, mBuf);
break;
}
+ case EVENT_RLC_UE_REESTABLISH_RSP:
+ {
+ ret = unpackRlcUeReestablishRsp(DuProcRlcUeReestablishRsp, pst, mBuf);
+ break;
+ }
default:
{
DU_LOG("\nERROR --> DU_APP : Invalid event %d received at duActvTsk from ENTRLC", \
#include "CmInterface.h"
#endif
+DuRlcUeReestablishReq packRlcUeReestablishReqOpts[] =
+{
+ packDuRlcUeReestablishReq, /* Loose coupling */
+ RlcProcUeReestablishReq, /* TIght coupling */
+ packDuRlcUeReestablishReq /* Light weight-loose coupling */
+};
+
DuMacDlCcchInd packMacDlCcchIndOpts[] =
{
packMacDlCcchInd, /* Loose coupling */
}
return ret;
}
+
+/*******************************************************************
+ *
+ * @brief Sending UE Reestablishment Req To Rlc
+ *
+ * @details
+ *
+ * Function : sendUeReestablishReqToRlc
+ *
+ * Functionality:
+ * Sending UE Reestablishment Req To Rlc
+ *
+ * @params[in] cellId, ueId
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ *****************************************************************/
+
+uint8_t sendUeReestablishReqToRlc(uint16_t cellId, uint8_t ueId, uint8_t numLcToReestablish, uint8_t *lcId)
+{
+ uint8_t ret=ROK,idx=0;
+ Pst pst;
+ RlcUeReestablishReq *ueReestablish;
+
+ DU_ALLOC_SHRABL_BUF(ueReestablish, sizeof(RlcUeReestablishReq));
+ if(ueReestablish !=NULLP)
+ {
+ ueReestablish->cellId = cellId;
+ ueReestablish->ueId = ueId;
+ ueReestablish->numLcsToReestablish = numLcToReestablish;
+
+ for(idx = 0;idx<numLcToReestablish; idx++)
+ {
+ ueReestablish->lcToReestablish[idx]= lcId[idx];
+ }
+ FILL_PST_DUAPP_TO_RLC(pst, RLC_UL_INST, EVENT_RLC_UE_REESTABLISH_REQ);
+
+ ret = (*packRlcUeReestablishReqOpts[pst.selector])(&pst, ueReestablish);
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU_APP : sendUeReestablishReqToRlc():Failed to send UE Reestablishment Req to RLC");
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, ueReestablish, sizeof(RlcUeReestablishReq));
+ }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP: sendUeReestablishReqToRlc():Memory allocation failed");
+ ret = RFAILED;
+ }
+ return ret;
+}
+
+/*******************************************************************
+ *
+ * @brief DU processes UE reestablishment req and sends to MAC and RLC
+ *
+ * @details
+ *
+ * Function : duBuildAndSendUeReestablishReq
+ *
+ * Functionality: DU processes UE reestablishment req and sends to MAC
+ * and RLC
+ *
+ * @params[in] cellId, crnti, numLcToReestablish, ListOflcid
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
+uint8_t duBuildAndSendUeReestablishReq(uint16_t cellId, uint16_t crnti, uint8_t numLcToReestablish, uint8_t *lcId)
+{
+ uint8_t ueId =0;
+ uint16_t cellIdx = 0;
+
+ DU_LOG("\nDEBUG --> DU_APP: Building UE Reestablishment Request ");
+ GET_CELL_IDX(cellId, cellIdx);
+ GET_UE_ID(crnti, ueId);
+
+ if(duCb.actvCellLst[cellIdx] != NULLP)
+ {
+ if(crnti != duCb.actvCellLst[cellIdx]->ueCb[ueId - 1].crnti)
+ {
+ DU_LOG("\nERROR --> DU APP : duBuildAndSendUeReestablishReq(): CRNTI [%d] not found", crnti);
+ return RFAILED;
+ }
+
+ if(sendUeReestablishReqToRlc(cellId, ueId, numLcToReestablish, lcId) == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU APP : duBuildAndSendUeReestablishReq(): Failed to send UE reestablishment req for RLC ");
+ return RFAILED;
+ }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU APP : duBuildAndSendUeReestablishReq(): Cell Id %d is not found", cellId);
+ return RFAILED;
+ }
+
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Processes UE Reestablishment Rsp received from RLC
+ *
+ * @details
+ *
+ * Function : DuProcRlcUeReestablishRsp
+ *
+ * Functionality:
+ * Processes UE Reestablishment Rsp received from RLC
+ *
+ * @params[in] Post structure
+ * Pointer to RlcUeReestablishRsp
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * *****************************************************************/
+
+uint8_t DuProcRlcUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *ueReestablishRsp)
+{
+ uint8_t ueId = 0, ret = RFAILED;
+ uint16_t cellIdx = 0,crnti=0;
+
+ if(ueReestablishRsp)
+ {
+ ueId = ueReestablishRsp->ueId;
+ GET_CELL_IDX(ueReestablishRsp->cellId, cellIdx);
+
+ if(ueReestablishRsp->status == SUCCESSFUL)
+ {
+ if(duCb.actvCellLst[cellIdx]!=NULLP)
+ {
+ GET_CRNTI(crnti, ueId);
+ if(duCb.actvCellLst[cellIdx]->ueCb[ueId-1].crnti == crnti)
+ {
+ /*TODO: complete the processing of UE Reestablishment Response */
+ DU_LOG("\nINFO --> DU_APP: RLC UE Reestablishment Response : SUCCESS [UE IDX:%d]", ueId);
+ ret = ROK;
+ }
+ else
+ DU_LOG("\nERROR --> DU APP : duBuildAndSendUeReestablishRsp(): CRNTI [%d] not found", crnti);
+ }
+ else
+ DU_LOG("\nERROR --> DU APP : duBuildAndSendUeReestablishRsp(): Cell Id[%d] is not found", ueReestablishRsp->cellId);
+
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP: RLC UE Reestablishment Response : FAILED [UE IDX:%d]", ueId);
+ }
+ DU_FREE_SHRABL_BUF(pst->region, pst->pool, ueReestablishRsp, sizeof(RlcUeReestablishRsp));
+
+ }
+ return ret;
+}
/**********************************************************************
End of file
***********************************************************************/