implementation of RLC UE delete req and rsp JIRA-ID : ODUHIGH-43 81/5781/11
authorsphoorthi <sphoorthi.dayanand@radisys.com>
Fri, 19 Mar 2021 08:55:41 +0000 (14:25 +0530)
committersphoorthi <sphoorthi.dayanand@radisys.com>
Tue, 27 Apr 2021 08:31:23 +0000 (14:01 +0530)
Change-Id: I29645c89f60af7925dea700f33fe919c1df92c59
Signed-off-by: sphoorthi <sphoorthi.dayanand@radisys.com>
13 files changed:
src/5gnrrlc/kw_udx_dl.c
src/5gnrrlc/kw_udx_ul.c
src/5gnrrlc/kw_ul_ex_ms.c
src/5gnrrlc/rlc_mgr.c
src/5gnrrlc/rlc_mgr.h
src/5gnrrlc/rlc_msg_hdl.c
src/5gnrrlc/rlc_upr_inf_api.c
src/5gnrrlc/rlc_upr_inf_api.h
src/cm/du_app_rlc_inf.c
src/cm/du_app_rlc_inf.h
src/du_app/du_f1ap_msg_hdl.h
src/du_app/du_mgr_ex_ms.c
src/du_app/du_ue_mgr.c

index 8a27900..421ee67 100755 (executable)
@@ -349,6 +349,11 @@ RlcCfgInfo   *cfg
                   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:
index 34d7330..630f427 100755 (executable)
@@ -268,12 +268,22 @@ RlcCfgCfmInfo   *cfmInfo
    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,
@@ -520,7 +530,7 @@ RlcCfgCfmInfo    *cfgCfm
                   rlcCfgApplyDelUlUe(gCb, cfgTmpData);
                   RLC_MEM_CPY(entCfgCfm, 
                              &cfgTmpData->cfgEntData[idx].entUlCfgCfm, 
-                             sizeof(RlcEntCfgCfmInfo)); 
+                             sizeof(RlcEntCfgCfmInfo));
                }
                else
                {
index 05d850f..7295adf 100755 (executable)
@@ -224,6 +224,11 @@ Buffer *mBuf            /* message buffer */
                      ret = unpackRlcUeReconfigReq(RlcProcUeReconfigReq, pst, mBuf);
                      break;
                   }
+               case EVENT_RLC_UE_DELETE_REQ:
+                  {
+                     ret = unpackRlcUeDeleteReq(RlcProcUeDeleteReq, pst, mBuf);
+                     break;
+                  }
 
                case LKW_EVT_STS_REQ:
                   {
index 76d85f3..6de3006 100644 (file)
@@ -62,7 +62,7 @@ RlcDuUeCfgRsp rlcUeCfgRspOpts[] =
  *      -# 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;
@@ -83,7 +83,7 @@ uint8_t SendRlcUeRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp)
          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));
          }
       }
@@ -94,7 +94,7 @@ uint8_t SendRlcUeRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp)
       }
    }
    return ret;
-} /* end of SendRlcUeRspToDu */
+} /* end of SendRlcUeCfgRspToDu */
 
 /**********************************************************************
          End of file
index fa6bd5a..d89b95a 100644 (file)
@@ -18,7 +18,8 @@
 
 /* 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
index 3f2badd..4e29734 100644 (file)
@@ -43,6 +43,7 @@
 #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 
@@ -721,6 +722,173 @@ uint8_t RlcProcDlUserDataTransfer(Pst *pst, RlcDlUserDataInfo *dlDataMsgInfo)
    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
 **********************************************************************/
index 8ae041e..32ddf36 100644 (file)
@@ -49,6 +49,13 @@ RlcUlUserDataToDuFunc rlcSendUlUserDataToDuOpts[] =
    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
@@ -90,7 +97,6 @@ uint8_t rlcSendRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDelivery)
 {
    return (*rlcSendRrcDeliveryReportToDuOpts[pst->selector])(pst, rrcDelivery);
 }
-
 /*******************************************************************
  *
  * @brief Sends DL RRC Message Status to DU APP
@@ -133,6 +139,27 @@ uint8_t rlcSendUlUserDataToDu(Pst *pst, RlcUlUserDatInfo *ulUserData)
    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
 **********************************************************************/
index 9131f2a..1f9ee1b 100644 (file)
@@ -20,7 +20,7 @@ uint8_t rlcSendUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
 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
 **********************************************************************/
