[JIRA ID:ODUHIGH-255]- Fix for DL RRC Msg in Ue context setup Req 53/5153/4
authorsphoorthi <sphoorthi.dayanand@radisys.com>
Wed, 25 Nov 2020 11:09:44 +0000 (16:39 +0530)
committersphoorthi <sphoorthi.dayanand@radisys.com>
Thu, 26 Nov 2020 09:52:03 +0000 (15:22 +0530)
Change-Id: I03f06df06fe05e77cb5d78d6a1799980d282f54b
Signed-off-by: sphoorthi <sphoorthi.dayanand@radisys.com>
13 files changed:
src/5gnrrlc/kw_utl_dl.c
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/cm/rlc_mac_inf.h
src/cu_stub/cu_f1ap_msg_hdl.c
src/cu_stub/cu_f1ap_msg_hdl.h
src/du_app/du_f1ap_msg_hdl.c
src/du_app/du_mgr_ex_ms.c
src/du_app/du_ue_mgr.c
src/phy_stub/l1_bdy1.c

index ccce2d4..2d1938c 100755 (executable)
@@ -73,7 +73,9 @@ static int RLOG_FILE_ID=209;
 
 #include "rlc_utils.h"
 #include "rlc_mac_inf.h"
+#include "du_app_rlc_inf.h"
 #include "rlc_lwr_inf_api.h"
+#include "rlc_upr_inf_api.h"
 
 #include "ss_rbuf.h"
 #include "ss_rbuf.x" 
@@ -230,14 +232,15 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
    RguDatReqTb      datPerTb;   /* DL data info per TB */
    RguLchDatReq     datPerLch;  /* DL data info per Lch */
    RlcData          *dlData;    /* DL data to be sent to MAC */
+   RlcDlRrcMsgRsp   *dlRrcMsgRsp;/* DL Data Msg Rsp sent to DU */
    Pst              pst;        /* Post structure */
    uint16_t         pduLen;     /* PDU length */
    uint16_t         copyLen;    /* Number of bytes copied */
 
    dlData = NULLP;
+   dlRrcMsgRsp = NULLP;
    RLC_ALLOC_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
                        dlData, sizeof(RlcData));
-#if (ERRCLASS & ERRCLS_ADD_RES)
    if ( dlData == NULLP )
    {
       DU_LOG("\nRLC: rlcSendDedLcDlData: Memory allocation failed for dl data");
@@ -245,7 +248,6 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
           datReqInfo, sizeof(RguDDatReqInfo));
       return RFAILED;
    }
-#endif /* ERRCLASS & ERRCLS_ADD_RES */
 
    for(ueIdx = 0; ueIdx < datReqInfo->nmbOfUeGrantPerTti; ueIdx++)
    {
@@ -304,6 +306,25 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
          }/* For Data per Lch */
       }/* For Data per Tb */
 
+      RLC_ALLOC_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
+                     dlRrcMsgRsp, sizeof(RlcDlRrcMsgRsp));
+      if( dlRrcMsgRsp == NULLP )
+      {
+         DU_LOG("\nRLC: rlcSendDedLcDlData: Memory allocation failed for dlRrcMsgRsp");
+         for(pduIdx = 0; pduIdx < dlData->numPdu; pduIdx++)
+         {
+            RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData->pduInfo[pduIdx].pduBuf,\
+               dlData->pduInfo[pduIdx].pduLen);
+         }
+          RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcData));
+         RLC_FREE_SHRABL_BUF(RLC_MEM_REGION_DL, RLC_POOL,
+             datReqInfo, sizeof(RguDDatReqInfo));
+         return RFAILED;
+      }
+
+      dlRrcMsgRsp->cellId = dlData->cellId;
+      dlRrcMsgRsp->crnti = dlData->rnti;
+
       /* Sending DL Data per UE to MAC */
       memset(&pst, 0, sizeof(Pst));
       FILL_PST_RLC_TO_MAC(pst, RLC_DL_INST, EVENT_DL_DATA_TO_MAC);
@@ -315,6 +336,17 @@ uint8_t rlcSendDedLcDlData(Pst *post, SpId spId, RguDDatReqInfo *datReqInfo)
               dlData->pduInfo[pduIdx].pduLen);
         }
          RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlData, sizeof(RlcData));
