+
+/*******************************************************************
+ *
+ * @brief Handles Ue Reconfig Request from DU APP
+ *
+ * @details
+ *
+ * Function : RlcProcUeReconfigReq
+ *
+ * Functionality:
+ * Handles Ue Reconfig Request from DU APP
+ *
+ * @params[in] Post structure pointer
+ * RlcUeCfg pointer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t RlcProcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg)
+{
+ uint8_t ret = ROK;
+ RlcCfgInfo *rlcUeCfg = NULLP; //Seed code Rlc cfg struct
+ RlcCb *rlcUeCb = NULLP;
+
+ DU_LOG("\nDEBUG --> RLC: UE reconfig request received. CellID[%d] UEIDX[%d]",ueCfg->cellId, ueCfg->ueIdx);
+
+ rlcUeCb = RLC_GET_RLCCB(pst->dstInst);
+ RLC_ALLOC(rlcUeCb, rlcUeCfg, sizeof(RlcCfgInfo));
+ if(rlcUeCfg == NULLP)
+ {
+ DU_LOG("\nERROR --> RLC: Failed to allocate memory at RlcProcUeReconfigReq()");
+ ret = RFAILED;
+ }
+ else
+ {
+ memset(rlcUeCfg, 0, sizeof(RlcCfgInfo));
+ fillRlcCfg(rlcUeCfg, ueCfg);
+ 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));
+ return ret;
+}
+
+/* ****************************************************************
+ *
+ * @brief Process the DL Data transfer from DU APP
+ *
+ * @details
+ *
+ * Function : RlcProcDlUserDataTransfer
+ *
+ * Functionality: Process the DL transfer from DU APP
+ *
+ * @params[in] Post structure
+ * DL RRC Message info
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t RlcProcDlUserDataTransfer(Pst *pst, RlcDlUserDataInfo *dlDataMsgInfo)
+{
+ Buffer *mBuf = NULLP;
+ RlcDatReqInfo *datReqInfo = NULLP;
+
+ if(dlDataMsgInfo->dlMsg == NULLP)
+ {
+ DU_LOG("\nERROR --> RLC_DL : Received DL message is NULLP in RlcProcDlUserDataTransfer()");
+ return RFAILED;
+ }
+ RLC_SHRABL_STATIC_BUF_ALLOC(RLC_MEM_REGION_DL, RLC_POOL, datReqInfo, sizeof(RlcDatReqInfo));
+ if(!datReqInfo)
+ {
+ DU_LOG("\nERROR --> RLC_DL : Memory allocation failed for DatReq in RlcProcDlUserDataTransfer()");
+ RLC_SHRABL_STATIC_BUF_FREE(pst->region, pst->pool, dlDataMsgInfo->dlMsg, dlDataMsgInfo->msgLen);
+ RLC_SHRABL_STATIC_BUF_FREE(pst->region, pst->pool, dlDataMsgInfo, sizeof(RlcDlUserDataInfo));
+ return RFAILED;
+ }
+
+ datReqInfo->rlcId.rbType = RB_TYPE_DRB;
+ datReqInfo->rlcId.rbId = dlDataMsgInfo->rbId;
+ datReqInfo->rlcId.ueId = dlDataMsgInfo->ueIdx;
+ datReqInfo->rlcId.cellId = dlDataMsgInfo->cellId;
+ datReqInfo->lcType = LCH_DTCH;
+ datReqInfo->sduId = ++(rlcCb[pst->dstInst]->dlSduId);
+ mBuf = dlDataMsgInfo->dlMsg;
+ if(rlcProcDlData(pst, datReqInfo, mBuf) != ROK)
+ {
+ return RFAILED;
+ }
+
+ /* Free memory allocated by du app */
+ RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_DL, RLC_POOL, datReqInfo, sizeof(RlcDatReqInfo));
+ RLC_SHRABL_STATIC_BUF_FREE(pst->region, pst->pool, dlDataMsgInfo, sizeof(RlcDlUserDataInfo));
+ return ROK;
+}