index 5878def..9d98a31 100644 (file)
@@ -705,6 +705,168 @@ uint8_t unpackRlcDlUserDataToRlc(DuRlcDlUserDataToRlcFunc func, Pst *pst, Buffer
 
    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
 ***********************************************************************/
index 837afc3..7c6b973 100644 (file)
@@ -31,7 +31,8 @@
 #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
@@ -87,6 +88,13 @@ typedef enum
    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
@@ -128,7 +136,7 @@ typedef struct dlAmCfg
    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
@@ -201,6 +209,19 @@ typedef struct rlcUeCfgRsp
    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
 {
@@ -280,6 +301,11 @@ typedef uint8_t (*RlcDuUeCfgRsp) ARGS((
    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,
@@ -295,10 +321,16 @@ typedef uint8_t (*RlcRrcDeliveryReportToDuFunc) ARGS((
    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,
@@ -333,6 +365,10 @@ uint8_t packRlcUlUserDataToDu(Pst *pst, RlcUlUserDatInfo *ulUserData);
 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);
@@ -344,7 +380,8 @@ uint8_t RlcProcUeReconfigReq(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 */
 
 /**********************************************************************
index c52a835..27aa820 100644 (file)
@@ -52,6 +52,7 @@ uint8_t BuildAndSendUeContextModResp(uint8_t ueIdx, uint8_t cellId);
 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
 **********************************************************************/
index 76a524a..7165e54 100644 (file)
@@ -130,216 +130,221 @@ uint8_t duActvTsk(Pst *pst, Buffer *mBuf)
    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();
index 1381cda..34318ee 100644 (file)
@@ -90,6 +90,12 @@ DuMacUeDeleteReq packMacUeDeleteReqOpts[] =
    packDuMacUeDeleteReq        /* Light weight-loose coupling */
 };
 
+DuRlcUeDeleteReq packRlcUeDeleteReqOpts[] =
+{
+   packDuRlcUeDeleteReq,       /* Loose coupling */
+   RlcProcUeDeleteReq,         /* TIght coupling */
+   packDuRlcUeDeleteReq        /* Light weight-loose coupling */
+};
 
 /*******************************************************************
  *
@@ -1502,36 +1508,36 @@ uint8_t fillRlcUeCfg(uint16_t cellId, uint8_t ueIdx,\
       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;
@@ -2638,6 +2644,7 @@ uint8_t duProcUeContextModReq(DuUeCb *ueCb)
    }
    return ROK;
 }
+
 /*******************************************************************
 *
 * @brief Function to delete Pdsch ServCellCfg
@@ -2652,6 +2659,7 @@ uint8_t duProcUeContextModReq(DuUeCb *ueCb)
 * @return void
 *
 * ****************************************************************/
+
 void deletePdschServCellCfg(PdschServCellCfg *pdschServCellCfg)
 {
    DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL,pdschServCellCfg->maxMimoLayers, sizeof(uint8_t));
@@ -2675,6 +2683,7 @@ void deletePdschServCellCfg(PdschServCellCfg *pdschServCellCfg)
 *         RFAILED - failure
 *
 *******************************************************************/
+
 void deleteMacUeCfg(MacUeCfg *ueCfg)
 {
    uint8_t lcCfgIdx;
@@ -2762,6 +2771,7 @@ void deleteMacUeCfg(MacUeCfg *ueCfg)
    }
    memset(ueCfg, 0, sizeof(MacUeCfg));
 }
+
 /*******************************************************************
 *
 * @brief Handle UE delete response from MAC
@@ -2777,6 +2787,7 @@ void deleteMacUeCfg(MacUeCfg *ueCfg)
 *         RFAILED - failure
 *
 * ****************************************************************/
+
 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp)
 {
    uint16_t cellIdx=0;
@@ -2806,6 +2817,108 @@ uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp)
    }
    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
@@ -2817,7 +2930,7 @@ uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp)
 *    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
 *
@@ -2828,7 +2941,7 @@ uint8_t sendUeDeleteReqToMac(uint16_t cellId, uint8_t ueIdx, uint16_t crnti)
    Pst pst;
    uint8_t ret=ROK;
    MacUeDelete *ueDelete = NULLP;
-   
+
    DU_ALLOC_SHRABL_BUF(ueDelete, sizeof(MacUeDelete));
    if(ueDelete)
    {
@@ -2855,20 +2968,67 @@ uint8_t sendUeDeleteReqToMac(uint16_t cellId, uint8_t ueIdx, uint16_t crnti)
 }
 
 /*******************************************************************
-*
-* @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;
@@ -2882,6 +3042,11 @@ uint8_t duProcUeDeleteReq(uint16_t cellId, uint16_t crnti)
    {
       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 ");
@@ -2906,4 +3071,4 @@ uint8_t duProcUeDeleteReq(uint16_t cellId, uint16_t crnti)
 
 /**********************************************************************
   End of file
- ***********************************************************************/
+***********************************************************************/