+        /* Update DL RRC MSG Rsp State */
+         dlRrcMsgRsp->state = TRANSMISSION_FAILED;
+      }
+      else
+         dlRrcMsgRsp->state = TRANSMISSION_COMPLETE;
+
+      /* Send Dl RRC Msg Rsp to DU APP */
+      FILL_PST_RLC_TO_DUAPP(pst, RLC_DL_INST, EVENT_DL_RRC_MSG_RSP_TO_DU);
+      if(rlcSendDlRrcMsgRspToDu(&pst, dlRrcMsgRsp) != ROK)
+      {
+         RLC_FREE_SHRABL_BUF(pst.region, pst.pool, dlRrcMsgRsp, sizeof(RlcDlRrcMsgRsp));
       }
    } /* For Data per UE */
 
index e7085d0..1c41b15 100644 (file)
@@ -360,7 +360,10 @@ uint8_t RlcProcDlRrcMsgTransfer(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo)
    }
    oduCpyFixBufToMsg(dlRrcMsgInfo->rrcMsg, mBuf, dlRrcMsgInfo->msgLen);
 
-   rlcProcDlData(pst, datReqInfo, mBuf);
+   if(rlcProcDlData(pst, datReqInfo, mBuf) != ROK)
+   {
+      return RFAILED;
+   }
 
    /* RRC Delivery report is only send when RRC Delivery status report is true in DL RRC Message */
    if(dlRrcMsgInfo->deliveryStaRpt)
index 52dd083..ff43058 100644 (file)
@@ -32,6 +32,15 @@ RlcRrcDeliveryReportToDuFunc rlcSendRrcDeliveryReportToDuOpts[]=
    DuProcRlcRrcDeliveryReport,    /* 1 - Tightly coupled */
    packRrcDeliveryReportToDu           /* 2 - Light weight loosely coupled */
 };
+
+/* Function pointer array for DL RRC Msg Rsp Transfer */
+RlcDlRrcMsgRspToDuFunc rlcSendDlRrcMsgRspToDuOpts[] = 
+{
+   packRlcDlRrcMsgRspToDu,       /* 0 - Loosely coupled */
+   DuProcRlcDlRrcMsgRsp,         /* 1 - Tightly coupled */
+   packRlcDlRrcMsgRspToDu        /* 2 - Light weight loosely coupled */
+};
+
 /*******************************************************************
  *
  * @brief Sends UL RRC Message Info to DU APP
@@ -73,6 +82,28 @@ uint8_t rlcSendRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDelivery)
 {
    return (*rlcSendRrcDeliveryReportToDuOpts[pst->selector])(pst, rrcDelivery);
 }
+
+/*******************************************************************
+ *
+ * @brief Sends DL RRC Message Status to DU APP
+ *
+ * @details
+ *
+ *    Function : rlcSendDlRrcMsgRspToDu
+ *
+ *    Functionality:  Sends DL RRC Message Status to DU APP
+ *
+ * @params[in] Pst structure
+ *             DL RRC Msg Info
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t rlcSendDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsg)
+{
+   return (*rlcSendDlRrcMsgRspToDuOpts[pst->selector])(pst, dlRrcMsg);
+}
+
 /**********************************************************************
          End of file
 **********************************************************************/
index 71bd23a..0a930d0 100644 (file)
@@ -18,6 +18,7 @@
 
 uint8_t rlcSendUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
 uint8_t rlcSendRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDelivery);
+uint8_t rlcSendDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp);
 /**********************************************************************
          End of file
 **********************************************************************/
index 19391a8..520c9de 100644 (file)
@@ -482,6 +482,79 @@ uint8_t unpackRlcUeReconfigReq(DuRlcUeReconfigReq func, Pst *pst, Buffer *mBuf)
    return RFAILED;
 }
 
+/*******************************************************************
+ *
+ * @brief Pack and send DL RRC message Response from RLC to DU APP
+ *
+ * @details
+ *
+ *    Function : packRlcDlRrcMsgRspToDu
+ *
+ *    Functionality:
+ *       Pack and send DL RRC message Response from RLC to DU APP
+ *
+ * @params[in] Post structure
+ *             DL RRC Msg Response 
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t packRlcDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp)
+{
+   Buffer *mBuf = NULLP;
+
+   if(pst->selector == ODU_SELECTOR_LWLC)
+   {
+      if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+      {
+         DU_LOG("\nRLC : Memory allocation failed at packRlcDlRrcMsgRspToDu");
+         return RFAILED;
+      }
+      /* pack the address of the structure */
+      CMCHKPK(oduPackPointer,(PTR)dlRrcMsgRsp, mBuf);
+      return ODU_POST_TASK(pst,mBuf);
+   }
+   else
+   {
+      DU_LOG("\nRLC: Only LWLC supported for packRlcDlRrcMsgRspToDu");
+   }
+   return RFAILED;
+}
+
+/*******************************************************************
+ *
+ * @brief Unpack DL RRC Msg Response received at DU APP from RLC
+ *
+ * @details
+ *
+ *    Function : unpackRlcDlRrcMsgRspToDu
+ *
+ *    Functionality:
+ *      Unpack DL RRC Msg Response received at DU APP from RLC
+ *
+ * @params[in]
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t unpackRlcDlRrcMsgRspToDu(RlcDlRrcMsgRspToDuFunc func, Pst *pst, Buffer *mBuf)
+{
+   if(pst->selector == ODU_SELECTOR_LWLC)
+   {
+      RlcDlRrcMsgRsp *dlRrcMsgRsp;
+      /* unpack the address of the structure */
+      CMCHKUNPK(oduUnpackPointer, (PTR *)&dlRrcMsgRsp, mBuf);
+      ODU_PUT_MSG_BUF(mBuf);
+      return (*func)(pst, dlRrcMsgRsp);
+   }
+   else
+   {
+      /* Nothing to do for other selectors */
+      DU_LOG("\nRLC: Only LWLC supported for DL RRC Message transfer ");
+      ODU_PUT_MSG_BUF(mBuf);
+   }
+   return RFAILED;
+}
 /**********************************************************************
          End of file
 ***********************************************************************/
index 761e163..d9ffa0d 100644 (file)
@@ -28,6 +28,7 @@
 #define EVENT_RRC_DELIVERY_MSG_TRANS_TO_DU 214
 #define EVENT_RLC_UE_RECONFIG_REQ  215
 #define EVENT_RLC_UE_RECONFIG_RSP  216
+#define EVENT_DL_RRC_MSG_RSP_TO_DU 217
 
 #define RB_ID_SRB 0
 #define RB_ID_DRB 1
 #define LCH_DTCH      4      /*!< DTCH Logical Channel */
 #define LCH_DCCH      5      /*!< DCCH Logical Channel */
 
+typedef enum
+{
+   TRANSMISSION_IN_PROGRESS,
+   TRANSMISSION_COMPLETE,
+   TRANSMISSION_FAILED
+}DlMsgState;
 
 typedef enum
 {
@@ -520,6 +527,14 @@ typedef struct dlRrcMsgInfo
    uint8_t    *rrcMsg;        /* RRC Message (DL-DCCH Message) */
 }RlcDlRrcMsgInfo;
 
+/* DL RRC Message Rsp From RLC to DU APP */
+typedef struct dlRrcMsgRsp
+{
+   uint16_t   cellId;         /* Cell Id */
+   uint16_t   crnti;          /* UE index */
+   DlMsgState state;         /* Dl RRC Msg State */
+}RlcDlRrcMsgRsp;
+
 /* RRC delivery message from RLC to DU APP */
 typedef struct rrcDeliveryStatus
 {
@@ -565,6 +580,11 @@ typedef uint8_t (*DuRlcUeReconfigReq) ARGS((
    Pst           *pst,
    RlcUeCfg      *ueCfg ));
 
+/* DL RRC Message from RLC to DU APP */
+typedef uint8_t (*RlcDlRrcMsgRspToDuFunc) ARGS((
+   Pst           *pst,
+   RlcDlRrcMsgRsp *dlRrcMsgRsp));
+
 /* Pack/Unpack function declarations */
 uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
 uint8_t unpackRlcUeCreateReq(DuRlcUeCreateReq func, Pst *pst, Buffer *mBuf);
@@ -578,6 +598,9 @@ uint8_t packRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDeliveryReport
 uint8_t unpackRrcDeliveryReportToDu(RlcRrcDeliveryReportToDuFunc func,Pst *pst, Buffer *mBuf);
 uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg);
 uint8_t unpackRlcUeReconfigReq(DuRlcUeReconfigReq func, Pst *pst, Buffer *mBuf);
+uint8_t packRlcDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp);
+uint8_t unpackRlcDlRrcMsgRspToDu(RlcDlRrcMsgRspToDuFunc func, Pst *pst, Buffer *mBuf);
+
 
 /* Event Handler function declarations */
 uint8_t RlcProcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
@@ -586,6 +609,7 @@ uint8_t DuProcRlcUlRrcMsgTrans(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
 uint8_t RlcProcDlRrcMsgTransfer(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo);
 uint8_t DuProcRlcRrcDeliveryReport(Pst *pst, RrcDeliveryReport *rrcDeliveryReport);
 uint8_t RlcProcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg);
+uint8_t DuProcRlcDlRrcMsgRsp(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsg);
 
 #endif /* RLC_INF_H */
 
index 1a61b7d..5c46055 100644 (file)
@@ -68,14 +68,14 @@ typedef struct rlcPduInfo
    uint8_t    *pduBuf;  /*!< RLC PDU buffer */
 }RlcPduInfo;
  
-typedef struct rlcMacData
+typedef struct rlcData
 {
    // add slot info
-   uint16_t     cellId;       /*!< CELL ID */
-   uint16_t     rnti;         /*!< Temporary CRNTI */
-   SlotIndInfo  slotInfo;     /*!< Timing info */
-   uint8_t      numPdu;       /*!< Number of RLC PDUs */
-   RlcPduInfo   pduInfo[MAX_NUM_PDU];
+   uint16_t      cellId;       /*!< CELL ID */
+   uint16_t      rnti;         /*!< Temporary CRNTI */
+   SlotIndInfo   slotInfo;     /*!< Timing info */
+   uint8_t       numPdu;       /*!< Number of RLC PDUs */
+   RlcPduInfo    pduInfo[MAX_NUM_PDU];
 }RlcData;
 
 /* Function pointers */
index 2b651a0..e8b0290 100644 (file)
@@ -1745,6 +1745,9 @@ uint8_t setDlRRCMsgType()
       case UE_CONTEXT_SETUP_REQ:
         rrcMsgType = UE_CONTEXT_SETUP_REQ;
         break;
+      case SECURITY_MODE_COMPLETE:
+        rrcMsgType = SECURITY_MODE_COMPLETE;
+        break;
       case RRC_RECONFIG:
         rrcMsgType = RRC_RECONFIG;
         break;
@@ -6051,15 +6054,26 @@ uint8_t procUlRrcMsg(F1AP_PDU_t *f1apMsg)
       rrcMsgType = setDlRRCMsgType();
       if(rrcMsgType == REGISTRATION_ACCEPT)
       {
-         DU_LOG("\nSending DL RRC MSG for RRC Registration Complete"); 
+         DU_LOG("\nF1AP: Sending DL RRC MSG for RRC Registration Accept"); 
          ret = BuildAndSendDLRRCMessageTransfer(srbId, rrcMsgType);
       }
       if(rrcMsgType == UE_CONTEXT_SETUP_REQ)
       {
-         DU_LOG("\nSending Ue Context Setup Req"); 
+         DU_LOG("\nF1AP: Sending Ue Context Setup Req"); 
          ret = BuildAndSendUeContextSetupReq(cuUeF1apId, duUeF1apId,\
            rrcContLen, rrcContainer);
       }
+      if(rrcMsgType == SECURITY_MODE_COMPLETE)
+      {
+         /* To trigger the DL RRC Msg for RRC Reconfig */
+         f1apMsgDb.dlRrcMsgCount++;
+         rrcMsgType = setDlRRCMsgType();
+        if(rrcMsgType == RRC_RECONFIG)
+        {
+            DU_LOG("\nF1AP: Sending DL RRC MSG for RRC Reconfig");
+            BuildAndSendDLRRCMessageTransfer(srbId, rrcMsgType);
+        }
+      }
    }
    return ret;
 }
@@ -6352,16 +6366,8 @@ void F1APMsgHdlr(Buffer *mBuf)
            }
             case SuccessfulOutcome__value_PR_UEContextSetupResponse:
            {
-              uint8_t rrcMsgType;
-
                DU_LOG("\nF1AP : UE ContextSetupResponse received");
-               f1apMsgDb.dlRrcMsgCount++;
-               rrcMsgType = setDlRRCMsgType();
-               if(rrcMsgType == RRC_RECONFIG)
-               {
-                  DU_LOG("\nImplementing DL RRC MSG for RRC Reconfig Complete");
-                  BuildAndSendDLRRCMessageTransfer(SRB1, rrcMsgType);
-               }
+               f1apMsgDb.dlRrcMsgCount++; /* keeping DL RRC Msg Count */
                break;
            }
             default:
index c2df121..0e0e13a 100644 (file)
@@ -60,7 +60,9 @@
 #define RRC_SETUP 1
 #define REGISTRATION_ACCEPT 2
 #define UE_CONTEXT_SETUP_REQ 3
-#define RRC_RECONFIG 4
+#define UE_CONTEXT_SETUP_RSP 4
+#define SECURITY_MODE_COMPLETE 5
+#define RRC_RECONFIG 6
 typedef struct f1apDb
 {
    uint8_t dlRrcMsgCount;
index 95bf53a..fe34308 100644 (file)
@@ -5575,6 +5575,7 @@ void freeF1UeDb(F1UeContextSetupDb *f1UeDb)
    }
    freeDuUeCfg(&f1UeDb->duUeCfg);
    memset(f1UeDb, 0, sizeof(F1UeContextSetupDb));
+   DU_FREE(f1UeDb, sizeof(F1UeContextSetupDb));
 }
 
 /*******************************************************************
@@ -7672,6 +7673,7 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId)
                     choice.DUtoCURRCInformation.cellGroupConfig, cellGrpCfg);
            /* Free UeContext Db created during Ue context Req */
            freeF1UeDb(ueCb->f1UeDb);
+           ueCb->f1UeDb = NULLP;
          }
       }
       else
index c834d2b..4028122 100644 (file)
@@ -188,6 +188,11 @@ uint8_t duActvTsk(Pst *pst, Buffer *mBuf)
                     ret = unpackRrcDeliveryReportToDu(DuProcRlcRrcDeliveryReport, pst, mBuf);
                     break;
                  }
+              case EVENT_DL_RRC_MSG_RSP_TO_DU:
+                  {
+                    ret = unpackRlcDlRrcMsgRspToDu(DuProcRlcDlRrcMsgRsp, pst, mBuf);
+                    break;
+                  }
               default:
                  {
                     DU_LOG("\nDU_APP : Invalid event %d received at duActvTsk from ENTRLC", \
index 4d17af2..1f08803 100644 (file)
@@ -1988,6 +1988,8 @@ uint8_t DuProcRlcUeCfgRsp(Pst *pst, RlcUeCfgRsp *cfgRsp)
    return ret;
 }
 
+
+
 /*******************************************************************
  *
  * @brief Builds and Send Ue Reconfig Req to RLC
@@ -2074,6 +2076,82 @@ uint8_t duBuildAndSendUeReCfgReqToMac(uint8_t cellId, uint8_t crnti, DuUeCfg *ue
    return ret;
 }
 
+/*******************************************************************
+ *
+ * @brief Build and Send Ue context setup request
+ *
+ * @details
+ *
+ *    Function : duBuildAndSendUeContextSetupReq
+ *
+ *    Functionality: 
+ *     Build and Send Ue context setup request
+ * 
+ *  @params[in]  cellId, crnti, DuUeCfg pointer
+ *  @return ROK     - success
+ *          RFAILED - failure
+ * 
+ *****************************************************************/
+
+uint8_t duBuildAndSendUeContextSetupReq(uint16_t cellId, uint16_t crnti, DuUeCfg *duUeCfg)
+{
+   uint8_t ret = ROK;
+
+   DU_LOG("\nDU_APP: Processing Ue Context Setup Request for cellId [%d]", cellId);
+   /* Filling RLC Ue Reconfig */ 
+   ret = duBuildAndSendUeReCfgReqToRlc(cellId, crnti, duUeCfg);
+   if(ret == RFAILED)
+      DU_LOG("\nDU_APP: Failed to build ctxt setup req for RLC at duBuildAndSendUeContextSetupReq()");
+   
+   /* Filling MAC Ue Reconfig */
+   ret = duBuildAndSendUeReCfgReqToMac(cellId, crnti, duUeCfg);
+   if(ret == RFAILED)
+      DU_LOG("\nDU_APP: Failed at build ctxt setup req for MAC at duBuildAndSendUeContextSetupReq()");
+
+   return ret;
+}
+
+/*******************************************************************
+ *
+ * @brief Processes DL Rsp received from RLC DL
+ *
+ * @details
+ *
+ *    Function : DuProcRlcDlRrcMsgRsp
+ *
+ *    Functionality: 
+ *     Processes UE Rsp received from RLC DL
+ * 
+ *  @params[in]  Post structure
+ *               Pointer to RlcCfgCfm
+ *  @return ROK     - success
+ *          RFAILED - failure
+ * 
+ *****************************************************************/
+uint8_t DuProcRlcDlRrcMsgRsp(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsg)
+{
+   uint8_t ret = ROK, ueIdx = 0;
+   DuUeCb *ueCb = NULLP;
+
+   if(dlRrcMsg->state == TRANSMISSION_COMPLETE)
+   {
+      GET_UE_IDX(dlRrcMsg->crnti, ueIdx);
+      ueCb = &duCb.actvCellLst[dlRrcMsg->cellId -1]->ueCb[ueIdx -1];
+      if(ueCb->f1UeDb)
+      {
+        ret = duBuildAndSendUeContextSetupReq(dlRrcMsg->cellId, dlRrcMsg->crnti, &ueCb->f1UeDb->duUeCfg);
+       if(ret == RFAILED)
+          DU_LOG("\nDUAPP: Failed to process UE Context Setup Request in DuProcRlcDlRrcMsgRsp()");
+      }
+   }
+   else
+      DU_LOG("\nDUAPP: Failed to transmit DL RRC Msg");
+
+   DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, dlRrcMsg, sizeof(RlcDlRrcMsgRsp));
+   return ret;
+}
 /*******************************************************************
  *
  * @brief Process UE context setup request from CU
@@ -2114,18 +2192,13 @@ uint8_t duProcUeContextSetupRequest(DuUeCb *ueCb)
             }
          }
       }
-      if(ret == ROK)
+      else
       {
-         DU_LOG("\nDU_APP: Processing Ue Context Setup Request for cellId [%d]", cellId);
-         /* Filling RLC Ue Reconfig */ 
-         ret = duBuildAndSendUeReCfgReqToRlc(cellId, ueCb->crnti, &ueCb->f1UeDb->duUeCfg);
-         if(ret == RFAILED)
-            DU_LOG("\nDU_APP: Failed to build ctxt setup req for RLC at duBuildAndSendUeReCfgReqToRlc()");
-         
-        /* Filling MAC Ue Reconfig */
-         ret = duBuildAndSendUeReCfgReqToMac(cellId, ueCb->crnti, &ueCb->f1UeDb->duUeCfg);
-         if(ret == RFAILED)
-            DU_LOG("\nDU_APP: Failed at build ctxt setup req for MAC at duBuildAndSendUeReCfgReqToMac()");
+         ret = duBuildAndSendUeContextSetupReq(cellId, ueCb->crnti, &ueCb->f1UeDb->duUeCfg);
+        if(ret == RFAILED)
+        {
+            DU_LOG("\nDU APP : Failed to build ue context setup Req in duProcUeContextSetupRequest()");
+        }
       }
    }
    else
index 7ccee21..21533df 100644 (file)
@@ -509,7 +509,7 @@ uint16_t l1BuildAndSendRxDataInd(uint16_t slot, uint16_t sfn, fapi_ul_pusch_pdu_
       }
       case MSG_TYPE_RRC_RECONFIG_COMPLETE:
       {
-         DU_LOG("\nPHY_STUB: Forming RRC RECONFIGURATION PDU");
+         DU_LOG("\nPHY_STUB: Forming RRC RECONFIGURATION COMPLETE PDU");
          uint8_t  pduLen = 14;
         /* For rrc reconfig complete where RRC Container is dummy
         MAC subheader format is R/F/LCId/L (2/3 bytes)