Merge "[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-501] Ue Create and Rsp correction...
[o-du/l2.git] / src / du_app / du_f1ap_msg_hdl.c
index da89646..2df998e 100644 (file)
@@ -28,6 +28,8 @@
 #include "lkw.x"
 #include "lrg.x"
 #include "F1AP-PDU.h"
+#include "InitiatingMessage.h"
+#include "SuccessfulOutcome.h"
 #include "du_app_mac_inf.h"
 #include "du_cfg.h"
 #include "du_app_rlc_inf.h"
 #include "du_utils.h"
 #include "du_ue_mgr.h"
 #include "RAT-Type.h"
+#include "NRFreqInfo.h"
+#include "NRCGI.h"
+#include "TDD-Info.h"
+#include "NR-Mode-Info.h"
+#include "ServedPLMNs-List.h"
+#include "GNB-DU-Served-Cells-List.h"
+#include "Served-Cell-Information.h"
+#include "ProtocolExtensionContainer.h"
+#include "RRC-Version.h"
+#include "FDD-Info.h"
+#include "FreqBandNrItem.h"
+#include "ServedPLMNs-Item.h"
+#include "GNB-DU-Served-Cells-Item.h"
+#include "SliceSupportItem.h"
 #include "FeatureSetUplinkPerCC.h"
+#include "SliceSupportItem.h"
+#include "Served-Cells-To-Modify-Item.h"
+#include "Served-Cells-To-Delete-List.h"
+#include "Served-Cells-To-Delete-Item.h"
+#include "QoSInformation.h"
+#include "ULUPTNLInformation-ToBeSetup-List.h"
+#include "DRB-Information.h"
+#include "DRBs-ToBeSetup-Item.h"
+#include "DRBs-ToBeSetupMod-Item.h"
+#include "DRBs-ToBeModified-Item.h"
+#include "CUtoDURRCInformation.h"
+#include "SCell-ToBeSetup-List.h"
+#include "SRBs-ToBeSetup-List.h"
+#include "DRBs-ToBeSetup-List.h"
+#include "SRBs-ToBeSetup-Item.h"
+#include "DRBs-ToBeModified-List.h"
+#include "RRCContainer.h"
+#include "UE-CapabilityRAT-ContainerList.h"
+#include "DRBs-Setup-List.h"
+#include "CellGroupConfig.h"
+#include "ResetAll.h"
+#include "ResetType.h"
+#include "Cells-to-be-Activated-List.h"
+#include "GNB-CU-Name.h"
+#include "SRBs-SetupMod-List.h"
+#include "DRBs-SetupMod-List.h"
+#include "DRBs-ToBeSetupMod-List.h"
+#include "PagingCell-Item.h"
+#include "PagingCell-list.h"
+#include "QoS-Characteristics.h"
+#include "ULUPTNLInformation-ToBeSetup-Item.h"
+#include "Flows-Mapped-To-DRB-Item.h"
+#include "NonDynamic5QIDescriptor.h"
+#include "Dynamic5QIDescriptor.h"
 #include "FeatureSetDownlinkPerCC.h"
 #include "FeatureSets.h"
 #include "UE-NR-Capability.h"
 #include "UPTransportLayerInformation.h"
 #include "GTPTunnel.h"
 #include "SupportedSULFreqBandItem.h"
-#include "du_sys_info_hdl.h"
 #include "du_e2ap_msg_hdl.h"
 #include "du_f1ap_conversions.h"
 #include "CNUEPagingIdentity.h"
 #include "PCCH-Config.h"
+#include "SCS-SpecificCarrier.h"
+#include "FrequencyInfoDL.h"
+#include "DownlinkConfigCommon.h"
+#include "FrequencyInfoUL.h"
+#include "UplinkConfigCommon.h"
+#include "TDD-UL-DL-ConfigCommon.h"
+#include "RACH-ConfigDedicated.h"
+#include "CFRA-SSB-Resource.h"
+#include "BWP-UplinkCommon.h"
+#include "ReconfigurationWithSync.h"
+#include "du_sys_info_hdl.h"
+#include "DRX-ConfigRrc.h"
 
 #ifdef O1_ENABLE
 #include "CmInterface.h"
@@ -149,13 +210,13 @@ uint8_t fetchLcId(uint8_t drbId)
       {
          if(duCb.actvCellLst[cellIdx] != NULLP)
          {
-            numLcs = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.numLcs;
+            numLcs = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg.numLcs;
             for(lcIdx = 0; lcIdx < numLcs; lcIdx++)
             {
-               if(duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.rlcLcCfg[lcIdx].rbId == drbId && \
-                  duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.rlcLcCfg[lcIdx].rbType == RB_TYPE_DRB)
+               if(duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.rbId == drbId && \
+                  duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.rbType == RB_TYPE_DRB)
                {
-                  lcId = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.rlcLcCfg[lcIdx].lcId;
+                  lcId = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.lcId;
                   return lcId;
                }
             }
@@ -352,30 +413,6 @@ uint8_t BuildDLNRInfo(NRFreqInfo_t *dlnrfreq)
    return ROK;
 }
 
-/*******************************************************************
- *
- * @brief Builds NRCell ID 
- *
- * @details
- *
- *    Function : BuildNrCellId
- *
- *    Functionality: Building the NR Cell ID
- *
- * @params[in] BIT_STRING_t *nrcell
- * @return ROK     - success
- *         RFAILED - failure
- *
- * ****************************************************************/
-
-S16 BuildNrCellId(BIT_STRING_t *nrcell)
-{
-   memset(nrcell->buf, 0, nrcell->size);
-   nrcell->buf[4]   = duCfgParam.sib1Params.cellIdentity; 
-   nrcell->bits_unused = 4;
-   return ROK;
-}
-
 /*******************************************************************
  *
  * @brief Builds Nrcgi 
@@ -415,7 +452,7 @@ uint8_t BuildNrcgi(NRCGI_t *nrcgi)
    {
       return RFAILED;
    }
-   BuildNrCellId(&nrcgi->nRCellIdentity);
+   fillBitString(&nrcgi->nRCellIdentity, ODU_VALUE_FOUR, ODU_VALUE_FIVE, duCfgParam.sib1Params.cellIdentity);
 
    return ROK;
 }
@@ -1177,7 +1214,7 @@ void freeFddNrFreqInfo(FDD_Info_t *fDD)
  * ****************************************************************/
 void FreeServedCellList( GNB_DU_Served_Cells_List_t *duServedCell)
 {
-   uint8_t   plmnCnt=MAX_PLMN;
+   uint8_t   plmnCnt= 1;
    uint8_t  extensionCnt=IE_EXTENSION_LIST_COUNT;
    uint8_t  plmnIdx=0, sliceIdx=0;
    GNB_DU_Served_Cells_Item_t *srvCellItem;
@@ -1411,7 +1448,7 @@ uint8_t BuildAndSendF1SetupReq()
 
       f1SetupReq = &f1apMsg->choice.initiatingMessage->value.choice.F1SetupRequest;
 
-      elementCnt = (duCfgParam.duName != NULL) ? 5 : 4;
+      elementCnt = 4;
 
       f1SetupReq->protocolIEs.list.count = elementCnt;
       f1SetupReq->protocolIEs.list.size = elementCnt * sizeof(F1SetupRequestIEs_t );
@@ -1420,16 +1457,16 @@ uint8_t BuildAndSendF1SetupReq()
       DU_ALLOC(f1SetupReq->protocolIEs.list.array,f1SetupReq->protocolIEs.list.size);
       if(f1SetupReq->protocolIEs.list.array == NULLP)
       {
-        break;
+         break;
       }
       for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
       {
-        DU_ALLOC(f1SetupReq->protocolIEs.list.array[ieIdx],\
-              sizeof(F1SetupRequestIEs_t));
-        if(f1SetupReq->protocolIEs.list.array[ieIdx] == NULLP)
-        {
-           break;
-        }
+         DU_ALLOC(f1SetupReq->protocolIEs.list.array[ieIdx],\
+               sizeof(F1SetupRequestIEs_t));
+         if(f1SetupReq->protocolIEs.list.array[ieIdx] == NULLP)
+         {
+            break;
+         }
       }
 
       ieIdx = 0;
@@ -1437,84 +1474,89 @@ uint8_t BuildAndSendF1SetupReq()
       f1SetupReq->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_TransactionID;
       f1SetupReq->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
       f1SetupReq->protocolIEs.list.array[ieIdx]->value.present =\
-                                                              F1SetupRequestIEs__value_PR_TransactionID;
+                                                                F1SetupRequestIEs__value_PR_TransactionID;
       f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.TransactionID = \
-                                                                            TRANS_ID;
+                                                                              TRANS_ID;
 
       /*DU ID*/
       ieIdx++;
       f1SetupReq->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_DU_ID;
       f1SetupReq->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
       f1SetupReq->protocolIEs.list.array[ieIdx]->value.present = \
-                                                               F1SetupRequestIEs__value_PR_GNB_DU_ID;
+                                                                 F1SetupRequestIEs__value_PR_GNB_DU_ID;
       f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_ID.size =\
-                                                                            sizeof(uint8_t);
+                                                                              sizeof(uint8_t);
 
       DU_ALLOC(f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_ID.buf,\
-           f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_ID.size);
+            f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_ID.size);
       if(f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_ID.buf == \
-           NULLP)
+            NULLP)
       {
-        break;
+         break;
       }
 
       f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_ID.buf[0] =\
-         duCfgParam.duId;
-
+                                                                                duCfgParam.duId;
+#if 0
+      /* DU name IE is of type printableString_t which wireshark is unable to decode.
+       * However this string is decoded successfully on online decoders.
+       * Since this is an optional IE and the value received in it are not
+       * used as of now, eliminating this IE for now to avoid wireshark error.
+       */
       /*DU Name*/
       if(duCfgParam.duName != NULL)
       {
-        ieIdx++;
-        f1SetupReq->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_DU_Name;
-        f1SetupReq->protocolIEs.list.array[ieIdx]->criticality = Criticality_ignore;
-        f1SetupReq->protocolIEs.list.array[ieIdx]->value.present = F1SetupRequestIEs__value_PR_GNB_DU_Name;
-        f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_Name.size =\
-           strlen((char *)duCfgParam.duName);
-        DU_ALLOC(f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.\
-              GNB_DU_Name.buf, strlen((char *)duCfgParam.duName));
-        if(f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_Name.\
-              buf == NULLP)
-        {
-           break;
-        }
-        strcpy((char*)f1SetupReq->protocolIEs.list.array[ieIdx]->value.\
-              choice.GNB_DU_Name.buf,
-              (char*)&duCfgParam.duName);
-
+         ieIdx++;
+         f1SetupReq->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_DU_Name;
+         f1SetupReq->protocolIEs.list.array[ieIdx]->criticality = Criticality_ignore;
+         f1SetupReq->protocolIEs.list.array[ieIdx]->value.present = F1SetupRequestIEs__value_PR_GNB_DU_Name;
+         f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_Name.size = strlen((char *)duCfgParam.duName);
+         DU_ALLOC(f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_Name.buf, \
+               f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_Name.size);
+         if(f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_Name.buf == NULLP)
+         {
+            break;
+         }
+         strcpy((char*)f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_Name.buf,
+               (char*)&duCfgParam.duName);
       }
+#endif
 
       /*Served Cell list */
       ieIdx++;
       f1SetupReq->protocolIEs.list.array[ieIdx]->id = \
-                                                    ProtocolIE_ID_id_gNB_DU_Served_Cells_List;
+                                                      ProtocolIE_ID_id_gNB_DU_Served_Cells_List;
       f1SetupReq->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
       f1SetupReq->protocolIEs.list.array[ieIdx]->value.present = \
-                                                               F1SetupRequestIEs__value_PR_GNB_DU_Served_Cells_List;
+                                                                 F1SetupRequestIEs__value_PR_GNB_DU_Served_Cells_List;
       duServedCell = &f1SetupReq->protocolIEs.list.\
-                    array[ieIdx]->value.choice.GNB_DU_Served_Cells_List;
+                     array[ieIdx]->value.choice.GNB_DU_Served_Cells_List;
       if(BuildServedCellList(duServedCell))
       {
-        break;
+         break;
       }
+
+
       /*RRC Version*/
       ieIdx++;
       f1SetupReq->protocolIEs.list.array[ieIdx]->id = \
-                                                    ProtocolIE_ID_id_GNB_DU_RRC_Version ;
+                                                      ProtocolIE_ID_id_GNB_DU_RRC_Version ;
       f1SetupReq->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
       f1SetupReq->protocolIEs.list.array[ieIdx]->value.present = \
-                                                               F1SetupRequestIEs__value_PR_RRC_Version;
+                                                                 F1SetupRequestIEs__value_PR_RRC_Version;
       rrcVer = &f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.RRC_Version;
       if(BuildRrcVer(rrcVer))
       {
-        break;
+         break;
       }
+
       xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
 
       /* Encode the F1SetupRequest type as APER */
       memset(encBuf, 0, ENC_BUF_MAX_LEN);
       encBufSize = 0;
       encRetVal = aper_encode(&asn_DEF_F1AP_PDU, 0, f1apMsg, PrepFinalEncBuf,\
-           encBuf);
+            encBuf);
 
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
@@ -1526,17 +1568,19 @@ uint8_t BuildAndSendF1SetupReq()
       else
       {
          DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for F1SetupRequest\n");
+#ifdef DEBUG_ASN_PRINT
          for(ieIdx=0; ieIdx< encBufSize; ieIdx++)
          {
             printf("%x",encBuf[ieIdx]);
          }
-         
+#endif
+
          duCb.f1SetupReqAndRspMsg.f1MsgReqBufSize = encBufSize;
          DU_ALLOC(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf, encBufSize);
          if(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf == NULLP)
          {
-             DU_LOG("\nERROR  -->  F1AP : Memory allocation failed to store the encoding of f1setup req");
-             return RFAILED;
+            DU_LOG("\nERROR  -->  F1AP : Memory allocation failed to store the encoding of f1setup req");
+            return RFAILED;
          }
          memcpy(duCb.f1SetupReqAndRspMsg.f1MsgReqBuf, &encBuf, duCb.f1SetupReqAndRspMsg.f1MsgReqBufSize);
       }
@@ -2461,10 +2505,12 @@ uint8_t BuildAndSendDUConfigUpdate(ServCellAction servCellAction)
       else
       {
          DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for DUConfigUpdate\n");
+#ifdef DEBUG_ASN_PRINT
          for(ieIdx =0; ieIdx < encBufSize; ieIdx++)
          {
             printf("%x",encBuf[ieIdx]);
          }
+#endif
       }
       /* Sending msg */
       if(sendF1APMsg() != ROK)
@@ -2547,22 +2593,20 @@ void FreeULRRCMessageTransfer( F1AP_PDU_t *f1apMsg)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t BuildAndSendULRRCMessageTransfer(DuUeCb  ueCb, uint8_t lcId, \
+uint8_t BuildAndSendULRRCMessageTransfer(DuUeCb  *ueCb, uint8_t lcId, \
       uint16_t msgLen, uint8_t *rrcMsg)
 {
-   uint8_t   elementCnt =0;
-   uint8_t   idx1 =0;
-   uint8_t   idx =0;
-   F1AP_PDU_t                  *f1apMsg = NULLP;
-   ULRRCMessageTransfer_t      *ulRRCMsg = NULLP;
-   asn_enc_rval_t              encRetVal;        /* Encoder return value */
-   uint8_t ret =RFAILED;
+   uint8_t                 elementCnt=0, idx1=0, idx=0;
+   uint8_t                 ret = RFAILED;
+   F1AP_PDU_t              *f1apMsg = NULLP;
+   ULRRCMessageTransfer_t  *ulRRCMsg = NULLP;
+   asn_enc_rval_t          encRetVal;        /* Encoder return value */
    
    memset(&encRetVal, 0, sizeof(asn_enc_rval_t));
 
    while(true)
    {
-      DU_LOG("\n INFO   -->  F1AP : Building UL RRC Message Transfer Message\n");
+      DU_LOG("\nINFO   -->  F1AP : Building UL RRC Message Transfer Message\n");
 
       DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
@@ -2611,7 +2655,7 @@ uint8_t BuildAndSendULRRCMessageTransfer(DuUeCb  ueCb, uint8_t lcId, \
       ulRRCMsg->protocolIEs.list.array[idx1]->criticality = Criticality_reject;
       ulRRCMsg->protocolIEs.list.array[idx1]->value.present = \
                                                              ULRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
-      ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.GNB_CU_UE_F1AP_ID = ueCb.gnbCuUeF1apId;
+      ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.GNB_CU_UE_F1AP_ID = ueCb->gnbCuUeF1apId;
 
       /*GNB DU UE F1AP ID*/
       idx1++;
@@ -2619,7 +2663,7 @@ uint8_t BuildAndSendULRRCMessageTransfer(DuUeCb  ueCb, uint8_t lcId, \
       ulRRCMsg->protocolIEs.list.array[idx1]->criticality = Criticality_reject;
       ulRRCMsg->protocolIEs.list.array[idx1]->value.present = \
                                                              ULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
-      ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.GNB_DU_UE_F1AP_ID = ueCb.gnbDuUeF1apId;
+      ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.GNB_DU_UE_F1AP_ID = ueCb->gnbDuUeF1apId;
 
       /*SRBID*/
       idx1++;
@@ -2663,11 +2707,13 @@ uint8_t BuildAndSendULRRCMessageTransfer(DuUeCb  ueCb, uint8_t lcId, \
       }
       else
       {
-        DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for ULRRCMessageTransfer\n");
+        DU_LOG("\nDEBUG  -->  F1AP : Created APER encoded buffer for ULRRCMessageTransfer\n");
+#ifdef DEBUG_ASN_PRINT
         for(int i=0; i< encBufSize; i++)
         {
            printf("%x",encBuf[i]);
         }
+#endif
       }
 
       /* Sending  msg  */
@@ -2717,7 +2763,7 @@ uint8_t BuildTagConfig(DuUeCb *ueCb, struct TAG_Config *tagConfig)
    if(ueCb == NULLP)
       elementCnt = ODU_VALUE_ONE;
    else
-      elementCnt = ueCb->macUeCfg.macCellGrpCfg.tagCfg.addModListCount;
+      elementCnt = ueCb->duMacUeCfg.macCellGrpCfg.tagCfg.addModListCount;
 
    tagList = tagConfig->tag_ToAddModList;
    tagList->list.count = elementCnt;
@@ -2752,8 +2798,8 @@ uint8_t BuildTagConfig(DuUeCb *ueCb, struct TAG_Config *tagConfig)
    {
       for(idx=0; idx<tagList->list.count; idx++)
       {
-         tagList->list.array[idx]->tag_Id = ueCb->macUeCfg.macCellGrpCfg.tagCfg.addModList[idx].tagId;
-         tagList->list.array[idx]->timeAlignmentTimer = ueCb->macUeCfg.macCellGrpCfg.tagCfg.addModList[idx].timeAlignTimer;
+         tagList->list.array[idx]->tag_Id = ueCb->duMacUeCfg.macCellGrpCfg.tagCfg.addModList[idx].tagId;
+         tagList->list.array[idx]->timeAlignmentTimer = ueCb->duMacUeCfg.macCellGrpCfg.tagCfg.addModList[idx].timeAlignTimer;
       }
    }
 
@@ -2800,13 +2846,13 @@ uint8_t BuildPhrConfig(DuUeCb *ueCb, struct MAC_CellGroupConfig__phr_Config *phr
    }
    else
    {
-      phrConfig->choice.setup->phr_PeriodicTimer        = ueCb->macUeCfg.macCellGrpCfg.phrCfg.periodicTimer;
-      phrConfig->choice.setup->phr_ProhibitTimer        = ueCb->macUeCfg.macCellGrpCfg.phrCfg.prohibitTimer;
-      phrConfig->choice.setup->phr_Tx_PowerFactorChange = ueCb->macUeCfg.macCellGrpCfg.phrCfg.txPowerFactor;
-      phrConfig->choice.setup->multiplePHR              = ueCb->macUeCfg.macCellGrpCfg.phrCfg.multiplePHR;
-      phrConfig->choice.setup->dummy                    = ueCb->macUeCfg.macCellGrpCfg.phrCfg.dummy;
-      phrConfig->choice.setup->phr_Type2OtherCell       = ueCb->macUeCfg.macCellGrpCfg.phrCfg.phrType2OtherCell;
-      phrConfig->choice.setup->phr_ModeOtherCG          = ueCb->macUeCfg.macCellGrpCfg.phrCfg.phrOtherCG;
+      phrConfig->choice.setup->phr_PeriodicTimer        = ueCb->duMacUeCfg.macCellGrpCfg.phrCfg.periodicTimer;
+      phrConfig->choice.setup->phr_ProhibitTimer        = ueCb->duMacUeCfg.macCellGrpCfg.phrCfg.prohibitTimer;
+      phrConfig->choice.setup->phr_Tx_PowerFactorChange = ueCb->duMacUeCfg.macCellGrpCfg.phrCfg.txPowerFactor;
+      phrConfig->choice.setup->multiplePHR              = ueCb->duMacUeCfg.macCellGrpCfg.phrCfg.multiplePHR;
+      phrConfig->choice.setup->dummy                    = ueCb->duMacUeCfg.macCellGrpCfg.phrCfg.dummy;
+      phrConfig->choice.setup->phr_Type2OtherCell       = ueCb->duMacUeCfg.macCellGrpCfg.phrCfg.phrType2OtherCell;
+      phrConfig->choice.setup->phr_ModeOtherCG          = ueCb->duMacUeCfg.macCellGrpCfg.phrCfg.phrOtherCG;
    }
 
    return ROK;
@@ -2838,8 +2884,8 @@ uint8_t BuildBsrConfig(DuUeCb *ueCb, struct BSR_Config *bsrConfig)
    }
    else
    {
-      bsrConfig->periodicBSR_Timer = convertBsrPeriodicTmrValueToEnum(ueCb->macUeCfg.macCellGrpCfg.bsrTmrCfg.periodicTimer);
-      bsrConfig->retxBSR_Timer     = convertBsrRetxTmrValueToEnum(ueCb->macUeCfg.macCellGrpCfg.bsrTmrCfg.retxTimer);
+      bsrConfig->periodicBSR_Timer = convertBsrPeriodicTmrValueToEnum(ueCb->duMacUeCfg.macCellGrpCfg.bsrTmrCfg.periodicTimer);
+      bsrConfig->retxBSR_Timer     = convertBsrRetxTmrValueToEnum(ueCb->duMacUeCfg.macCellGrpCfg.bsrTmrCfg.retxTimer);
 
       bsrConfig->logicalChannelSR_DelayTimer = NULLP;
       DU_ALLOC(bsrConfig->logicalChannelSR_DelayTimer, sizeof(long));
@@ -2848,7 +2894,7 @@ uint8_t BuildBsrConfig(DuUeCb *ueCb, struct BSR_Config *bsrConfig)
          DU_LOG("\nERROR  --> DU APP: Memory allocation failed in BuildBsrConfig");
          return RFAILED;
       }
-      *(bsrConfig->logicalChannelSR_DelayTimer) = convertLcSrDelayTmrValueToEnum(ueCb->macUeCfg.macCellGrpCfg.bsrTmrCfg.srDelayTimer);
+      *(bsrConfig->logicalChannelSR_DelayTimer) = convertLcSrDelayTmrValueToEnum(ueCb->duMacUeCfg.macCellGrpCfg.bsrTmrCfg.srDelayTimer);
    }
 
    return ROK;
@@ -2887,7 +2933,7 @@ uint8_t BuildSchedulingReqConfig(DuUeCb *ueCb, struct SchedulingRequestConfig *s
    if(ueCb == NULLP)
       elementCnt = ODU_VALUE_ONE;
    else
-      elementCnt = ueCb->macUeCfg.macCellGrpCfg.schReqCfg.addModListCount;
+      elementCnt = ueCb->duMacUeCfg.macCellGrpCfg.schReqCfg.addModListCount;
 
    schReqList = schedulingRequestConfig->schedulingRequestToAddModList;
    schReqList->list.count = elementCnt;
@@ -2931,7 +2977,7 @@ uint8_t BuildSchedulingReqConfig(DuUeCb *ueCb, struct SchedulingRequestConfig *s
    {
       for(idx=0; idx<schReqList->list.count; idx++)
       {
-         schReqList->list.array[idx]->schedulingRequestId = ueCb->macUeCfg.macCellGrpCfg.schReqCfg.addModList[idx].schedReqId;
+         schReqList->list.array[idx]->schedulingRequestId = ueCb->duMacUeCfg.macCellGrpCfg.schReqCfg.addModList[idx].schedReqId;
 
          schReqList->list.array[idx]->sr_ProhibitTimer = NULLP;
          DU_ALLOC(schReqList->list.array[idx]->sr_ProhibitTimer, sizeof(long));
@@ -2940,8 +2986,8 @@ uint8_t BuildSchedulingReqConfig(DuUeCb *ueCb, struct SchedulingRequestConfig *s
             DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSchedulingReqConfig");
             return RFAILED;
          }
-         *(schReqList->list.array[idx]->sr_ProhibitTimer) = ueCb->macUeCfg.macCellGrpCfg.schReqCfg.addModList[idx].srProhibitTmr;
-         schReqList->list.array[idx]->sr_TransMax = ueCb->macUeCfg.macCellGrpCfg.schReqCfg.addModList[idx].srTransMax;
+         *(schReqList->list.array[idx]->sr_ProhibitTimer) = ueCb->duMacUeCfg.macCellGrpCfg.schReqCfg.addModList[idx].srProhibitTmr;
+         schReqList->list.array[idx]->sr_TransMax = ueCb->duMacUeCfg.macCellGrpCfg.schReqCfg.addModList[idx].srTransMax;
       }
    }
 
@@ -3331,12 +3377,12 @@ uint8_t BuildRlcBearerToAddModList(DuUeCb *ueCb, struct CellGroupConfigRrc__rlc_
    if(ueCb == NULLP)
       elementCnt = 1;
    else if(ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY)
-      elementCnt = ueCb->rlcUeCfg.numLcs;
+      elementCnt = ueCb->duRlcUeCfg.numLcs;
    else
    {
-      for(lcIdx = 0; lcIdx<ueCb->rlcUeCfg.numLcs; lcIdx++)
+      for(lcIdx = 0; lcIdx<ueCb->duRlcUeCfg.numLcs; lcIdx++)
       {
-         if(ueCb->rlcUeCfg.rlcLcCfg[lcIdx].isLcAddModRspSent == false)
+         if(ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.isLcAddModRspSent == false)
             elementCnt++;
       }
    }
@@ -3407,13 +3453,13 @@ uint8_t BuildRlcBearerToAddModList(DuUeCb *ueCb, struct CellGroupConfigRrc__rlc_
    else
    {
       idx=0;
-      for(lcIdx=0; lcIdx<ueCb->rlcUeCfg.numLcs; lcIdx++)
+      for(lcIdx=0; lcIdx<ueCb->duRlcUeCfg.numLcs; lcIdx++)
       {
-         if((ueCb->f1UeDb->actionType != UE_CTXT_CFG_QUERY) && (ueCb->rlcUeCfg.rlcLcCfg[lcIdx].isLcAddModRspSent == true))
+         if((ueCb->f1UeDb->actionType != UE_CTXT_CFG_QUERY) && (ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.isLcAddModRspSent == true))
             continue;
 
          /* Fill Logical channel identity */
-         rlcBearerList->list.array[idx]->logicalChannelIdentity = ueCb->rlcUeCfg.rlcLcCfg[lcIdx].lcId;
+         rlcBearerList->list.array[idx]->logicalChannelIdentity = ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.lcId;
 
          /* Fill Radio Bearer Id and type (DRB/SRB) for this logical channel */
          DU_ALLOC(rlcBearerList->list.array[idx]->servedRadioBearer, sizeof(struct RLC_BearerConfig__servedRadioBearer));
@@ -3423,20 +3469,20 @@ uint8_t BuildRlcBearerToAddModList(DuUeCb *ueCb, struct CellGroupConfigRrc__rlc_
             return RFAILED;
          }
          rlcBearerList->list.array[idx]->servedRadioBearer->present = \
-                                                                      covertRbTypeFromIntEnumToRrcEnum(ueCb->rlcUeCfg.rlcLcCfg[lcIdx].rbType);
+                                                                      covertRbTypeFromIntEnumToRrcEnum(ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.rbType);
          switch(rlcBearerList->list.array[idx]->servedRadioBearer->present)
          {
             case RLC_BearerConfig__servedRadioBearer_PR_srb_Identity: 
-               rlcBearerList->list.array[idx]->servedRadioBearer->choice.srb_Identity = ueCb->rlcUeCfg.rlcLcCfg[lcIdx].rbId;
+               rlcBearerList->list.array[idx]->servedRadioBearer->choice.srb_Identity = ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.rbId;
                break;
             case RLC_BearerConfig__servedRadioBearer_PR_drb_Identity:
-               rlcBearerList->list.array[idx]->servedRadioBearer->choice.drb_Identity = ueCb->rlcUeCfg.rlcLcCfg[lcIdx].rbId;
+               rlcBearerList->list.array[idx]->servedRadioBearer->choice.drb_Identity = ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.rbId;
                break;
             case RLC_BearerConfig__servedRadioBearer_PR_NOTHING:
             default:
                break;
          }
-         ueCb->rlcUeCfg.rlcLcCfg[lcIdx].isLcAddModRspSent = true;
+         ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.isLcAddModRspSent = true;
 
          rlcBearerList->list.array[idx]->reestablishRLC = NULLP;
 
@@ -3448,7 +3494,7 @@ uint8_t BuildRlcBearerToAddModList(DuUeCb *ueCb, struct CellGroupConfigRrc__rlc_
             DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
             return RFAILED;
          }
-         if(BuildRlcConfig(&ueCb->rlcUeCfg.rlcLcCfg[lcIdx], rlcBearerList->list.array[idx]->rlc_Config) != ROK)
+         if(BuildRlcConfig(&ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg, rlcBearerList->list.array[idx]->rlc_Config) != ROK)
          {
             DU_LOG("\nERROR  -->  F1AP : BuildRlcConfig failed");
             return RFAILED;
@@ -3462,11 +3508,11 @@ uint8_t BuildRlcBearerToAddModList(DuUeCb *ueCb, struct CellGroupConfigRrc__rlc_
             DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
             return RFAILED;
          }
-         for(macLcIdx = 0; macLcIdx < ueCb->macUeCfg.numLcs; macLcIdx++)
+         for(macLcIdx = 0; macLcIdx < ueCb->duMacUeCfg.numLcs; macLcIdx++)
          {
-            if(ueCb->macUeCfg.lcCfgList[macLcIdx].lcId == ueCb->rlcUeCfg.rlcLcCfg[lcIdx].lcId)
+            if(ueCb->duMacUeCfg.lcCfgList[macLcIdx].lcConfig.lcId == ueCb->duRlcUeCfg.rlcLcCfg[lcIdx].rlcBearerCfg.lcId)
             {
-               if(BuildMacLCConfig(&ueCb->macUeCfg.lcCfgList[macLcIdx], rlcBearerList->list.array[idx]->mac_LogicalChannelConfig) != ROK)
+               if(BuildMacLCConfig(&ueCb->duMacUeCfg.lcCfgList[macLcIdx].lcConfig, rlcBearerList->list.array[idx]->mac_LogicalChannelConfig) != ROK)
                {
                   DU_LOG("\nERROR  -->  F1AP : BuildMacLCConfig failed");
                   return RFAILED;
@@ -4037,14 +4083,16 @@ elementCnt = pdschCfg->numTimeDomRsrcAlloc;
       for(idx = 0; idx < elementCnt; idx++)
       {
          timeDomAlloc = timeDomAllocList->choice.setup->list.array[idx];
-         DU_ALLOC(timeDomAlloc->k0, sizeof(long));
-         if(!timeDomAlloc->k0)
-         {
-            DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
-            return RFAILED;
-         }
          if(pdschCfg->timeDomRsrcAllociList[idx].k0)
+         {
+            DU_ALLOC(timeDomAlloc->k0, sizeof(long));
+            if(!timeDomAlloc->k0)
+            {
+               DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+               return RFAILED;
+            }
             *(timeDomAlloc->k0) = *(pdschCfg->timeDomRsrcAllociList[idx].k0);
+         }
          timeDomAlloc->mappingType = pdschCfg->timeDomRsrcAllociList[idx].mappingType;
          timeDomAlloc->startSymbolAndLength = pdschCfg->timeDomRsrcAllociList[idx].startSymbolAndLength;
       }
@@ -5459,6 +5507,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
       DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcAddModList");
       return RFAILED;
    }
+
    resourceList->list.array[rsrcIdx]->sequenceId = SRS_SEQ_ID;
 
    return ROK;
@@ -5624,7 +5673,6 @@ uint8_t BuildBWPUlDedSrsCfg(SRS_Config_t *srsCfg)
    {
       return RFAILED;
    }
-
    srsCfg->tpc_Accumulation = NULLP;
 
    return ROK;
@@ -5663,6 +5711,7 @@ uint8_t BuildPuschSrvCellCfg(struct UplinkConfig__pusch_ServingCellConfig *pusch
    puschCfg->choice.setup->rateMatching = NULLP;
    puschCfg->choice.setup->xOverhead = NULLP;
    puschCfg->choice.setup->ext1 = NULLP;
+
    DU_ALLOC(puschCfg->choice.setup->ext1, sizeof(struct PUSCH_ServingCellConfig__ext1));
    if(!puschCfg->choice.setup->ext1)
    {
@@ -5687,6 +5736,7 @@ uint8_t BuildPuschSrvCellCfg(struct UplinkConfig__pusch_ServingCellConfig *pusch
       return RFAILED;
    }
    *(puschCfg->choice.setup->ext1->processingType2Enabled) = PUSCH_PROCESS_TYPE2_ENABLED;
+
    return ROK;
 }
 
@@ -5808,13 +5858,13 @@ uint8_t BuildInitialUlBWP(InitialUlBwp *initUlBwp, BWP_UplinkDedicated_t *ulBwp)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t BuildUlCfg(ServCellCfgInfo *servCellCfg, UplinkConfig_t *ulCfg)
+uint8_t BuildUlCfg(ServCellRecfgInfo *servCellRecfg, UplinkConfig_t *ulCfg)
 {
    InitialUlBwp *initUlBwp = NULLP;
 
-   if(servCellCfg)
+   if(servCellRecfg)
    {
-      initUlBwp = &servCellCfg->initUlBwp;
+      initUlBwp = &servCellRecfg->initUlBwp;
    }
 
    ulCfg->initialUplinkBWP = NULLP;
@@ -5839,10 +5889,10 @@ uint8_t BuildUlCfg(ServCellCfgInfo *servCellCfg, UplinkConfig_t *ulCfg)
       DU_LOG("\nERROR  -->  F1AP : Memory Allocation failed in BuildUlCfg");
       return RFAILED;
    }
-   if(servCellCfg == NULLP)
+   if(servCellRecfg == NULLP)
       *(ulCfg->firstActiveUplinkBWP_Id) = ACTIVE_UL_BWP_ID;
    else
-      *(ulCfg->firstActiveUplinkBWP_Id) = servCellCfg->firstActvUlBwpId;
+      *(ulCfg->firstActiveUplinkBWP_Id) = servCellRecfg->firstActvUlBwpId;
 
    ulCfg->pusch_ServingCellConfig = NULLP;
    DU_ALLOC(ulCfg->pusch_ServingCellConfig, sizeof(struct UplinkConfig__pusch_ServingCellConfig));
@@ -5996,18 +6046,18 @@ uint8_t BuildCsiMeasCfg(struct ServingCellConfig__csi_MeasConfig *csiMeasCfg)
  *
  *    Functionality: Builds DL BWP to add/modify list
  *
- * @params[in] ServCellCfgInfo *servCellCfg, 
+ * @params[in] ServCellRecfgInfo *servCellRecfg, 
  *             struct ServingCellConfig__downlinkBWP_ToAddModList *dlBwpAddModList
  *
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/ 
-uint8_t BuildDlBwpToAddModList(ServCellCfgInfo *servCellCfg, struct ServingCellConfig__downlinkBWP_ToAddModList *dlBwpAddModList)
+uint8_t BuildDlBwpToAddModList(ServCellRecfgInfo *servCellRecfg, struct ServingCellConfig__downlinkBWP_ToAddModList *dlBwpAddModList)
 {
    uint8_t elementCnt, idx;
 
-   elementCnt = servCellCfg->numDlBwpToAdd;
+   elementCnt = servCellRecfg->numDlBwpToAddOrMod;
    dlBwpAddModList->list.count = elementCnt;
    dlBwpAddModList->list.size = elementCnt * sizeof(struct BWP_Downlink *);
    dlBwpAddModList->list.array = NULLP;
@@ -6030,7 +6080,7 @@ uint8_t BuildDlBwpToAddModList(ServCellCfgInfo *servCellCfg, struct ServingCellC
 
    for(idx=0; idx<dlBwpAddModList->list.count; idx++)
    {
-      dlBwpAddModList->list.array[idx]->bwp_Id = servCellCfg->DlBwpToAddList[idx].bwpId;
+      dlBwpAddModList->list.array[idx]->bwp_Id = servCellRecfg->dlBwpToAddOrModList[idx].bwpId;
       dlBwpAddModList->list.array[idx]->bwp_Common = NULLP;
       dlBwpAddModList->list.array[idx]->bwp_Dedicated = NULLP;
    }
@@ -6054,24 +6104,18 @@ uint8_t BuildDlBwpToAddModList(ServCellCfgInfo *servCellCfg, struct ServingCellC
  * ****************************************************************/
 uint8_t BuildSpCellCfgDed(DuUeCb *ueCb, ServingCellConfig_t *srvCellCfg)
 {
-   ServCellCfgInfo *servCellCfg = NULLP;
+   ServCellRecfgInfo *servCellRecfg = NULLP;
    InitialDlBwp *initDlBwp = NULLP;
    PdschServCellCfg *pdschServCellDb = NULLP;
 
    if(ueCb)
    {
-      servCellCfg = &ueCb->macUeCfg.spCellCfg.servCellCfg;
-      initDlBwp = &servCellCfg->initDlBwp;
-      pdschServCellDb = &servCellCfg->pdschServCellCfg;
+      servCellRecfg = &ueCb->duMacUeCfg.spCellCfg.servCellCfg;
+      initDlBwp = &servCellRecfg->initDlBwp;
+      pdschServCellDb = &servCellRecfg->pdschServCellCfg;
    }
 
    srvCellCfg->tdd_UL_DL_ConfigurationDedicated = NULLP;
-   DU_ALLOC(srvCellCfg->tdd_UL_DL_ConfigurationDedicated, sizeof(TDD_UL_DL_ConfigDedicated_t));
-   if(!srvCellCfg->tdd_UL_DL_ConfigurationDedicated)
-   {
-      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
-      return RFAILED;
-   }
 
    srvCellCfg->initialDownlinkBWP = NULLP;
    DU_ALLOC(srvCellCfg->initialDownlinkBWP, sizeof(BWP_DownlinkDedicated_t));
@@ -6090,7 +6134,7 @@ uint8_t BuildSpCellCfgDed(DuUeCb *ueCb, ServingCellConfig_t *srvCellCfg)
    srvCellCfg->downlinkBWP_ToReleaseList = NULLP;
 
    srvCellCfg->downlinkBWP_ToAddModList = NULLP;
-   if(ueCb && ueCb->macUeCfg.spCellCfg.servCellCfg.numDlBwpToAdd)
+   if(ueCb && ueCb->duMacUeCfg.spCellCfg.servCellCfg.numDlBwpToAddOrMod)
    {
       DU_ALLOC(srvCellCfg->downlinkBWP_ToAddModList, sizeof(struct ServingCellConfig__downlinkBWP_ToAddModList));
       if(srvCellCfg->downlinkBWP_ToAddModList == NULLP)
@@ -6099,7 +6143,7 @@ uint8_t BuildSpCellCfgDed(DuUeCb *ueCb, ServingCellConfig_t *srvCellCfg)
          return RFAILED;
       }
 
-      if(BuildDlBwpToAddModList(&ueCb->macUeCfg.spCellCfg.servCellCfg, srvCellCfg->downlinkBWP_ToAddModList) != ROK)
+      if(BuildDlBwpToAddModList(&ueCb->duMacUeCfg.spCellCfg.servCellCfg, srvCellCfg->downlinkBWP_ToAddModList) != ROK)
       {
          DU_LOG("\nERROR  -->  F1AP : BuildInitialDlBWP failed");
          return RFAILED;
@@ -6116,7 +6160,7 @@ uint8_t BuildSpCellCfgDed(DuUeCb *ueCb, ServingCellConfig_t *srvCellCfg)
    if(ueCb == NULLP)
       *(srvCellCfg->firstActiveDownlinkBWP_Id) = ACTIVE_DL_BWP_ID;
    else
-      *(srvCellCfg->firstActiveDownlinkBWP_Id) = ueCb->macUeCfg.spCellCfg.servCellCfg.firstActvDlBwpId;
+      *(srvCellCfg->firstActiveDownlinkBWP_Id) = ueCb->duMacUeCfg.spCellCfg.servCellCfg.firstActvDlBwpId;
 
    srvCellCfg->bwp_InactivityTimer = NULLP;
 
@@ -6130,7 +6174,7 @@ uint8_t BuildSpCellCfgDed(DuUeCb *ueCb, ServingCellConfig_t *srvCellCfg)
    if(ueCb == NULLP)
       *(srvCellCfg->defaultDownlinkBWP_Id) = ACTIVE_DL_BWP_ID;
    else
-      *(srvCellCfg->defaultDownlinkBWP_Id) = ueCb->macUeCfg.spCellCfg.servCellCfg.defaultDlBwpId;
+      *(srvCellCfg->defaultDownlinkBWP_Id) = ueCb->duMacUeCfg.spCellCfg.servCellCfg.defaultDlBwpId;
 
    srvCellCfg->uplinkConfig = NULLP;
    DU_ALLOC(srvCellCfg->uplinkConfig, sizeof(UplinkConfig_t));
@@ -6140,7 +6184,7 @@ uint8_t BuildSpCellCfgDed(DuUeCb *ueCb, ServingCellConfig_t *srvCellCfg)
       return RFAILED;
    }
 
-   if(BuildUlCfg(servCellCfg, srvCellCfg->uplinkConfig) != ROK)
+   if(BuildUlCfg(servCellRecfg, srvCellCfg->uplinkConfig) != ROK)
    {
       DU_LOG("\nERROR  -->  F1AP : BuildUlCfg failed");
       return RFAILED;
@@ -6187,209 +6231,1116 @@ uint8_t BuildSpCellCfgDed(DuUeCb *ueCb, ServingCellConfig_t *srvCellCfg)
 
    return ROK;
 }
+
 /*******************************************************************
  *
- * @brief Builds Spcell config 
+ * @brief Fills SCS specific carrier list in DL frequency info
  *
  * @details
  *
- *    Function : BuildSpCellCfg 
+ *    Function : BuildScsSpecificCarrierListDl
  *
- *    Functionality: Builds sp cell config in DuToCuRrcContainer
+ *    Functionality: Fills SCS specific carrier list in DL frequency info
  *
- * @params[in] SpCellConfig_t spCellCfg
+ * @params[in] Pointer to struct FrequencyInfoDL__scs_SpecificCarrierList
  *
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t BuildSpCellCfg(DuUeCb *ueCb, SpCellConfig_t *spCellCfg)
+uint8_t BuildScsSpecificCarrierListDl(struct FrequencyInfoDL__scs_SpecificCarrierList *scsCarrierList)
 {
-   spCellCfg->servCellIndex = NULLP;
-   DU_ALLOC(spCellCfg->servCellIndex, sizeof(long));
-   if(!spCellCfg->servCellIndex)
+   uint8_t elementCnt = 0, listIdx = 0;
+   ScsSpecCarrier duScsSpecCarrier = duCfgParam.sib1Params.srvCellCfgCommSib.dlCfg.dlScsCarrier;
+
+   elementCnt = ODU_VALUE_ONE;
+   scsCarrierList->list.count = elementCnt;
+   scsCarrierList->list.size = elementCnt * sizeof(SCS_SpecificCarrier_t *);
+
+   DU_ALLOC(scsCarrierList->list.array, scsCarrierList->list.size);
+   if(!scsCarrierList->list.array)
    {
-      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for scs carrier list array \
+         in BuildScsSpecificCarrierListDl()");
       return RFAILED;
    }
 
-   if(ueCb == NULLP)
-      *(spCellCfg->servCellIndex) = SERV_CELL_IDX;
-   else
-      *(spCellCfg->servCellIndex) = ueCb->macUeCfg.spCellCfg.servCellIdx;
+   for(listIdx = 0; listIdx < elementCnt; listIdx++)
+   {
+      DU_ALLOC(scsCarrierList->list.array[listIdx], sizeof(SCS_SpecificCarrier_t));
+      if(!scsCarrierList->list.array[listIdx])
+      {    
+         DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for SCS Specific Carrier list array \
+            element in BuildScsSpecificCarrierListDl()");
+         return RFAILED;
+      }    
+   }
 
-   spCellCfg->reconfigurationWithSync = NULLP;
-   spCellCfg->rlf_TimersAndConstants = NULLP;
-   spCellCfg->rlmInSyncOutOfSyncThreshold = NULLP;
+   listIdx = 0;
+   scsCarrierList->list.array[listIdx]->offsetToCarrier = duScsSpecCarrier.scsOffset;
+   scsCarrierList->list.array[listIdx]->subcarrierSpacing = duScsSpecCarrier.scs;
+   scsCarrierList->list.array[listIdx]->carrierBandwidth = duScsSpecCarrier.scsBw;
 
-   DU_ALLOC(spCellCfg->rlmInSyncOutOfSyncThreshold, sizeof(long));
-   if(!spCellCfg->rlmInSyncOutOfSyncThreshold)
+   return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fills DL frequency info in DL config common
+ *
+ * @details
+ *
+ *    Function : BuildFreqInfoDl
+ *
+ *    Functionality: Fills DL frequency info in DL config common
+ *
+ * @params[in] Pointer to DownlinkConfigCommon_t
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildFreqInfoDl(FrequencyInfoDL_t *frequencyInfoDL)
+{
+   uint8_t freqBandIdx = 0, elementCnt = 0;
+   DlCfgCommon  dlCfg = duCfgParam.sib1Params.srvCellCfgCommSib.dlCfg;
+
+   /* TODO : Fill SSB Absolute Frequency */
+   /*
+      DU_ALLOC(frequencyInfoDL->absoluteFrequencySSB, sizeof(ARFCN_ValueNR_t));
+      if(!frequencyInfoDL->absoluteFrequencySSB)
+      {
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for SSB Absolute Frequency in BuildFreqInfoDl()");
+      return RFAILED;
+      }
+      frequencyInfoDL->absoluteFrequencySSB = ?;
+      */
+
+   /* NR Multi Frequency Band List */
+   elementCnt = ODU_VALUE_ONE;
+   frequencyInfoDL->frequencyBandList.list.count = elementCnt;
+   frequencyInfoDL->frequencyBandList.list.size = elementCnt * sizeof(FreqBandIndicatorNR_t *);
+
+   DU_ALLOC(frequencyInfoDL->frequencyBandList.list.array, frequencyInfoDL->frequencyBandList.list.size);
+   if(!frequencyInfoDL->frequencyBandList.list.array)
    {
-      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for Frequency Band List array in BuildFreqInfoDl()");
       return RFAILED;
    }
-   *(spCellCfg->rlmInSyncOutOfSyncThreshold) = RLM_SYNC_OUT_SYNC_THRESHOLD;
 
-   spCellCfg->spCellConfigDedicated = NULLP;
-   DU_ALLOC(spCellCfg->spCellConfigDedicated, sizeof(ServingCellConfig_t));
-   if(!spCellCfg->spCellConfigDedicated)
+   for(freqBandIdx = 0; freqBandIdx < elementCnt; freqBandIdx++)
    {
-      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
-      return RFAILED;
+      DU_ALLOC(frequencyInfoDL->frequencyBandList.list.array[freqBandIdx], sizeof(FreqBandIndicatorNR_t));
+      if(!frequencyInfoDL->frequencyBandList.list.array[freqBandIdx])
+      {
+         DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for frequency band array element in BuildFreqInfoDl()");
+         return RFAILED;
+      }
    }
-   if(BuildSpCellCfgDed(ueCb, spCellCfg->spCellConfigDedicated) != ROK)
+
+   freqBandIdx = 0;
+   *(frequencyInfoDL->frequencyBandList.list.array[freqBandIdx]) = dlCfg.freqBandInd;
+
+   /* TODO : Absolute Frequency to Point A */
+   //frequencyInfoDL->absoluteFrequencyPointA
+
+   /* Subcarrier Spacing specifc carrier List */
+   if((BuildScsSpecificCarrierListDl(&frequencyInfoDL->scs_SpecificCarrierList)) != ROK)
    {
-      DU_LOG("\nERROR  -->  F1AP : BuildSpCellCfgDed failed");
+      DU_LOG("\nERROR  -->  DU APP : Failed to fill SCS specific carrier list DL in BuildFreqInfoDl()");
       return RFAILED;
    }
 
    return ROK;
+
 }
 
 /*******************************************************************
  *
- * @brief Builds Phy cell group config 
+ * @brief Fills DL config common in Serving cell config common
  *
  * @details
  *
- *    Function : BuildPhyCellGrpCfg 
+ *    Function : BuildDlConfigCommon
  *
- *    Functionality: Builds Phy cell group config in DuToCuRrcContainer
+ *    Functionality: Fills DL config common in Serving cell config common
  *
- * @params[in] PhysicalCellGroupConfig_t *phyCellGrpCfg 
+ * @params[in] Pointer to DownlinkConfigCommon_t
  *
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t BuildPhyCellGrpCfg(DuUeCb *ueCb, PhysicalCellGroupConfig_t *phyCellGrpCfg)
+uint8_t BuildDlConfigCommon(DownlinkConfigCommon_t *dlCfgCommon)
 {
-   phyCellGrpCfg->harq_ACK_SpatialBundlingPUCCH = NULLP;
-   phyCellGrpCfg->harq_ACK_SpatialBundlingPUSCH = NULLP;
-
-   phyCellGrpCfg->p_NR_FR1 = NULLP;
-   DU_ALLOC(phyCellGrpCfg->p_NR_FR1, sizeof(long));
-   if(!phyCellGrpCfg->p_NR_FR1)
+   /* DL Frequency Info */
+   DU_ALLOC(dlCfgCommon->frequencyInfoDL, sizeof(FrequencyInfoDL_t));
+   if(!dlCfgCommon->frequencyInfoDL)
    {
-      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildPhyCellGrpCfg");
+      DU_LOG("\nERROR  --> DU APP : Memory allocation failed for DL frequency info in BuildDlConfigCommon()");
+      return RFAILED;
+   }
+   if((BuildFreqInfoDl(dlCfgCommon->frequencyInfoDL))!= ROK)
+   {
+      DU_LOG("\nERROR  --> DU APP : Failed to fill DL frequency info in BuildDlConfigCommon()");
       return RFAILED;
    }
 
-   if(ueCb == NULLP)
+   /* DL BWP config common */
+   DU_ALLOC(dlCfgCommon->initialDownlinkBWP, sizeof(BWP_DownlinkCommon_t));
+   if(!dlCfgCommon->initialDownlinkBWP)
    {
-      *(phyCellGrpCfg->p_NR_FR1)             = P_NR_FR1;
-      phyCellGrpCfg->pdsch_HARQ_ACK_Codebook = PDSCH_HARQ_ACK_CODEBOOK;
+      DU_LOG("\nERROR  --> DU APP : Memory allocation failed for DL BWP config common in BuildDlConfigCommon()");
+      return RFAILED;
    }
-   else
+   if((BuildBwpDlCommon(dlCfgCommon->initialDownlinkBWP)) != ROK)
    {
-      *(phyCellGrpCfg->p_NR_FR1) = ueCb->macUeCfg.phyCellGrpCfg.pNrFr1;
-      phyCellGrpCfg->pdsch_HARQ_ACK_Codebook = ueCb->macUeCfg.phyCellGrpCfg.pdschHarqAckCodebook;
+      DU_LOG("\nERROR  --> DU APP : Failed to fill DL DWP config common in BuildDlConfigCommon()");
+      return RFAILED;
    }
 
-   phyCellGrpCfg->tpc_SRS_RNTI = NULLP;
-   phyCellGrpCfg->tpc_PUCCH_RNTI = NULLP;
-   phyCellGrpCfg->tpc_PUSCH_RNTI = NULLP;
-   phyCellGrpCfg->sp_CSI_RNTI = NULLP;
-   phyCellGrpCfg->cs_RNTI = NULLP;
-   phyCellGrpCfg->ext1 = NULLP;
-   phyCellGrpCfg->ext2 = NULLP;
+   return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fills SCS specific carrier list in UL frequency Info
+ *
+ * @details
+ *
+ *    Function : BuildScsSpecificCarrierListUl
+ *
+ *    Functionality: Fills SCS specific carrier list in UL frequency Info
+ *
+ * @params[in] Pointer to struct FrequencyInfoUL__scs_SpecificCarrierList
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildScsSpecificCarrierListUl(struct FrequencyInfoUL__scs_SpecificCarrierList *scsCarrierList)
+{
+   uint8_t elementCnt = 0, listIdx = 0; 
+   ScsSpecCarrier   duScsSpecCarrier = duCfgParam.sib1Params.srvCellCfgCommSib.ulCfg.ulScsCarrier;
+
+   elementCnt = ODU_VALUE_ONE;
+   scsCarrierList->list.count = elementCnt;
+   scsCarrierList->list.size = elementCnt * sizeof(SCS_SpecificCarrier_t *);
+
+   DU_ALLOC(scsCarrierList->list.array, scsCarrierList->list.size);
+   if(!scsCarrierList->list.array)
+   {
+      DU_LOG("\nERROR  -->  DU APP : SCS Specific Carrier list memory allocation failed");
+      return RFAILED;
+   }
+
+   for(listIdx = 0; listIdx < scsCarrierList->list.count; listIdx++)
+   {
+      DU_ALLOC(scsCarrierList->list.array[listIdx], sizeof(SCS_SpecificCarrier_t));
+      if(!scsCarrierList->list.array[listIdx])
+      {    
+         DU_LOG("\nERROR  -->  DU APP : SCS Specific Carrier list memory allocation failed");
+         return RFAILED;
+      }    
+   }
+   listIdx = 0; 
+   scsCarrierList->list.array[listIdx]->offsetToCarrier = duScsSpecCarrier.scsOffset;
+   scsCarrierList->list.array[listIdx]->subcarrierSpacing = duScsSpecCarrier.scs;
+   scsCarrierList->list.array[listIdx]->carrierBandwidth = duScsSpecCarrier.scsBw;
 
    return ROK;
 }
 
 /*******************************************************************
  *
- * @brief Builds Mac cell group config 
+ * @brief Fills frequency info in UL config common
  *
  * @details
  *
- *    Function : BuildMacCellGrpCfg 
+ *    Function : BuildFreqInfoUl
  *
- *    Functionality: Builds Mac cell group config in DuToCuRrcContainer
+ *    Functionality: Fills frequency info in UL config common
  *
- * @params[in] MAC_CellGroupConfig_t *macCellGrpCfg
+ * @params[in] Pointer to FrequencyInfoUL_t
  *
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t BuildMacCellGrpCfg(DuUeCb *ueCb, MAC_CellGroupConfig_t *macCellGrpCfg)
+uint8_t BuildFreqInfoUl(FrequencyInfoUL_t *frequencyInfoUL)
 {
-   macCellGrpCfg->drx_Config = NULLP;
-   macCellGrpCfg->schedulingRequestConfig = NULLP;
-   DU_ALLOC(macCellGrpCfg->schedulingRequestConfig, sizeof(struct SchedulingRequestConfig));
-   if(!macCellGrpCfg->schedulingRequestConfig)
+   uint8_t elementCnt = 0, listIdx= 0;
+   UlCfgCommon  ulCfg = duCfgParam.sib1Params.srvCellCfgCommSib.ulCfg;
+
+   /* NR Multi Frequency Band List */
+   DU_ALLOC(frequencyInfoUL->frequencyBandList, sizeof(MultiFrequencyBandListNR_t));
+   if(!frequencyInfoUL->frequencyBandList)
    {
-      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for frequency band list in BuildFreqInfoUl()");
       return RFAILED;
    }
 
-   if(BuildSchedulingReqConfig(ueCb, macCellGrpCfg->schedulingRequestConfig) != ROK)
+   elementCnt = ODU_VALUE_ONE;
+   frequencyInfoUL->frequencyBandList->list.count = elementCnt;
+   frequencyInfoUL->frequencyBandList->list.size = elementCnt * sizeof(FreqBandIndicatorNR_t *);
+
+   DU_ALLOC(frequencyInfoUL->frequencyBandList->list.array, frequencyInfoUL->frequencyBandList->list.size);
+   if(!frequencyInfoUL->frequencyBandList->list.array)
    {
-      DU_LOG("\nERROR  -->  F1AP : BuildSchedulingReqConfig failed");
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for frequency band array in BuildFreqInfoUl()");
       return RFAILED;
    }
 
-   macCellGrpCfg->bsr_Config = NULLP;
-   DU_ALLOC(macCellGrpCfg->bsr_Config, sizeof(struct BSR_Config));
-   if(!macCellGrpCfg->bsr_Config)
+   for(listIdx = 0; listIdx < elementCnt; listIdx++)
    {
-      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_ALLOC(frequencyInfoUL->frequencyBandList->list.array[listIdx], sizeof(FreqBandIndicatorNR_t));
+      if(!frequencyInfoUL->frequencyBandList->list.array[listIdx])
+      {
+         DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for frequency band array element in BuildFreqInfoUl()");
+         return RFAILED;
+      }
+   }
+
+   listIdx = 0;
+   *(frequencyInfoUL->frequencyBandList->list.array[listIdx]) = ulCfg.freqBandInd;
+
+   /* TODO : Fill Absolute frequency point A */
+   /*
+      DU_ALLOC(frequencyInfoUL->absoluteFrequencyPointA, sizeof(ARFCN_ValueNR_t));
+      if(!frequencyInfoUL->absoluteFrequencyPointA)
+      {
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for absolute frequency point A in BuildFreqInfoUl()");
+      return RFAILED;
+      }
+    *(frequencyInfoUL->absoluteFrequencyPointA) = ?;
+    */
+
+   /* Subcarrier Spacing specifc carrier */
+   if((BuildScsSpecificCarrierListUl(&frequencyInfoUL->scs_SpecificCarrierList)) != ROK) 
+   {
+      DU_LOG("\nERROR  --> DU APP : Failed to fill SCS Specific Carrier list UL in BuildFreqInfoUl()");
       return RFAILED;
    }
 
-   if(BuildBsrConfig(ueCb, macCellGrpCfg->bsr_Config) != ROK)
+   /* P-MAX */
+   DU_ALLOC(frequencyInfoUL->p_Max, sizeof(P_Max_t));
+   if(!frequencyInfoUL->p_Max)
    {
-      DU_LOG("\nERROR  -->  F1AP : BuildBsrConfig failed");
+      DU_LOG("\nERROR  -->  DU APP : UL Frequency Infoo  memory allocation failure");
       return RFAILED;
    }
+   *frequencyInfoUL->p_Max = ulCfg.pMax;
 
-   macCellGrpCfg->tag_Config = NULLP;
-   DU_ALLOC(macCellGrpCfg->tag_Config, sizeof(struct TAG_Config));
-   if(!macCellGrpCfg->tag_Config)
+   return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fills UL config common in Serving cell config common
+ *
+ * @details
+ *
+ *    Function : BuildUlConfigCommon
+ *
+ *    Functionality: Fills UL config common in Serving cell config common
+ *
+ * @params[in] Pointer to UplinkConfigCommon_t
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildUlConfigCommon(UplinkConfigCommon_t *ulCfgCommon)
+{
+   /* UL Frequency Info */
+   DU_ALLOC(ulCfgCommon->frequencyInfoUL, sizeof(FrequencyInfoUL_t));
+   if(!ulCfgCommon->frequencyInfoUL)
    {
-      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for UL frequency info in BuildUlConfigCommon()");
       return RFAILED;
    }
 
-   if(BuildTagConfig(ueCb, macCellGrpCfg->tag_Config) != ROK)
+   if((BuildFreqInfoUl(ulCfgCommon->frequencyInfoUL)) != ROK)
    {
-      DU_LOG("\nERROR  -->  F1AP : BuildTagConfig failed");
+      DU_LOG("\nERROR  -->  DU APP : Failed to fill frequency info UL in BuildUlConfigCommon()");
       return RFAILED;
    }
 
-   macCellGrpCfg->phr_Config = NULLP;
-   DU_ALLOC(macCellGrpCfg->phr_Config, sizeof(struct MAC_CellGroupConfig__phr_Config));
-   if(!macCellGrpCfg->phr_Config)
+   /* UL BWP common */
+   DU_ALLOC(ulCfgCommon->initialUplinkBWP, sizeof(BWP_UplinkCommon_t));
+   if(!ulCfgCommon->initialUplinkBWP)
    {
-      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for initial UL BWP in BuildUlConfigCommon()");
       return RFAILED;
    }
 
-   if(BuildPhrConfig(ueCb, macCellGrpCfg->phr_Config) != ROK)
+   if((BuildBwpUlCommon(ulCfgCommon->initialUplinkBWP)) != ROK)
    {
-      DU_LOG("\nERROR  -->  F1AP : BuildPhrConfig failed");
+      DU_LOG("\nERROR  -->  DU APP : Failed to fill BWP UL common in BuildUlConfigCommon()");
       return RFAILED;
    }
 
-   macCellGrpCfg->skipUplinkTxDynamic = false;
-   macCellGrpCfg->ext1 = NULLP;
+   /* Time Alignment timer */
+   ulCfgCommon->dummy = duCfgParam.sib1Params.srvCellCfgCommSib.ulCfg.timeAlignTimerComm;
 
    return ROK;
 }
+
 /*******************************************************************
  *
- * @brief Frees memeory allocated for SearchSpcToAddModList
+ * @brief Fills SSB position in burst in SP cell config common
  *
  * @details
  *
- *    Function : FreeSearchSpcToAddModList
+ *    Function : BuildSsbPosInBurst
  *
- *    Functionality: Deallocating memory of SearchSpcToAddModList
+ *    Functionality: 
+ *       Fills SSB position in burst in SP cell config common
  *
- * @params[in] struct PDCCH_Config__searchSpacesToAddModList *searchSpcList
+ * @params[in] Pointer to struct ServingCellConfigCommon__ssb_PositionsInBurst
  *
- * @return void
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildSsbPosInBurst(struct ServingCellConfigCommon__ssb_PositionsInBurst *ssbPosInBurst)
+{
+   uint8_t bitStringSizeInBytes = 0;
+
+   ssbPosInBurst->present = ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap;
+
+   /* As per spec 38.331,in the definition of ServingCellConfigCommon */
+   bitStringSizeInBytes = 1;
+   ssbPosInBurst->choice.mediumBitmap.size = bitStringSizeInBytes * sizeof(uint8_t);
+
+   DU_ALLOC(ssbPosInBurst->choice.mediumBitmap.buf, ssbPosInBurst->choice.mediumBitmap.size);
+   if(!ssbPosInBurst->choice.mediumBitmap.buf)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Memory Allocation failed for medium bit map buffer in BuildSsbPosInBurst()");
+      return RFAILED;
+   }
+
+   if((fillBitString(&ssbPosInBurst->choice.mediumBitmap, 0, bitStringSizeInBytes, \
+               duCfgParam.sib1Params.srvCellCfgCommSib.ssbPosInBurst)) != ROK)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to fill medium bit map in BuildSsbPosInBurst()");
+      return RFAILED;
+   }
+
+   return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fills SP cell config common in Reconfig with Sync
+ *
+ * @details
+ *
+ *    Function : BuildSpCellConfigCommon
+ *
+ *    Functionality: Fills SP cell config common in Reconfig with Sync
+ *
+ * @params[in] Pointer to ServingCellConfigCommon_t
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildSpCellConfigCommon(ServingCellConfigCommon_t *spCellConfigCommon)
+{
+   /* Physical Cell Identity */
+   DU_ALLOC(spCellConfigCommon->physCellId, sizeof(PhysCellId_t));
+   if(!spCellConfigCommon->physCellId)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to allocate memory for physical cell id in BuildSpCellConfigCommon()");
+      return RFAILED;
+   } 
+   *(spCellConfigCommon->physCellId) = NR_PCI;
+
+   /* Downlink Config Common */
+   DU_ALLOC(spCellConfigCommon->downlinkConfigCommon, sizeof(DownlinkConfigCommon_t));
+   if(!spCellConfigCommon->downlinkConfigCommon)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to allocate memory for DL Config Common in BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+   if((BuildDlConfigCommon(spCellConfigCommon->downlinkConfigCommon)) != ROK)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to fill DL config commin in BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+
+   /* Uplinlink Config Common */
+   DU_ALLOC(spCellConfigCommon->uplinkConfigCommon, sizeof(UplinkConfigCommon_t));
+   if(!spCellConfigCommon->uplinkConfigCommon)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to allocate memory for UL Config Common in BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+   if((BuildUlConfigCommon(spCellConfigCommon->uplinkConfigCommon)) != ROK)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to fill UL config commin in BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+
+   /* Timing Advance offset */
+   DU_ALLOC(spCellConfigCommon->n_TimingAdvanceOffset, sizeof(long));
+   if(!spCellConfigCommon->n_TimingAdvanceOffset)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to allocate memory for Timing Advance Offset in BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+   *(spCellConfigCommon->n_TimingAdvanceOffset) = ServingCellConfigCommon__n_TimingAdvanceOffset_n0;
+
+   /* SSB Position In Burst */
+   DU_ALLOC(spCellConfigCommon->ssb_PositionsInBurst, sizeof(struct ServingCellConfigCommon__ssb_PositionsInBurst));
+   if(!spCellConfigCommon->ssb_PositionsInBurst)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to allocate memory for SSB Position In Burst in BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+   if((BuildSsbPosInBurst(spCellConfigCommon->ssb_PositionsInBurst)) != ROK)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to fill SSB Position In Burst in BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+
+   /* SSB Periodicity in Serving cell */
+   DU_ALLOC(spCellConfigCommon->ssb_periodicityServingCell, sizeof(long));
+   if(!spCellConfigCommon->ssb_periodicityServingCell)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to allocate memory for SSB Periodicity serving cell in \
+         BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+   *(spCellConfigCommon->ssb_periodicityServingCell) = \
+      convertSsbPeriodicityValueToEnum(duCfgParam.sib1Params.srvCellCfgCommSib.ssbPrdServingCell);
+
+   /* DMRS Type A position */
+   spCellConfigCommon->dmrs_TypeA_Position = convertDmrsTypeAPosValueToEnum(duCfgParam.macCellCfg.ssbCfg.dmrsTypeAPos);
+
+   /* SSB subcarrier spacing */
+   DU_ALLOC(spCellConfigCommon->ssbSubcarrierSpacing, sizeof(SubcarrierSpacing_t));
+   if(!spCellConfigCommon->ssbSubcarrierSpacing)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to allocate memory for sub-carrier spacing in BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+   *(spCellConfigCommon->ssbSubcarrierSpacing) = duCfgParam.sib1Params.srvCellCfgCommSib.scs;
+
+   /* TDD UL-DL configuration common */
+   DU_ALLOC(spCellConfigCommon->tdd_UL_DL_ConfigurationCommon, sizeof(TDD_UL_DL_ConfigCommon_t));
+   if(!spCellConfigCommon->tdd_UL_DL_ConfigurationCommon)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for TDD UL-DL config common in BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+   if((BuildTddUlDlCfgComm(spCellConfigCommon->tdd_UL_DL_ConfigurationCommon)) != ROK)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to fill TDD UL-DL config common in BuildSpCellConfigCommon()");
+      return RFAILED;
+   }
+
+   /* SS PBCH Block Power */
+   spCellConfigCommon->ss_PBCH_BlockPower = duCfgParam.sib1Params.srvCellCfgCommSib.ssPbchBlockPwr;
+
+   return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fills dedicated RACH configuration in Reconfiguration with sync
+ *
+ * @details
+ *
+ *    Function : BuildRecfgWithSync
+ *
+ *    Functionality: 
+ *       Fills dedicated RACH configuration in Reconfiguration with sync
+ *
+ * @params[in] DU UE CB
+ *             Pointer to Rach config dedicated struct
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildRachConfigDedicated(DuUeCb *ueCb, struct ReconfigurationWithSync__rach_ConfigDedicated *rachCfgDed)
+{
+   uint8_t elementCnt = 0, listIdx = 0;
+   CFRA_t *cfra = NULLP;
+   struct CFRA__resources__ssb *ssbResource = NULLP;
+   RachCfgCommon duRachCfg = duCfgParam.sib1Params.srvCellCfgCommSib.ulCfg.rachCfg;
+
+   rachCfgDed->present = ReconfigurationWithSync__rach_ConfigDedicated_PR_uplink;
+
+   /* Uplink */
+   DU_ALLOC(rachCfgDed->choice.uplink, sizeof(RACH_ConfigDedicated_t));
+   if(!rachCfgDed->choice.uplink)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for RACH uplink configuration in BuildRachConfigDedicated()");
+      return RFAILED;
+   }
+
+   /* CFRA : Contention free Random Access */
+   DU_ALLOC(rachCfgDed->choice.uplink->cfra, sizeof(CFRA_t));
+   if(!rachCfgDed->choice.uplink->cfra)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for CFRA in BuildRachConfigDedicated()");
+      return RFAILED;
+   }
+   cfra = rachCfgDed->choice.uplink->cfra;
+
+   /* CFRA occassions */
+   DU_ALLOC(cfra->occasions, sizeof(struct CFRA__occasions));
+   if(!cfra->occasions)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for CFRA occassion in BuildRachConfigDedicated()");
+      return RFAILED;
+   }
+
+   /* CFRA occassions : RACH generic configuration */
+   cfra->occasions->rach_ConfigGeneric.prach_ConfigurationIndex = duRachCfg.prachCfgIdx;
+   cfra->occasions->rach_ConfigGeneric.msg1_FDM = duRachCfg.msg1Fdm;
+   cfra->occasions->rach_ConfigGeneric.msg1_FrequencyStart = duRachCfg.msg1FreqStart;
+   cfra->occasions->rach_ConfigGeneric.zeroCorrelationZoneConfig = duRachCfg.zeroCorrZoneCfg;
+   cfra->occasions->rach_ConfigGeneric.preambleReceivedTargetPower = duRachCfg.preambleRcvdTgtPwr;
+   cfra->occasions->rach_ConfigGeneric.preambleTransMax = duRachCfg.preambleTransMax;
+   cfra->occasions->rach_ConfigGeneric.powerRampingStep = duRachCfg.pwrRampingStep;
+   cfra->occasions->rach_ConfigGeneric.ra_ResponseWindow = duRachCfg.raRspWindow;
+
+   /* CFRA occassions : SSB per RACH occasion */
+   DU_ALLOC(cfra->occasions->ssb_perRACH_Occasion, sizeof(long));
+   if(!cfra->occasions->ssb_perRACH_Occasion)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for SSB per RACH occassion in BuildRachConfigDedicated()");
+      return RFAILED;
+   }
+   *(cfra->occasions->ssb_perRACH_Occasion) = convertCFRASsbPerRachOccasionValueToEnum(duCfgParam.macCellCfg.prachCfg.ssbPerRach);
+
+   /* CFRA resource */
+   cfra->resources.present = CFRA__resources_PR_ssb;
+
+   /* CFRA resource : SSB */
+   DU_ALLOC(cfra->resources.choice.ssb, sizeof(struct CFRA__resources__ssb));
+   if(!cfra->resources.choice.ssb)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for CFRA resource - SSB in BuildRachConfigDedicated()");
+      return RFAILED;
+   }
+   ssbResource = cfra->resources.choice.ssb;
+
+   /* CFRA SSB resource list */
+   elementCnt = ueCb->cfraResource.numSsb;
+   ssbResource->ssb_ResourceList.list.count = elementCnt;
+   ssbResource->ssb_ResourceList.list.size = elementCnt * sizeof(CFRA_SSB_Resource_t *);
+
+   DU_ALLOC(ssbResource->ssb_ResourceList.list.array, ssbResource->ssb_ResourceList.list.size);
+   if(!ssbResource->ssb_ResourceList.list.array)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for SSB resource list in BuildRachConfigDedicated()");
+      return RFAILED;
+   }
+
+   for(listIdx = 0; listIdx < elementCnt; listIdx++)
+   {
+      DU_ALLOC(ssbResource->ssb_ResourceList.list.array[listIdx], sizeof(CFRA_SSB_Resource_t));
+      if(!ssbResource->ssb_ResourceList.list.array[listIdx])
+      {
+         DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for SSB resource list element in BuildRachConfigDedicated()");  
+         return RFAILED;
+      }
+      ssbResource->ssb_ResourceList.list.array[listIdx]->ssb = ueCb->cfraResource.ssbResource[listIdx].ssbIdx;
+      ssbResource->ssb_ResourceList.list.array[listIdx]->ra_PreambleIndex = ueCb->cfraResource.ssbResource[listIdx].raPreambleIdx;
+   }
+
+   return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Fills reconfiguration with sync in SP cell config
+ *
+ * @details
+ *
+ *    Function : BuildRecfgWithSync
+ *
+ *    Functionality: Fills reconfiguration with sync in SP cell config
+ *
+ * @params[in] DU UE CB
+ *             Pointer to ReconfigurationWithSync_t
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildRecfgWithSync(DuUeCb *ueCb, ReconfigurationWithSync_t *recfgWithSync)
+{
+   /* SP Cell Config Common */  
+   DU_ALLOC(recfgWithSync->spCellConfigCommon, sizeof(ServingCellConfigCommon_t));
+   if(!recfgWithSync->spCellConfigCommon)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to allocate memory for spCellConfigCommon in BuildRecfgWithSync()");
+      return RFAILED;
+   }
+
+   if((BuildSpCellConfigCommon(recfgWithSync->spCellConfigCommon)) != ROK)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to build SpCellConfigCommon in BuildRecfgWithSync()");
+      return RFAILED;
+   }
+
+   /* New UE Identity */
+   recfgWithSync->newUE_Identity = ueCb->crnti;
+
+   /* T304 timer */
+   recfgWithSync->t304 = ReconfigurationWithSync__t304_ms1000;
+
+   /* RACH configuration dedicated */
+   DU_ALLOC(recfgWithSync->rach_ConfigDedicated, sizeof(struct ReconfigurationWithSync__rach_ConfigDedicated));
+   if(!recfgWithSync->rach_ConfigDedicated)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to allocate memory for RACH config dedicated in BuildRecfgWithSync()");
+      return RFAILED;
+   }
+
+   if((BuildRachConfigDedicated(ueCb, recfgWithSync->rach_ConfigDedicated)) != ROK)
+   {
+      DU_LOG("\nERROR  -->  DU APP : Failed to build RACH config dedicated in BuildRecfgWithSync()");
+      return RFAILED;
+   }
+
+   return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Builds Spcell config 
+ *
+ * @details
+ *
+ *    Function : BuildSpCellCfg 
+ *
+ *    Functionality: Builds sp cell config in DuToCuRrcContainer
+ *
+ * @params[in] SpCellConfig_t spCellCfg
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildSpCellCfg(DuUeCb *ueCb, SpCellConfig_t *spCellCfg)
+{
+   spCellCfg->servCellIndex = NULLP;
+   DU_ALLOC(spCellCfg->servCellIndex, sizeof(long));
+   if(!spCellCfg->servCellIndex)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
+      return RFAILED;
+   }
+
+   if(ueCb == NULLP)
+      *(spCellCfg->servCellIndex) = SERV_CELL_IDX;
+   else
+      *(spCellCfg->servCellIndex) = ueCb->duMacUeCfg.spCellCfg.servCellIdx;
+
+   spCellCfg->reconfigurationWithSync = NULLP;
+   if(ueCb && (ueCb->ueState == UE_HANDIN_IN_PROGRESS))
+   {
+      DU_ALLOC(spCellCfg->reconfigurationWithSync, sizeof(ReconfigurationWithSync_t));
+      if(!spCellCfg->reconfigurationWithSync)
+      {
+         DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
+         return RFAILED;
+      }
+
+      if((BuildRecfgWithSync(ueCb, spCellCfg->reconfigurationWithSync)) != ROK)
+      {
+         DU_LOG("\nERROR  -->  F1AP : Building of reconfiguration with sync failed at BuildSpCellCfg");
+         return RFAILED;
+      }
+   }
+
+   spCellCfg->rlf_TimersAndConstants = NULLP;
+   spCellCfg->rlmInSyncOutOfSyncThreshold = NULLP;
+
+   DU_ALLOC(spCellCfg->rlmInSyncOutOfSyncThreshold, sizeof(long));
+   if(!spCellCfg->rlmInSyncOutOfSyncThreshold)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
+      return RFAILED;
+   }
+   *(spCellCfg->rlmInSyncOutOfSyncThreshold) = RLM_SYNC_OUT_SYNC_THRESHOLD;
+
+   spCellCfg->spCellConfigDedicated = NULLP;
+   DU_ALLOC(spCellCfg->spCellConfigDedicated, sizeof(ServingCellConfig_t));
+   if(!spCellCfg->spCellConfigDedicated)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
+      return RFAILED;
+   }
+   if(BuildSpCellCfgDed(ueCb, spCellCfg->spCellConfigDedicated) != ROK)
+   {
+      DU_LOG("\nERROR  -->  F1AP : BuildSpCellCfgDed failed");
+      return RFAILED;
+   }
+
+   return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Builds Phy cell group config 
+ *
+ * @details
+ *
+ *    Function : BuildPhyCellGrpCfg 
+ *
+ *    Functionality: Builds Phy cell group config in DuToCuRrcContainer
+ *
+ * @params[in] PhysicalCellGroupConfig_t *phyCellGrpCfg 
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildPhyCellGrpCfg(DuUeCb *ueCb, PhysicalCellGroupConfig_t *phyCellGrpCfg)
+{
+   phyCellGrpCfg->harq_ACK_SpatialBundlingPUCCH = NULLP;
+   phyCellGrpCfg->harq_ACK_SpatialBundlingPUSCH = NULLP;
+
+   phyCellGrpCfg->p_NR_FR1 = NULLP;
+   DU_ALLOC(phyCellGrpCfg->p_NR_FR1, sizeof(long));
+   if(!phyCellGrpCfg->p_NR_FR1)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildPhyCellGrpCfg");
+      return RFAILED;
+   }
+
+   if(ueCb == NULLP)
+   {
+      *(phyCellGrpCfg->p_NR_FR1)             = P_NR_FR1;
+      phyCellGrpCfg->pdsch_HARQ_ACK_Codebook = PDSCH_HARQ_ACK_CODEBOOK;
+   }
+   else
+   {
+      *(phyCellGrpCfg->p_NR_FR1) = ueCb->duMacUeCfg.phyCellGrpCfg.pNrFr1;
+      phyCellGrpCfg->pdsch_HARQ_ACK_Codebook = ueCb->duMacUeCfg.phyCellGrpCfg.pdschHarqAckCodebook;
+   }
+
+   phyCellGrpCfg->tpc_SRS_RNTI = NULLP;
+   phyCellGrpCfg->tpc_PUCCH_RNTI = NULLP;
+   phyCellGrpCfg->tpc_PUSCH_RNTI = NULLP;
+   phyCellGrpCfg->sp_CSI_RNTI = NULLP;
+   phyCellGrpCfg->cs_RNTI = NULLP;
+   phyCellGrpCfg->ext1 = NULLP;
+   phyCellGrpCfg->ext2 = NULLP;
+
+   return ROK;
+}
+#ifdef NR_DRX
+/*******************************************************************
+ *
+ * @brief fill long cycle offset value of drx
+ *
+ * @details
+ *
+ *    Function : fillLongCycleOffsetValFromDuCb 
+ *
+ *    Functionality: fill long cycle offset value of drx
+ *
+ * @params[in] DrxLongCycleStartOffset  drxLongCycleStartOffset,
+ * struct DRX_ConfigRrc__drx_LongCycleStartOffset drx_LongCycleStartOffset
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+void fillLongCycleOffsetValFromDuCb(DrxLongCycleStartOffset  drxLongCycleStartOffset,\
+struct DRX_ConfigRrc__drx_LongCycleStartOffset *drx_LongCycleStartOffset)
+{
+   
+   drx_LongCycleStartOffset->present = convertLongDrxCycleLengthValueToEnum(drxLongCycleStartOffset.drxLongCycleStartOffsetChoice); 
+   switch(drx_LongCycleStartOffset->present)
+   {
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms10:
+         {
+            drx_LongCycleStartOffset->choice.ms10 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms20:
+         {
+            drx_LongCycleStartOffset->choice.ms20 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms32:
+         {
+            drx_LongCycleStartOffset->choice.ms32 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms40:
+         {
+            drx_LongCycleStartOffset->choice.ms40 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms60:
+         {
+            drx_LongCycleStartOffset->choice.ms60 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms64:
+         {
+            drx_LongCycleStartOffset->choice.ms64 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms70:
+         {
+            drx_LongCycleStartOffset->choice.ms70 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms80:
+         {
+            drx_LongCycleStartOffset->choice.ms80 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms128:
+         {
+            drx_LongCycleStartOffset->choice.ms128 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms160:
+         {
+            drx_LongCycleStartOffset->choice.ms160 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms256:
+         {
+            drx_LongCycleStartOffset->choice.ms256 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms320:
+         {
+            drx_LongCycleStartOffset->choice.ms320 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms512:
+         {
+            drx_LongCycleStartOffset->choice.ms512 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms640:
+         {
+            drx_LongCycleStartOffset->choice.ms640 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms1024:
+         {
+            drx_LongCycleStartOffset->choice.ms1024 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms1280:
+         {
+            drx_LongCycleStartOffset->choice.ms1280 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms2048:
+         {
+            drx_LongCycleStartOffset->choice.ms2048 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms2560:
+         {
+            drx_LongCycleStartOffset->choice.ms2560 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms5120:
+         {
+            drx_LongCycleStartOffset->choice.ms5120 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms10240:
+         {
+            drx_LongCycleStartOffset->choice.ms10240 = drxLongCycleStartOffset.drxLongCycleStartOffsetVal;
+            break;
+         }
+      default :
+         break;
+   }
+}
+/*******************************************************************
+ *
+ * @brief Builds drx config IE 
+ *
+ * @details
+ *
+ *    Function : BuildDrxConfigRrc 
+ *
+ *    Functionality: Build drx config in MacCellGrpCfg 
+ *
+ * @params[in] struct MAC_CellGroupConfig__drx_ConfigRrc 
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildDrxConfigRrc(DuUeCb *ueCb, struct MAC_CellGroupConfig__drx_ConfigRrc *drxCfg)
+{
+   drxCfg->present = MAC_CellGroupConfig__drx_ConfigRrc_PR_setup;
+   DU_ALLOC(drxCfg->choice.setup, sizeof(struct DRX_ConfigRrc));
+   if(!drxCfg->choice.setup)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildDrxConfigRrc");
+      return RFAILED;
+   }
+   if(ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.drxOnDurationTimer.onDurationTimerValInMs)
+   {
+      drxCfg->choice.setup->drx_onDurationTimer.present = DRX_ConfigRrc__drx_onDurationTimer_PR_milliSeconds;
+      drxCfg->choice.setup->drx_onDurationTimer.choice.milliSeconds = convertOnDurationTimerMilliSecondsValueToEnum(ueCb->duMacUeCfg.\
+      macCellGrpCfg.drxCfg.drxOnDurationTimer.onDurationtimerValue.milliSeconds);
+   }
+   else
+   {
+      drxCfg->choice.setup->drx_onDurationTimer.present = DRX_ConfigRrc__drx_onDurationTimer_PR_subMilliSeconds;
+      drxCfg->choice.setup->drx_onDurationTimer.choice.subMilliSeconds = ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.\
+      drxOnDurationTimer.onDurationtimerValue.subMilliSeconds;
+   }
+   drxCfg->choice.setup->drx_InactivityTimer = convertDrxInactivityTimerValueToEnum(ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.drxInactivityTimer);
+   drxCfg->choice.setup->drx_HARQ_RTT_TimerDL = ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.drxHarqRttTimerDl;
+   drxCfg->choice.setup->drx_HARQ_RTT_TimerUL = ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.drxHarqRttTimerUl;
+   drxCfg->choice.setup->drx_RetransmissionTimerDL = convertDrxRetransmissionTimerDlValueToEnum(ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.\
+   drxRetransmissionTimerDl);
+   drxCfg->choice.setup->drx_RetransmissionTimerUL = convertDrxRetransmissionTimerUlValueToEnum(ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.\
+   drxRetransmissionTimerUl);
+   drxCfg->choice.setup->drx_SlotOffset = ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.drxSlotOffset;
+   fillLongCycleOffsetValFromDuCb(ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.drxLongCycleStartOffset, &drxCfg->choice.setup->drx_LongCycleStartOffset);
+   
+   if(ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.shortDrxPres)
+   {
+      DU_ALLOC(drxCfg->choice.setup->shortDRX, sizeof(struct DRX_ConfigRrc__shortDRX));
+      if(drxCfg->choice.setup->shortDRX)
+      {
+         drxCfg->choice.setup->shortDRX->drx_ShortCycle = convertShortDrxCycleLengthValueToEnum(ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.\
+         shortDrx.drxShortCycle);
+         drxCfg->choice.setup->shortDRX->drx_ShortCycleTimer = ueCb->duMacUeCfg.macCellGrpCfg.drxCfg.shortDrx.drxShortCycleTimer;
+      }
+      else
+      {
+         DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildDrxConfigRrc");
+         return RFAILED;
+      }
+   }
+   return ROK;
+}
+#endif
+/*******************************************************************
+ *
+ * @brief Builds Mac cell group config 
+ *
+ * @details
+ *
+ *    Function : BuildMacCellGrpCfg 
+ *
+ *    Functionality: Builds Mac cell group config in DuToCuRrcContainer
+ *
+ * @params[in] MAC_CellGroupConfig_t *macCellGrpCfg
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildMacCellGrpCfg(DuUeCb *ueCb, MAC_CellGroupConfig_t *macCellGrpCfg)
+{
+   macCellGrpCfg->drx_ConfigRrc = NULLP;
+#ifdef NR_DRX   
+   if(ueCb)
+   {
+      DU_ALLOC(macCellGrpCfg->drx_ConfigRrc, sizeof(struct MAC_CellGroupConfig__drx_ConfigRrc));
+      if(!macCellGrpCfg->drx_ConfigRrc)
+      {
+         DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
+         return RFAILED;
+      }
+      if(BuildDrxConfigRrc(ueCb, macCellGrpCfg->drx_ConfigRrc) != ROK)
+      {
+         DU_LOG("\nERROR  -->  F1AP : failed to build drx config");
+         return RFAILED;
+      }
+   }
+#endif
+   macCellGrpCfg->schedulingRequestConfig = NULLP;
+   DU_ALLOC(macCellGrpCfg->schedulingRequestConfig, sizeof(struct SchedulingRequestConfig));
+   if(!macCellGrpCfg->schedulingRequestConfig)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      return RFAILED;
+   }
+
+   if(BuildSchedulingReqConfig(ueCb, macCellGrpCfg->schedulingRequestConfig) != ROK)
+   {
+      DU_LOG("\nERROR  -->  F1AP : BuildSchedulingReqConfig failed");
+      return RFAILED;
+   }
+
+   macCellGrpCfg->bsr_Config = NULLP;
+   DU_ALLOC(macCellGrpCfg->bsr_Config, sizeof(struct BSR_Config));
+   if(!macCellGrpCfg->bsr_Config)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      return RFAILED;
+   }
+
+   if(BuildBsrConfig(ueCb, macCellGrpCfg->bsr_Config) != ROK)
+   {
+      DU_LOG("\nERROR  -->  F1AP : BuildBsrConfig failed");
+      return RFAILED;
+   }
+
+   macCellGrpCfg->tag_Config = NULLP;
+   DU_ALLOC(macCellGrpCfg->tag_Config, sizeof(struct TAG_Config));
+   if(!macCellGrpCfg->tag_Config)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      return RFAILED;
+   }
+
+   if(BuildTagConfig(ueCb, macCellGrpCfg->tag_Config) != ROK)
+   {
+      DU_LOG("\nERROR  -->  F1AP : BuildTagConfig failed");
+      return RFAILED;
+   }
+
+   macCellGrpCfg->phr_Config = NULLP;
+   DU_ALLOC(macCellGrpCfg->phr_Config, sizeof(struct MAC_CellGroupConfig__phr_Config));
+   if(!macCellGrpCfg->phr_Config)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      return RFAILED;
+   }
+
+   if(BuildPhrConfig(ueCb, macCellGrpCfg->phr_Config) != ROK)
+   {
+      DU_LOG("\nERROR  -->  F1AP : BuildPhrConfig failed");
+      return RFAILED;
+   }
+
+   macCellGrpCfg->skipUplinkTxDynamic = false;
+   macCellGrpCfg->ext1 = NULLP;
+
+   return ROK;
+}
+/*******************************************************************
+ *
+ * @brief Frees memeory allocated for SearchSpcToAddModList
+ *
+ * @details
+ *
+ *    Function : FreeSearchSpcToAddModList
+ *
+ *    Functionality: Deallocating memory of SearchSpcToAddModList
+ *
+ * @params[in] struct PDCCH_Config__searchSpacesToAddModList *searchSpcList
+ *
+ * @return void
  *
  4221 * ****************************************************************/
 void FreeSearchSpcToAddModList(struct PDCCH_Config__searchSpacesToAddModList *searchSpcList)
@@ -6814,122 +7765,473 @@ void FreeinitialUplinkBWP(UplinkConfig_t *ulCfg)
 }
 /*******************************************************************
  *
- * @brief Frees emmory allocated for BWPDlDedPdschCfg
+ * @brief Frees emmory allocated for BWPDlDedPdschCfg
+ *
+ * @details
+ *
+ *    Function : FreeBWPDlDedPdschCfg
+ *
+ *    Functionality: Deallocating memory of BWPDlDedPdschCfg
+ *
+ * @params[in] BWP_DownlinkDedicated_t *dlBwp
+ *
+ * @return void
+ *
+ *
+ * ****************************************************************/
+void FreeBWPDlDedPdschCfg(BWP_DownlinkDedicated_t *dlBwp)
+{
+   struct PDSCH_Config *pdschCfg=NULLP;
+   struct PDSCH_Config__prb_BundlingType *prbBndlType=NULLP;
+   struct PDSCH_Config__pdsch_TimeDomainAllocationList *timeDomAllocList=NULLP;
+   struct PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA *dmrsDlCfg=NULLP;
+
+   if(dlBwp->pdsch_Config->choice.setup)
+   {
+      pdschCfg=dlBwp->pdsch_Config->choice.setup;
+      if(pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA)
+      {
+        if(pdschCfg->pdsch_TimeDomainAllocationList)
+        {
+           timeDomAllocList=pdschCfg->pdsch_TimeDomainAllocationList;
+           if(pdschCfg->maxNrofCodeWordsScheduledByDCI)
+           {
+              prbBndlType=&pdschCfg->prb_BundlingType;
+              DU_FREE(prbBndlType->choice.staticBundling,\
+                    sizeof(struct PDSCH_Config__prb_BundlingType__staticBundling));
+              DU_FREE(pdschCfg->maxNrofCodeWordsScheduledByDCI, sizeof(long));
+           }
+           FreePdschTimeDomAllocList(timeDomAllocList);
+           DU_FREE(pdschCfg->pdsch_TimeDomainAllocationList, \
+                 sizeof(struct PDSCH_Config__pdsch_TimeDomainAllocationList));
+        }
+        dmrsDlCfg=pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA;
+        if(dmrsDlCfg->choice.setup)
+        {
+           DU_FREE(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition,
+                 sizeof(long));
+           DU_FREE(dmrsDlCfg->choice.setup, sizeof(struct DMRS_DownlinkConfig));
+        }
+        DU_FREE(pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA, \
+              sizeof(struct PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA));
+      }
+      DU_FREE(dlBwp->pdsch_Config->choice.setup, sizeof(struct PDSCH_Config));
+   }
+}
+/*******************************************************************
+ *
+ * @brief Frees emmory allocated for BWPDlDedPdcchCfg
+ *
+ * @details
+ *
+ *    Function : FreeBWPDlDedPdcchCfg
+ *
+ *    Functionality: Deallocating memory of BWPDlDedPdcchCfg
+ *
+ * @params[in] BWP_DownlinkDedicated_t *dlBwp
+ *
+ * @return void
+ *         
+ *
+ * ****************************************************************/
+void FreeBWPDlDedPdcchCfg(BWP_DownlinkDedicated_t *dlBwp)
+{
+   uint8_t idx1=0;
+   uint8_t idx2=0;
+   struct PDCCH_Config *pdcchCfg=NULLP;
+   struct ControlResourceSet *controlRSet=NULLP;
+   struct PDCCH_Config__controlResourceSetToAddModList *controlRSetList=NULLP;
+
+   if(dlBwp->pdcch_Config->choice.setup)
+   {
+      pdcchCfg=dlBwp->pdcch_Config->choice.setup;
+      if(pdcchCfg->controlResourceSetToAddModList)
+      {
+        controlRSetList = pdcchCfg->controlResourceSetToAddModList;
+        if(controlRSetList->list.array)
+        {
+           controlRSet = controlRSetList->list.array[idx2];
+           if(controlRSet)
+           {
+              if(controlRSet->frequencyDomainResources.buf)
+              {
+                 if(controlRSet->pdcch_DMRS_ScramblingID)
+                 {
+                    if(pdcchCfg->searchSpacesToAddModList)
+                    {
+                       FreeSearchSpcToAddModList(pdcchCfg->searchSpacesToAddModList);
+                       DU_FREE(pdcchCfg->searchSpacesToAddModList, \
+                             sizeof(struct PDCCH_Config__searchSpacesToAddModList));
+                    }
+                    DU_FREE(controlRSet->pdcch_DMRS_ScramblingID, sizeof(long));
+                 }
+                 DU_FREE(controlRSet->frequencyDomainResources.buf, \
+                       controlRSet->frequencyDomainResources.size);
+              }
+           }
+           for(idx1 = 0; idx1 <controlRSetList->list.count; idx1++)
+           {
+              DU_FREE(controlRSetList->list.array[idx1], sizeof(struct ControlResourceSet));
+           }
+           DU_FREE(controlRSetList->list.array, controlRSetList->list.size);
+        }
+        DU_FREE(pdcchCfg->controlResourceSetToAddModList, \
+              sizeof(struct PDCCH_Config__controlResourceSetToAddModList));
+      }
+      DU_FREE(dlBwp->pdcch_Config->choice.setup, sizeof(struct PDCCH_Config));
+   }
+}      
+
+/*******************************************************************
+ *
+ * @brief Free SCS specific carrier list in DL frequency info
+ *
+ * @details
+ *
+ *    Function : FreeScsSpecificCarrierListDl
+ *
+ *    Functionality: Free SCS specific carrier list in DL frequency info
+ *
+ * @params[in] Pointer to struct FrequencyInfoDL__scs_SpecificCarrierList
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void FreeScsSpecificCarrierListDl(struct FrequencyInfoDL__scs_SpecificCarrierList *scsCarrierList)
+{
+   uint8_t listIdx = 0;
+
+   if(!scsCarrierList->list.array)
+   {
+      for(listIdx = 0; listIdx < scsCarrierList->list.count; listIdx++)
+      {
+         DU_FREE(scsCarrierList->list.array[listIdx], sizeof(SCS_SpecificCarrier_t));
+      }
+      DU_FREE(scsCarrierList->list.array, scsCarrierList->list.size);
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Free DL frequency info in DL config common
+ *
+ * @details
+ *
+ *    Function : FreeFreqInfoDl
+ *
+ *    Functionality: Free DL frequency info in DL config common
+ *
+ * @params[in] Pointer to DownlinkConfigCommon_t
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void FreeFreqInfoDl(FrequencyInfoDL_t *frequencyInfoDL)
+{
+   uint8_t freqBandIdx = 0;
+
+   /* SSB Absolute Frequency */
+   DU_FREE(frequencyInfoDL->absoluteFrequencySSB, sizeof(ARFCN_ValueNR_t));
+
+   /* NR Multi Frequency Band List */
+   if(frequencyInfoDL->frequencyBandList.list.array)
+   {
+      for(freqBandIdx = 0; freqBandIdx < frequencyInfoDL->frequencyBandList.list.count; freqBandIdx++)
+      {
+         DU_FREE(frequencyInfoDL->frequencyBandList.list.array[freqBandIdx], sizeof(FreqBandIndicatorNR_t));
+      }
+      DU_FREE(frequencyInfoDL->frequencyBandList.list.array, frequencyInfoDL->frequencyBandList.list.size);
+   }
+
+   /* Subcarrier Spacing specifc carrier List */
+   FreeScsSpecificCarrierListDl(&frequencyInfoDL->scs_SpecificCarrierList);
+}
+
+/*******************************************************************
+ *
+ * @brief Free DL config common in Serving cell config common
+ *
+ * @details
+ *
+ *    Function : FreeDlConfigCommon
+ *
+ *    Functionality: Free DL config common in Serving cell config common
+ *
+ * @params[in] Pointer to DownlinkConfigCommon_t
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void FreeDlConfigCommon(DownlinkConfigCommon_t *dlCfgCommon)
+{
+   /* DL Frequency Info */
+   if(dlCfgCommon->frequencyInfoDL)
+   {
+      FreeFreqInfoDl(dlCfgCommon->frequencyInfoDL);
+      DU_FREE(dlCfgCommon->frequencyInfoDL, sizeof(FrequencyInfoDL_t));
+   }
+
+   /* DL BWP config common */
+   if(dlCfgCommon->initialDownlinkBWP)
+   {
+      FreeBwpDlCommon(dlCfgCommon->initialDownlinkBWP);
+      DU_FREE(dlCfgCommon->initialDownlinkBWP, sizeof(BWP_DownlinkCommon_t));
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Free SCS specific carrier list in UL frequency Info
+ *
+ * @details
+ *
+ *    Function : FreeScsSpecificCarrierListUl
+ *
+ *    Functionality: Free SCS specific carrier list in UL frequency Info
+ *
+ * @params[in] Pointer to struct FrequencyInfoUL__scs_SpecificCarrierList
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void FreeScsSpecificCarrierListUl(struct FrequencyInfoUL__scs_SpecificCarrierList *scsCarrierList)
+{
+   uint8_t listIdx = 0;
+
+   if(scsCarrierList->list.array)
+   {
+      for(listIdx = 0; listIdx < scsCarrierList->list.count; listIdx++)
+      {
+         DU_FREE(scsCarrierList->list.array[listIdx], sizeof(SCS_SpecificCarrier_t));
+      }
+      DU_FREE(scsCarrierList->list.array, scsCarrierList->list.size);
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Free frequency info in UL config common
+ *
+ * @details
+ *
+ *    Function : FreeFreqInfoUl
+ *
+ *    Functionality: Free frequency info in UL config common
+ *
+ * @params[in] Pointer to FrequencyInfoUL_t
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void FreeFreqInfoUl(FrequencyInfoUL_t *frequencyInfoUL)
+{
+   uint8_t listIdx= 0;
+
+   /* NR Multi Frequency Band List */
+   if(!frequencyInfoUL->frequencyBandList)
+   {
+      if(frequencyInfoUL->frequencyBandList->list.array)
+      {
+         for(listIdx = 0; listIdx < frequencyInfoUL->frequencyBandList->list.count; listIdx++)
+         {
+            DU_FREE(frequencyInfoUL->frequencyBandList->list.array[listIdx], sizeof(FreqBandIndicatorNR_t));
+         }
+         DU_FREE(frequencyInfoUL->frequencyBandList->list.array, frequencyInfoUL->frequencyBandList->list.size);
+      }
+      DU_FREE(frequencyInfoUL->frequencyBandList, sizeof(MultiFrequencyBandListNR_t));
+   }
+
+   /* Absolute frequency point A */
+   DU_FREE(frequencyInfoUL->absoluteFrequencyPointA, sizeof(ARFCN_ValueNR_t));
+
+   /* Subcarrier Spacing specifc carrier */
+   FreeScsSpecificCarrierListUl(&frequencyInfoUL->scs_SpecificCarrierList);
+
+   /* P-MAX */
+   DU_FREE(frequencyInfoUL->p_Max, sizeof(P_Max_t));
+}
+
+/*******************************************************************
+ *
+ * @brief Free UL config common in Serving cell config common
+ *
+ * @details
+ *
+ *    Function : FreeUlConfigCommon
+ *
+ *    Functionality: Free UL config common in Serving cell config common
+ *
+ * @params[in] Pointer to UplinkConfigCommon_t
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void FreeUlConfigCommon(UplinkConfigCommon_t *ulCfgCommon)
+{
+   /* UL Frequency Info */
+   if(ulCfgCommon->frequencyInfoUL)
+   {
+      FreeFreqInfoUl(ulCfgCommon->frequencyInfoUL);
+      DU_FREE(ulCfgCommon->frequencyInfoUL, sizeof(FrequencyInfoUL_t));
+   }
+
+   /* UL BWP common */
+   if(ulCfgCommon->initialUplinkBWP)
+   {
+      FreeBwpUlCommon(ulCfgCommon->initialUplinkBWP);
+      DU_FREE(ulCfgCommon->initialUplinkBWP, sizeof(BWP_UplinkCommon_t));
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Free SP cell config common in Reconfig with Sync
+ *
+ * @details
+ *
+ *    Function : FreeSpCellConfigCommon
+ *
+ *    Functionality: Free SP cell config common in Reconfig with Sync
+ *
+ * @params[in] Pointer to ServingCellConfigCommon_t
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void FreeSpCellConfigCommon(ServingCellConfigCommon_t *spCellConfigCommon)
+{
+   /* Free Physical cell identity */
+   DU_FREE(spCellConfigCommon->physCellId, sizeof(PhysCellId_t));
+
+   /* Free Downlink Config common */
+   if(spCellConfigCommon->downlinkConfigCommon)
+   {
+      FreeDlConfigCommon(spCellConfigCommon->downlinkConfigCommon);
+      DU_FREE(spCellConfigCommon->downlinkConfigCommon, sizeof(DownlinkConfigCommon_t));
+   }
+
+   /* Free Uplink Config common */
+   if(spCellConfigCommon->uplinkConfigCommon)
+   {
+      FreeUlConfigCommon(spCellConfigCommon->uplinkConfigCommon);
+      DU_FREE(spCellConfigCommon->uplinkConfigCommon, sizeof(UplinkConfigCommon_t));
+   }
+
+   /* Free Timing Advance offset */
+   DU_FREE(spCellConfigCommon->n_TimingAdvanceOffset, sizeof(long));
+
+   /* Free SSB Position in Burst */
+   if(spCellConfigCommon->ssb_PositionsInBurst)
+   {
+      DU_FREE(spCellConfigCommon->ssb_PositionsInBurst->choice.mediumBitmap.buf, \
+         spCellConfigCommon->ssb_PositionsInBurst->choice.mediumBitmap.size);
+      DU_FREE(spCellConfigCommon->ssb_PositionsInBurst, sizeof(struct ServingCellConfigCommon__ssb_PositionsInBurst));
+   }
+
+   /* Free SSB Periodicity in Serving cell */
+   DU_FREE(spCellConfigCommon->ssb_periodicityServingCell, sizeof(long));
+
+   /* Free SSB subcarrier spacing */
+   DU_FREE(spCellConfigCommon->ssbSubcarrierSpacing, sizeof(SubcarrierSpacing_t));
+
+   /* TDD UL-DL configuration common */
+   DU_FREE(spCellConfigCommon->tdd_UL_DL_ConfigurationCommon, sizeof(TDD_UL_DL_ConfigCommon_t));
+}
+
+/*******************************************************************
+ *
+ * @brief Free dedicated RACH configuration in Reconfiguration with sync
  *
  * @details
  *
- *    Function : FreeBWPDlDedPdschCfg
+ *    Function : FreeRecfgWithSync
  *
- *    Functionality: Deallocating memory of BWPDlDedPdschCfg
+ *    Functionality:
+ *       Free dedicated RACH configuration in Reconfiguration with sync
  *
- * @params[in] BWP_DownlinkDedicated_t *dlBwp
+ * @params[in] Pinter to Rach config dedicated struct
  *
  * @return void
  *
- *
  * ****************************************************************/
-void FreeBWPDlDedPdschCfg(BWP_DownlinkDedicated_t *dlBwp)
+void FreeRachConfigDedicated(struct ReconfigurationWithSync__rach_ConfigDedicated *rachCfgDed)
 {
-   struct PDSCH_Config *pdschCfg=NULLP;
-   struct PDSCH_Config__prb_BundlingType *prbBndlType=NULLP;
-   struct PDSCH_Config__pdsch_TimeDomainAllocationList *timeDomAllocList=NULLP;
-   struct PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA *dmrsDlCfg=NULLP;
+   uint8_t listIdx = 0;
+   CFRA_t *cfra = NULLP;
+   struct CFRA__resources__ssb *ssbResource = NULLP;
 
-   if(dlBwp->pdsch_Config->choice.setup)
+   /* Uplink */
+   if(rachCfgDed->choice.uplink)
    {
-      pdschCfg=dlBwp->pdsch_Config->choice.setup;
-      if(pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA)
+      /* CFRA : Contention free Random Access */
+      if(rachCfgDed->choice.uplink->cfra)
       {
-        if(pdschCfg->pdsch_TimeDomainAllocationList)
-        {
-           timeDomAllocList=pdschCfg->pdsch_TimeDomainAllocationList;
-           if(pdschCfg->maxNrofCodeWordsScheduledByDCI)
-           {
-              prbBndlType=&pdschCfg->prb_BundlingType;
-              DU_FREE(prbBndlType->choice.staticBundling,\
-                    sizeof(struct PDSCH_Config__prb_BundlingType__staticBundling));
-              DU_FREE(pdschCfg->maxNrofCodeWordsScheduledByDCI, sizeof(long));
-           }
-           FreePdschTimeDomAllocList(timeDomAllocList);
-           DU_FREE(pdschCfg->pdsch_TimeDomainAllocationList, \
-                 sizeof(struct PDSCH_Config__pdsch_TimeDomainAllocationList));
-        }
-        dmrsDlCfg=pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA;
-        if(dmrsDlCfg->choice.setup)
-        {
-           DU_FREE(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition,
-                 sizeof(long));
-           DU_FREE(dmrsDlCfg->choice.setup, sizeof(struct DMRS_DownlinkConfig));
-        }
-        DU_FREE(pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA, \
-              sizeof(struct PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA));
+         cfra = rachCfgDed->choice.uplink->cfra;
+
+         /* CFRA occassions */
+         if(cfra->occasions)
+         {
+            /* CFRA occassions : SSB per RACH occasion */
+            DU_FREE(cfra->occasions->ssb_perRACH_Occasion, sizeof(long));
+            DU_FREE(cfra->occasions, sizeof(struct CFRA__occasions));
+         }
+
+         /* CFRA resource */
+         cfra->resources.present = CFRA__resources_PR_ssb;
+
+         /* CFRA resource : SSB */
+         if(cfra->resources.choice.ssb)
+         {
+            ssbResource = cfra->resources.choice.ssb;
+
+            /* CFRA SSB resource list */
+            if(ssbResource->ssb_ResourceList.list.array)
+            {
+               for(listIdx = 0; listIdx < ssbResource->ssb_ResourceList.list.count; listIdx++)
+               {
+                  DU_FREE(ssbResource->ssb_ResourceList.list.array[listIdx], sizeof(CFRA_SSB_Resource_t));
+               }
+               DU_FREE(ssbResource->ssb_ResourceList.list.array, ssbResource->ssb_ResourceList.list.size);
+            }
+            DU_FREE(cfra->resources.choice.ssb, sizeof(struct CFRA__resources__ssb));
+         }
+         DU_FREE(rachCfgDed->choice.uplink->cfra, sizeof(CFRA_t));
       }
-      DU_FREE(dlBwp->pdsch_Config->choice.setup, sizeof(struct PDSCH_Config));
+      DU_FREE(rachCfgDed->choice.uplink, sizeof(RACH_ConfigDedicated_t));
    }
 }
+
 /*******************************************************************
  *
- * @brief Frees emmory allocated for BWPDlDedPdcchCfg
+ * @brief Frees reconfiguration with sync in SP cell config
  *
  * @details
  *
- *    Function : FreeBWPDlDedPdcchCfg
+ *    Function : FreeRecfgWithSync
  *
- *    Functionality: Deallocating memory of BWPDlDedPdcchCfg
+ *    Functionality: Fress reconfiguration with sync in SP cell config
  *
- * @params[in] BWP_DownlinkDedicated_t *dlBwp
+ * @params[in] Pointer to ReconfigurationWithSync_t
  *
  * @return void
- *         
  *
  * ****************************************************************/
-void FreeBWPDlDedPdcchCfg(BWP_DownlinkDedicated_t *dlBwp)
+void FreeRecfgWithSync(ReconfigurationWithSync_t *recfgWithSync)
 {
-   uint8_t idx1=0;
-   uint8_t idx2=0;
-   struct PDCCH_Config *pdcchCfg=NULLP;
-   struct ControlResourceSet *controlRSet=NULLP;
-   struct PDCCH_Config__controlResourceSetToAddModList *controlRSetList=NULLP;
+   /* Free SP Cell config common */
+   if(recfgWithSync->spCellConfigCommon)
+   {
+      FreeSpCellConfigCommon(recfgWithSync->spCellConfigCommon);
+      DU_FREE(recfgWithSync->spCellConfigCommon, sizeof(ServingCellConfigCommon_t));
+   }
 
-   if(dlBwp->pdcch_Config->choice.setup)
+   /* Free Dedicated RACH configuration */
+   if(recfgWithSync->rach_ConfigDedicated)
    {
-      pdcchCfg=dlBwp->pdcch_Config->choice.setup;
-      if(pdcchCfg->controlResourceSetToAddModList)
-      {
-        controlRSetList = pdcchCfg->controlResourceSetToAddModList;
-        if(controlRSetList->list.array)
-        {
-           controlRSet = controlRSetList->list.array[idx2];
-           if(controlRSet)
-           {
-              if(controlRSet->frequencyDomainResources.buf)
-              {
-                 if(controlRSet->pdcch_DMRS_ScramblingID)
-                 {
-                    if(pdcchCfg->searchSpacesToAddModList)
-                    {
-                       FreeSearchSpcToAddModList(pdcchCfg->searchSpacesToAddModList);
-                       DU_FREE(pdcchCfg->searchSpacesToAddModList, \
-                             sizeof(struct PDCCH_Config__searchSpacesToAddModList));
-                    }
-                    DU_FREE(controlRSet->pdcch_DMRS_ScramblingID, sizeof(long));
-                 }
-                 DU_FREE(controlRSet->frequencyDomainResources.buf, \
-                       controlRSet->frequencyDomainResources.size);
-              }
-           }
-           for(idx1 = 0; idx1 <controlRSetList->list.count; idx1++)
-           {
-              DU_FREE(controlRSetList->list.array[idx1], sizeof(struct ControlResourceSet));
-           }
-           DU_FREE(controlRSetList->list.array, controlRSetList->list.size);
-        }
-        DU_FREE(pdcchCfg->controlResourceSetToAddModList, \
-              sizeof(struct PDCCH_Config__controlResourceSetToAddModList));
-      }
-      DU_FREE(dlBwp->pdcch_Config->choice.setup, sizeof(struct PDCCH_Config));
+      FreeRachConfigDedicated(recfgWithSync->rach_ConfigDedicated);
+      DU_FREE(recfgWithSync->rach_ConfigDedicated, sizeof(struct ReconfigurationWithSync__rach_ConfigDedicated));
    }
-}      
+}
 
 /*******************************************************************
  *
@@ -6958,6 +8260,7 @@ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg)
    struct CellGroupConfigRrc__rlc_BearerToAddModList *rlcBearerList=NULLP;
    struct RLC_Config *rlcConfig=NULLP;
    struct LogicalChannelConfig *macLcConfig=NULLP;
+   struct MAC_CellGroupConfig__drx_ConfigRrc *drxCfg=NULLP;
    struct SchedulingRequestConfig *schedulingRequestConfig=NULLP;
    struct SchedulingRequestConfig__schedulingRequestToAddModList *schReqList=NULLP;
    struct TAG_Config *tagConfig=NULLP;
@@ -6978,11 +8281,49 @@ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg)
                macLcConfig = rlcBearerList->list.array[idx]->mac_LogicalChannelConfig;
                if(rlcConfig)
                {
-                  if(rlcConfig->choice.am)
+                  switch(rlcConfig->present)
                   {
-                     DU_FREE(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t));
-                     DU_FREE(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t)); 
-                     DU_FREE(rlcConfig->choice.am, sizeof(struct RLC_Config__am));
+                     case RLC_Config_PR_NOTHING:
+                        break;
+
+                     case RLC_Config_PR_am:
+                        {
+                           if(rlcConfig->choice.am)
+                           {
+                              DU_FREE(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t));
+                              DU_FREE(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t)); 
+                              DU_FREE(rlcConfig->choice.am, sizeof(struct RLC_Config__am));
+                           }
+                           break;
+                        }
+                     case RLC_Config_PR_um_Bi_Directional:
+                        {
+                           if(rlcConfig->choice.um_Bi_Directional)
+                           {
+                              DU_FREE(rlcConfig->choice.um_Bi_Directional->dl_UM_RLC.sn_FieldLength, sizeof(SN_FieldLengthUM_t)); 
+                              DU_FREE(rlcConfig->choice.um_Bi_Directional->ul_UM_RLC.sn_FieldLength, sizeof(SN_FieldLengthUM_t));
+                              DU_FREE(rlcConfig->choice.um_Bi_Directional, sizeof(struct RLC_Config__um_Bi_Directional));
+                           }
+                           break;
+                        }
+                     case RLC_Config_PR_um_Uni_Directional_UL:
+                        {
+                           if(rlcConfig->choice.um_Uni_Directional_UL)
+                           {
+                              DU_FREE(rlcConfig->choice.um_Uni_Directional_UL->ul_UM_RLC.sn_FieldLength, sizeof(SN_FieldLengthUM_t));
+                              DU_FREE(rlcConfig->choice.um_Uni_Directional_UL , sizeof(struct RLC_Config__um_Uni_Directional_UL));
+                           }
+                           break;
+                        }
+                     case RLC_Config_PR_um_Uni_Directional_DL:
+                        {
+                           if(rlcConfig->choice.um_Uni_Directional_DL )
+                           {
+                              DU_FREE(rlcConfig->choice.um_Uni_Directional_DL->dl_UM_RLC.sn_FieldLength, sizeof(SN_FieldLengthUM_t));
+                              DU_FREE(rlcConfig->choice.um_Uni_Directional_DL , sizeof(struct RLC_Config__um_Uni_Directional_DL));
+                           }
+                           break;
+                        }
                   }    
                   DU_FREE(rlcConfig, sizeof(struct RLC_Config));
                }
@@ -7008,6 +8349,27 @@ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg)
    macCellGrpCfg = cellGrpCfg->mac_CellGroupConfig;
    if(macCellGrpCfg)
    {
+      drxCfg = macCellGrpCfg->drx_ConfigRrc;
+
+      if(drxCfg)
+      {
+          switch(drxCfg->present)
+          {
+            case MAC_CellGroupConfig__drx_ConfigRrc_PR_NOTHING:
+               break;
+            case MAC_CellGroupConfig__drx_ConfigRrc_PR_setup:
+            {
+               if(drxCfg->choice.setup)
+               {
+                  DU_FREE(drxCfg->choice.setup->shortDRX, sizeof(struct DRX_ConfigRrc__shortDRX));  
+                  DU_FREE(drxCfg->choice.setup, sizeof(struct DRX_ConfigRrc));
+               }
+            }
+            case MAC_CellGroupConfig__drx_ConfigRrc_PR_release:
+               break;
+          }
+          DU_FREE(drxCfg, sizeof(struct MAC_CellGroupConfig__drx_ConfigRrc));
+      }
       schedulingRequestConfig = macCellGrpCfg->schedulingRequestConfig; 
       if(schedulingRequestConfig)
       {
@@ -7032,6 +8394,7 @@ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg)
       }
       if(macCellGrpCfg->bsr_Config)
       {
+         DU_FREE(macCellGrpCfg->bsr_Config->logicalChannelSR_DelayTimer, sizeof(long));
          DU_FREE(macCellGrpCfg->bsr_Config, sizeof(struct BSR_Config));
       }
       tagConfig = macCellGrpCfg->tag_Config;
@@ -7073,61 +8436,74 @@ uint8_t FreeMemDuToCuRrcCont(CellGroupConfigRrc_t *cellGrpCfg)
    spCellCfg = cellGrpCfg->spCellConfig;
    if(spCellCfg)
    {
-      if(spCellCfg->servCellIndex)
+      /* Free serving cell index */
+      DU_FREE(spCellCfg->servCellIndex, sizeof(long));
+
+      /* Free Reconfiguration with sync */
+      if(spCellCfg->reconfigurationWithSync)
+      {
+         FreeRecfgWithSync(spCellCfg->reconfigurationWithSync);
+         DU_FREE(spCellCfg->reconfigurationWithSync, sizeof(ReconfigurationWithSync_t));
+      }
+
+      /* Free rlmInSyncOutOfSyncThreshold */
+      DU_FREE(spCellCfg->rlmInSyncOutOfSyncThreshold, sizeof(long));
+
+      /* Free SP Cell config dedicated */
+      if(spCellCfg->spCellConfigDedicated)
       {
-         if(spCellCfg->rlmInSyncOutOfSyncThreshold)
+         srvCellCfg = spCellCfg->spCellConfigDedicated;
+
+         /* Free TDD UL-DL config dedicated */
+         DU_FREE(srvCellCfg->tdd_UL_DL_ConfigurationDedicated, sizeof(TDD_UL_DL_ConfigDedicated_t));
+
+         /* Free Initial Downlink BWP */
+         if(srvCellCfg->initialDownlinkBWP)
          {
-            if(spCellCfg->spCellConfigDedicated)
+            dlBwp = srvCellCfg->initialDownlinkBWP;
+
+            /* Free DL BWP PDCCH Config */
+            if(dlBwp->pdcch_Config)
             {
-               srvCellCfg = spCellCfg->spCellConfigDedicated;
-               if(srvCellCfg->tdd_UL_DL_ConfigurationDedicated)
-               {
-                  if(srvCellCfg->initialDownlinkBWP)
-                  {
-                     dlBwp = srvCellCfg->initialDownlinkBWP;
-                     if(srvCellCfg->firstActiveDownlinkBWP_Id)
-                     {
-                        if(srvCellCfg->defaultDownlinkBWP_Id)
-                        {
-                           if(srvCellCfg->uplinkConfig)
-                           {
-                              if(srvCellCfg->pdsch_ServingCellConfig)
-                              {
-                                 pdschCfg= srvCellCfg->pdsch_ServingCellConfig;
-                                 if(pdschCfg->choice.setup)
-                                 {
-                                    DU_FREE(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH,sizeof(long));
-                                    DU_FREE(pdschCfg->choice.setup, sizeof( struct PDSCH_ServingCellConfig));
-                                 }
-                                 DU_FREE(srvCellCfg->pdsch_ServingCellConfig, sizeof(struct
-                                          ServingCellConfig__pdsch_ServingCellConfig));
-                              }  
-                              FreeinitialUplinkBWP(srvCellCfg->uplinkConfig);
-                              DU_FREE(srvCellCfg->uplinkConfig, sizeof(UplinkConfig_t));       
-                           }
-                           DU_FREE(srvCellCfg->defaultDownlinkBWP_Id, sizeof(long));
-                        }
-                        DU_FREE(srvCellCfg->firstActiveDownlinkBWP_Id, sizeof(long));
-                     }
-                     if(dlBwp->pdcch_Config)
-                     {
-                        if(dlBwp->pdsch_Config)
-                        {
-                           FreeBWPDlDedPdschCfg(dlBwp);
-                           DU_FREE(dlBwp->pdsch_Config, sizeof(struct BWP_DownlinkDedicated__pdsch_Config));
-                        }
-                        FreeBWPDlDedPdcchCfg(dlBwp);
-                        DU_FREE(dlBwp->pdcch_Config, sizeof(struct BWP_DownlinkDedicated__pdcch_Config));
-                     }
-                     DU_FREE(srvCellCfg->initialDownlinkBWP, sizeof(BWP_DownlinkDedicated_t));
-                  }
-                  DU_FREE(srvCellCfg->tdd_UL_DL_ConfigurationDedicated, sizeof(TDD_UL_DL_ConfigDedicated_t));
-               }
-               DU_FREE(spCellCfg->spCellConfigDedicated, sizeof(ServingCellConfig_t));
+               FreeBWPDlDedPdcchCfg(dlBwp);
+               DU_FREE(dlBwp->pdcch_Config, sizeof(struct BWP_DownlinkDedicated__pdcch_Config));
+            }
+
+            /* Free DL BWP PDSCH config */
+            if(dlBwp->pdsch_Config)
+            {
+               FreeBWPDlDedPdschCfg(dlBwp);
+               DU_FREE(dlBwp->pdsch_Config, sizeof(struct BWP_DownlinkDedicated__pdsch_Config));
+            }
+            DU_FREE(srvCellCfg->initialDownlinkBWP, sizeof(BWP_DownlinkDedicated_t));
+         }
+
+         /* Free First Active Downlink BWP */
+         DU_FREE(srvCellCfg->firstActiveDownlinkBWP_Id, sizeof(long));
+
+         /* Free Default downlink BWP */
+         DU_FREE(srvCellCfg->defaultDownlinkBWP_Id, sizeof(long));
+
+         /* Free Uplink config */
+         if(srvCellCfg->uplinkConfig)
+         {
+            FreeinitialUplinkBWP(srvCellCfg->uplinkConfig);
+            DU_FREE(srvCellCfg->uplinkConfig, sizeof(UplinkConfig_t)); 
+         }
+
+         /* Free PDSCH serving cell config */
+         if(srvCellCfg->pdsch_ServingCellConfig)
+         {
+            pdschCfg= srvCellCfg->pdsch_ServingCellConfig;
+            if(pdschCfg->choice.setup)
+            {
+               DU_FREE(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH,sizeof(long));
+               DU_FREE(pdschCfg->choice.setup, sizeof(struct PDSCH_ServingCellConfig));
             }
-            DU_FREE(spCellCfg->rlmInSyncOutOfSyncThreshold, sizeof(long));
+            DU_FREE(srvCellCfg->pdsch_ServingCellConfig, sizeof(struct ServingCellConfig__pdsch_ServingCellConfig));
          }
-         DU_FREE(spCellCfg->servCellIndex, sizeof(long));
+
+         DU_FREE(spCellCfg->spCellConfigDedicated, sizeof(ServingCellConfig_t));
       }
       DU_FREE(spCellCfg,sizeof(SpCellConfig_t));
    }
@@ -7233,7 +8609,7 @@ uint8_t BuildCellGroupConfigRrc(DuUeCb *ueCb, OCTET_STRING_t *duToCuRrcContainer
       xer_fprint(stdout, &asn_DEF_CellGroupConfigRrc, &cellGrpCfg);
       memset(encBuf, 0, ENC_BUF_MAX_LEN);
       encBufSize = 0;
-      encRetVal = aper_encode(&asn_DEF_CellGroupConfigRrc, 0, &cellGrpCfg, PrepFinalEncBuf, encBuf);
+      encRetVal = uper_encode(&asn_DEF_CellGroupConfigRrc, 0, &cellGrpCfg, PrepFinalEncBuf, encBuf);
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
@@ -7245,10 +8621,12 @@ uint8_t BuildCellGroupConfigRrc(DuUeCb *ueCb, OCTET_STRING_t *duToCuRrcContainer
       else
       {
          DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for DuToCuRrcContainer\n");
+#ifdef DEBUG_ASN_PRINT
          for(int i=0; i< encBufSize; i++)
          {
             printf("%x",encBuf[i]);
          }
+#endif
       }
 
       duToCuRrcContainer->size = encBufSize;
@@ -7534,10 +8912,12 @@ uint8_t BuildAndSendInitialRrcMsgTransfer(uint32_t gnbDuUeF1apId, uint16_t crnti
 
         DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for Initial UL RRC\
               Message transfer\n");
+#ifdef DEBUG_ASN_PRINT
         for(int i=0; i< encBufSize; i++)
         {
            printf("%x",encBuf[i]);
         }
+#endif
       }
       /* Sending  msg  */
       if(sendF1APMsg() != ROK)
@@ -7554,32 +8934,6 @@ uint8_t BuildAndSendInitialRrcMsgTransfer(uint32_t gnbDuUeF1apId, uint16_t crnti
 
 /*****  UE SETUP REQUEST *****/
 
-/*******************************************************************
- *
- * @brief Free Qos And Snssai Drb Info
- *
- * @details
- *
- *    Function : freeDrbQosAndSnssaiInfo
- *
- *    Functionality: Free Qos And Snssai Drb Info
- *
- * @params[in] LcCfg *lcCfg,
- * @return void
- *
- * ****************************************************************/
-void freeDrbQosAndSnssaiInfo(LcCfg *lcCfg)
-{
-   if(lcCfg->snssai)
-   {
-      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->snssai, sizeof(Snssai));
-   }
-   if(lcCfg->drbQos)
-   {
-      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->drbQos, sizeof(DrbQosInfo));
-   }
-}
-
 /******************************************************************
 *
 * @brief Function to delete the RLC Lc cfg from UE APP DB
@@ -7599,35 +8953,22 @@ void freeRlcLcCfg(RlcBearerCfg *lcCfg)
    {
       case RLC_AM :
          {
-            if(lcCfg->u.amCfg)
-            {
-               DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.amCfg, sizeof(AmBearerCfg));
-            }
+            DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.amCfg, sizeof(AmBearerCfg));
             break;
          }
       case RLC_UM_BI_DIRECTIONAL :
          {
-            if(lcCfg->u.umBiDirCfg)
-            {
-               DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.umBiDirCfg, sizeof(UmBiDirBearerCfg));
-            }
+            DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.umBiDirCfg, sizeof(UmBiDirBearerCfg));
             break;
          }
       case RLC_UM_UNI_DIRECTIONAL_UL :
          {
-            if(lcCfg->u.umUniDirUlCfg)
-            {
-               DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.umUniDirUlCfg, sizeof(UmUniDirUlBearerCfg));
-            }
+            DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.umUniDirUlCfg, sizeof(UmUniDirUlBearerCfg));
             break;
-
          }
       case RLC_UM_UNI_DIRECTIONAL_DL :
          {
-            if(lcCfg->u.umUniDirDlCfg)
-            {
-               DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.umUniDirDlCfg, sizeof(UmUniDirDlBearerCfg));
-            }
+            DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->u.umUniDirDlCfg, sizeof(UmUniDirDlBearerCfg));
             break;
          }
       default:
@@ -7652,7 +8993,7 @@ void freeRlcLcCfg(RlcBearerCfg *lcCfg)
  *
  * ****************************************************************/
 
-void  freeMacLcCfg(LcCfg *lcCfg)
+void freeMacLcCfg(LcCfg *lcCfg)
 {
     /* Deleting DRBQOS */
    if(lcCfg->drbQos)
@@ -8183,7 +9524,7 @@ void freeAperDecodeinitialUplinkBWPConfig(UplinkConfig_t *ulCfg)
  * @return void
  *
  * ****************************************************************/
-void freeDuUeCfg(DuUeCfg *ueCfg)
+void freeDuUeCfg(UeCtxtActionType actionType, DuUeCfg *ueCfg)
 {
    uint8_t lcIdx = 0;
    uint8_t arrIdx = 0;
@@ -8212,194 +9553,200 @@ void freeDuUeCfg(DuUeCfg *ueCfg)
 
    if(ueCfg->cellGrpCfg)
    {
-      
       rlcBearerList = cellGrpCfg->rlc_BearerToAddModList;
-      if(rlcBearerList)
-      {
-        if(rlcBearerList->list.array)
-        {
-           for(arrIdx=0; arrIdx<rlcBearerList->list.count; arrIdx++)
-           {
-              if(rlcBearerList->list.array[arrIdx])
-              {
-                 rlcConfig   = rlcBearerList->list.array[arrIdx]->rlc_Config;
-                 macLcConfig = rlcBearerList->list.array[arrIdx]->mac_LogicalChannelConfig;
-                 
-                 if(rlcBearerList->list.array[arrIdx]->servedRadioBearer)
-                 {
-                    free(rlcBearerList->list.array[arrIdx]->servedRadioBearer);
-                 }
-                 if(rlcConfig)
-                 {
-                    if(rlcConfig->choice.am)
-                    {
-                       free(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength);
-                       free(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength);
-                       free(rlcConfig->choice.am);
-                    }
-                    free(rlcBearerList->list.array[arrIdx]->rlc_Config);
-                 }
-                 if(macLcConfig)
-                 {
-                    if(macLcConfig->ul_SpecificParameters)
-                    {
-                       free(macLcConfig->ul_SpecificParameters->schedulingRequestID);
-                       free(macLcConfig->ul_SpecificParameters->logicalChannelGroup);
-                       free(macLcConfig->ul_SpecificParameters);
-                    }
-                    free(rlcBearerList->list.array[arrIdx]->mac_LogicalChannelConfig);
-                 }
-                 free(rlcBearerList->list.array[arrIdx]); 
-              }
-           }
-           free(rlcBearerList->list.array);
-        }
-        free(cellGrpCfg->rlc_BearerToAddModList);
+      if(rlcBearerList)
+      {
+         if(rlcBearerList->list.array)
+         {
+            for(arrIdx=0; arrIdx<rlcBearerList->list.count; arrIdx++)
+            {
+               if(rlcBearerList->list.array[arrIdx])
+               {
+                  rlcConfig   = rlcBearerList->list.array[arrIdx]->rlc_Config;
+                  macLcConfig = rlcBearerList->list.array[arrIdx]->mac_LogicalChannelConfig;
+
+                  if(rlcBearerList->list.array[arrIdx]->servedRadioBearer)
+                  {
+                     free(rlcBearerList->list.array[arrIdx]->servedRadioBearer);
+                  }
+                  if(rlcConfig)
+                  {
+                     if(rlcConfig->choice.am)
+                     {
+                        free(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength);
+                        free(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength);
+                        free(rlcConfig->choice.am);
+                     }
+                     free(rlcBearerList->list.array[arrIdx]->rlc_Config);
+                  }
+                  if(macLcConfig)
+                  {
+                     if(macLcConfig->ul_SpecificParameters)
+                     {
+                        free(macLcConfig->ul_SpecificParameters->schedulingRequestID);
+                        free(macLcConfig->ul_SpecificParameters->logicalChannelGroup);
+                        free(macLcConfig->ul_SpecificParameters);
+                     }
+                     free(rlcBearerList->list.array[arrIdx]->mac_LogicalChannelConfig);
+                  }
+                  free(rlcBearerList->list.array[arrIdx]); 
+               }
+            }
+            free(rlcBearerList->list.array);
+         }
+         free(cellGrpCfg->rlc_BearerToAddModList);
       }
 
       macCellGrpCfg = cellGrpCfg->mac_CellGroupConfig;
       if(macCellGrpCfg)
       {
-        schedulingRequestConfig = macCellGrpCfg->schedulingRequestConfig;
-        if(schedulingRequestConfig)
-        {
-           schReqList = schedulingRequestConfig->schedulingRequestToAddModList;
-           if(schReqList)
-           {
-              if(schReqList->list.array)
-              {
-                 for(arrIdx=0;arrIdx<schReqList->list.count; arrIdx++)
-                 {
-                    if(schReqList->list.array[arrIdx])
-                    {
-                       free(schReqList->list.array[arrIdx]->sr_ProhibitTimer); 
-                       free(schReqList->list.array[arrIdx]);
-                    }
-                 }
-                 free(schReqList->list.array);
-              }
-              free(schedulingRequestConfig->schedulingRequestToAddModList);
-           }
-           free(macCellGrpCfg->schedulingRequestConfig);
-        }
-        if(macCellGrpCfg->bsr_Config)
-        {
-           free(macCellGrpCfg->bsr_Config);
-        }
-        tagConfig = macCellGrpCfg->tag_Config;
-        if(tagConfig)
-        {
-           tagList = tagConfig->tag_ToAddModList;
-           if(tagList)
-           {
-              if(tagList->list.array)
-              {
-                 for(arrIdx=0; arrIdx<tagList->list.count; arrIdx++)
-                 {
-                    free(tagList->list.array[arrIdx]);
-                 }
-                 free(tagList->list.array);
-              }
-              free(tagConfig->tag_ToAddModList);
-           }
-           free(tagConfig); 
-        }
+         schedulingRequestConfig = macCellGrpCfg->schedulingRequestConfig;
+         if(schedulingRequestConfig)
+         {
+            schReqList = schedulingRequestConfig->schedulingRequestToAddModList;
+            if(schReqList)
+            {
+               if(schReqList->list.array)
+               {
+                  for(arrIdx=0;arrIdx<schReqList->list.count; arrIdx++)
+                  {
+                     if(schReqList->list.array[arrIdx])
+                     {
+                        free(schReqList->list.array[arrIdx]->sr_ProhibitTimer); 
+                        free(schReqList->list.array[arrIdx]);
+                     }
+                  }
+                  free(schReqList->list.array);
+               }
+               free(schedulingRequestConfig->schedulingRequestToAddModList);
+            }
+            free(macCellGrpCfg->schedulingRequestConfig);
+         }
+         if(macCellGrpCfg->bsr_Config)
+         {
+            free(macCellGrpCfg->bsr_Config);
+         }
+         tagConfig = macCellGrpCfg->tag_Config;
+         if(tagConfig)
+         {
+            tagList = tagConfig->tag_ToAddModList;
+            if(tagList)
+            {
+               if(tagList->list.array)
+               {
+                  for(arrIdx=0; arrIdx<tagList->list.count; arrIdx++)
+                  {
+                     free(tagList->list.array[arrIdx]);
+                  }
+                  free(tagList->list.array);
+               }
+               free(tagConfig->tag_ToAddModList);
+            }
+            free(tagConfig); 
+         }
 
-        phrConfig = macCellGrpCfg->phr_Config;
-        if(phrConfig)
-        {
-           free(phrConfig->choice.setup); 
-           free(phrConfig); 
-        }
+         phrConfig = macCellGrpCfg->phr_Config;
+         if(phrConfig)
+         {
+            free(phrConfig->choice.setup); 
+            free(phrConfig); 
+         }
 
-        free(macCellGrpCfg); 
+         free(macCellGrpCfg); 
       }
 
       phyCellGrpCfg = cellGrpCfg->physicalCellGroupConfig;
       if(phyCellGrpCfg)
       {
-        free(phyCellGrpCfg->p_NR_FR1);
-        free(phyCellGrpCfg); 
+         free(phyCellGrpCfg->p_NR_FR1);
+         free(phyCellGrpCfg); 
       }
 
       spCellCfg = cellGrpCfg->spCellConfig;
       if(spCellCfg)
       {
-        if(spCellCfg->servCellIndex)
-        {
-           if(spCellCfg->rlmInSyncOutOfSyncThreshold)
-           {
-              if(spCellCfg->spCellConfigDedicated)
-              {
-                 srvCellCfg = spCellCfg->spCellConfigDedicated;
-                 if(srvCellCfg->initialDownlinkBWP)
-                 {
-                    dlBwp = srvCellCfg->initialDownlinkBWP;
-                    if(srvCellCfg->firstActiveDownlinkBWP_Id)
-                    {
-                       if(srvCellCfg->defaultDownlinkBWP_Id)
-                       {
-                          if(srvCellCfg->uplinkConfig)
-                          {
+         if(spCellCfg->servCellIndex)
+         {
+            if(spCellCfg->rlmInSyncOutOfSyncThreshold)
+            {
+               if(spCellCfg->spCellConfigDedicated)
+               {
+                  srvCellCfg = spCellCfg->spCellConfigDedicated;
+                  if(srvCellCfg->initialDownlinkBWP)
+                  {
+                     dlBwp = srvCellCfg->initialDownlinkBWP;
+                     if(srvCellCfg->firstActiveDownlinkBWP_Id)
+                     {
+                        if(srvCellCfg->defaultDownlinkBWP_Id)
+                        {
+                           if(srvCellCfg->uplinkConfig)
+                           {
 
-                             if(srvCellCfg->pdsch_ServingCellConfig)
-                             {
-                                pdschCfg=
-                                   srvCellCfg->pdsch_ServingCellConfig;
-                                if(pdschCfg->choice.setup)
-                                {
+                              if(srvCellCfg->pdsch_ServingCellConfig)
+                              {
+                                 pdschCfg=
+                                    srvCellCfg->pdsch_ServingCellConfig;
+                                 if(pdschCfg->choice.setup)
+                                 {
 
-                                   free(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH);
-                                   free(pdschCfg->choice.setup);
-                                }
+                                    free(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH);
+                                    free(pdschCfg->choice.setup);
+                                 }
 
-                                free(srvCellCfg->pdsch_ServingCellConfig);
-                             }
+                                 free(srvCellCfg->pdsch_ServingCellConfig);
+                              }
 
-                             freeAperDecodeinitialUplinkBWPConfig(srvCellCfg->uplinkConfig);
-                             free(srvCellCfg->uplinkConfig);
-                          }
-                          free(srvCellCfg->defaultDownlinkBWP_Id);
-                       }
+                              freeAperDecodeinitialUplinkBWPConfig(srvCellCfg->uplinkConfig);
+                              free(srvCellCfg->uplinkConfig);
+                           }
+                           free(srvCellCfg->defaultDownlinkBWP_Id);
+                        }
 
-                       free(srvCellCfg->firstActiveDownlinkBWP_Id);
-                    }
-                    if(dlBwp->pdcch_Config)
-                    {
-                       if(dlBwp->pdsch_Config)
-                       {
-                          freeAperDecodeBWPDlDedPdschConfig(dlBwp);
-                          free(dlBwp->pdsch_Config);
-                       }
-                       freeAperDecodeBWPDlDedPdcchConfig(dlBwp);
-                       free(dlBwp->pdcch_Config);
-                    }
-                    free(srvCellCfg->initialDownlinkBWP);
-                 }
+                        free(srvCellCfg->firstActiveDownlinkBWP_Id);
+                     }
+                     if(dlBwp->pdcch_Config)
+                     {
+                        if(dlBwp->pdsch_Config)
+                        {
+                           freeAperDecodeBWPDlDedPdschConfig(dlBwp);
+                           free(dlBwp->pdsch_Config);
+                        }
+                        freeAperDecodeBWPDlDedPdcchConfig(dlBwp);
+                        free(dlBwp->pdcch_Config);
+                     }
+                     free(srvCellCfg->initialDownlinkBWP);
+                  }
 
-                 free(spCellCfg->spCellConfigDedicated);
-              }
-              free(spCellCfg->rlmInSyncOutOfSyncThreshold);
-           }
-           free(spCellCfg->servCellIndex); 
-        }
-        free(spCellCfg);
+                  free(spCellCfg->spCellConfigDedicated);
+               }
+               free(spCellCfg->rlmInSyncOutOfSyncThreshold);
+            }
+            free(spCellCfg->servCellIndex); 
+         }
+         free(spCellCfg);
       }
       DU_FREE(ueCfg->cellGrpCfg, sizeof(CellGroupConfigRrc_t));
       ueCfg->cellGrpCfg = NULLP;
    }
+
    if(ueCfg->ambrCfg)
    {
       DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, ueCfg->ambrCfg, sizeof(AmbrCfg));
    }
-   for(lcIdx = 0; lcIdx < ueCfg->numRlcLcs; lcIdx++)
+
+   if(actionType != UE_CTXT_CFG_QUERY)
    {
-      freeRlcLcCfg(&ueCfg->rlcLcCfg[lcIdx]);
+      for(lcIdx = 0; lcIdx < ueCfg->numRlcLcs; lcIdx++)
+      {
+         freeRlcLcCfg(&ueCfg->rlcLcCfg[lcIdx].rlcBearerCfg);
+      }
    }
+
    for(lcIdx = 0; lcIdx < ueCfg->numMacLcs; lcIdx++)
    {
-      freeMacLcCfg(&ueCfg->macLcCfg[lcIdx]);
+      freeMacLcCfg(&ueCfg->macLcCfg[lcIdx].lcConfig);
    }
+
    for(lcIdx = 0; lcIdx < ueCfg->numDrb; lcIdx++)
    {
       DU_FREE(ueCfg->upTnlInfo[lcIdx].tnlCfg1, sizeof(GtpTnlCfg));
@@ -8433,7 +9780,7 @@ void freeF1UeDb(F1UeContextSetupDb *f1UeDb)
       }
       DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, f1UeDb->dlRrcMsg, sizeof(F1DlRrcMsg));
    }
-   freeDuUeCfg(&f1UeDb->duUeCfg);
+   freeDuUeCfg(f1UeDb->actionType, &f1UeDb->duUeCfg);
    memset(f1UeDb, 0, sizeof(F1UeContextSetupDb));
    DU_FREE(f1UeDb, sizeof(F1UeContextSetupDb));
 }
@@ -8737,30 +10084,30 @@ uint8_t extractDrbSnssaiCfg(SNSSAI_t *RecvSnssai, Snssai **snssaiToBeShared)
  * ****************************************************************/
 
 void procRlcLcCfg(uint8_t rbId, uint8_t lcId, uint8_t rbType, uint8_t rlcMode,\
-   uint8_t configType, RLC_Config_t *f1RlcCfg, RlcBearerCfg *lcCfg, QoSInformation_t *qoSInformation)
+   uint8_t configType, RLC_Config_t *f1RlcCfg, DuRlcBearerCfg *lcCfg, QoSInformation_t *qoSInformation)
 {
    DRB_Information_t *drbInfo;
 
-   lcCfg->rbId   = rbId;
+   lcCfg->rlcBearerCfg.rbId   = rbId;
    lcCfg->configType = configType;
 
    if(rbType == RB_TYPE_SRB)
    {
-      lcCfg->rbType = RB_TYPE_SRB;
-      lcCfg->lcId   = rbId;
-      lcCfg->lcType = LCH_DCCH;
-      lcCfg->rlcMode = RLC_AM;
+      lcCfg->rlcBearerCfg.rbType = RB_TYPE_SRB;
+      lcCfg->rlcBearerCfg.lcId   = rbId;
+      lcCfg->rlcBearerCfg.lcType = LCH_DCCH;
+      lcCfg->rlcBearerCfg.rlcMode = RLC_AM;
    }
    else if(rbType == RB_TYPE_DRB)
    {
-      lcCfg->rbType = RB_TYPE_DRB;
-      lcCfg->lcId   = lcId;
-      lcCfg->lcType = LCH_DTCH;
-      lcCfg->rlcMode = rlcMode;
+      lcCfg->rlcBearerCfg.rbType = RB_TYPE_DRB;
+      lcCfg->rlcBearerCfg.lcId   = lcId;
+      lcCfg->rlcBearerCfg.lcType = LCH_DTCH;
+      lcCfg->rlcBearerCfg.rlcMode = rlcMode;
    }
    if(f1RlcCfg) /* rlc mode config recived */
    {
-      extractRlcModeCfg(lcCfg->rlcMode, lcCfg, f1RlcCfg);
+      extractRlcModeCfg(lcCfg->rlcBearerCfg.rlcMode, &lcCfg->rlcBearerCfg, f1RlcCfg);
    }
    if(qoSInformation != NULLP)
    {
@@ -8770,7 +10117,7 @@ void procRlcLcCfg(uint8_t rbId, uint8_t lcId, uint8_t rbType, uint8_t rlcMode,\
                QoSInformation_ExtIEs__value_PR_DRB_Information)
          {
             drbInfo = &qoSInformation->choice.choice_extension->value.choice.DRB_Information; 
-            if(extractDrbSnssaiCfg(&drbInfo->sNSSAI, &lcCfg->snssai) != ROK)
+            if(extractDrbSnssaiCfg(&drbInfo->sNSSAI, &lcCfg->rlcBearerCfg.snssai) != ROK)
             {
                DU_LOG("\nERROR  -->  DUAPP: Unable to extract Snssai information at procRlcLcCfg()");
                return;
@@ -8969,7 +10316,7 @@ uint8_t extractDrbQosCfg(DRB_Information_t *drbInfo, LcCfg *macLcToAdd )
  *
  * ****************************************************************/
 uint8_t extractDrbCfg(DRBs_ToBeSetup_Item_t *drbItem, DRBs_ToBeSetupMod_Item_t *drbSetupModItem,\
-DRBs_ToBeModified_Item_t *drbModItem,  LcCfg *macLcToAdd, UpTnlCfg *upTnlInfo)
+DRBs_ToBeModified_Item_t *drbModItem,  DuLcCfg *lcCfgToAdd, UpTnlCfg *upTnlInfo)
 {
    DRB_Information_t *drbInfo = NULLP;
 
@@ -8985,7 +10332,7 @@ DRBs_ToBeModified_Item_t *drbModItem,  LcCfg *macLcToAdd, UpTnlCfg *upTnlInfo)
          if(drbItem->qoSInformation.choice.choice_extension->value.present == QoSInformation_ExtIEs__value_PR_DRB_Information)
          {
             drbInfo = &drbItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information;
-            if(extractDrbQosCfg(drbInfo , macLcToAdd) != ROK)
+            if(extractDrbQosCfg(drbInfo , &lcCfgToAdd->lcConfig) != ROK)
             {
                DU_LOG("\nERROR  -->  DUAPP : Failed to extract qos Cfg at extractDrbCfg()");
                return RFAILED;
@@ -9007,7 +10354,7 @@ DRBs_ToBeModified_Item_t *drbModItem,  LcCfg *macLcToAdd, UpTnlCfg *upTnlInfo)
          QoSInformation_ExtIEs__value_PR_DRB_Information)
          {
             drbInfo = &drbSetupModItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information;
-            if(extractDrbQosCfg(drbInfo , macLcToAdd) != ROK)
+            if(extractDrbQosCfg(drbInfo , &lcCfgToAdd->lcConfig) != ROK)
             {
                DU_LOG("\nERROR  -->  DUAPP : Failed to extract qos Cfg at extractDrbCfg()");  
                return RFAILED;
@@ -9032,7 +10379,7 @@ DRBs_ToBeModified_Item_t *drbModItem,  LcCfg *macLcToAdd, UpTnlCfg *upTnlInfo)
                   QoSInformation_ExtIEs__value_PR_DRB_Information)
             {
                drbInfo = &drbModItem->qoSInformation->choice.choice_extension->value.choice.DRB_Information;
-               if(extractDrbQosCfg(drbInfo , macLcToAdd) != ROK)
+               if(extractDrbQosCfg(drbInfo , &lcCfgToAdd->lcConfig) != ROK)
                {
                   DU_LOG("\nERROR  -->  DUAPP : Failed to extract qos Cfg at extractDrbCfg()");  
                   return RFAILED;
@@ -9061,7 +10408,7 @@ DRBs_ToBeModified_Item_t *drbModItem,  LcCfg *macLcToAdd, UpTnlCfg *upTnlInfo)
  * ****************************************************************/
 
 uint8_t extractMacRbCfg(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbCfg,\
-DRBs_ToBeSetupMod_Item_t *drbSetupModCfg,  DRBs_ToBeModified_Item_t *drbModCfg, LogicalChannelConfig_t *ulLcCfg, LcCfg *lcCfg, UpTnlCfg *upTnlInfo)
+DRBs_ToBeSetupMod_Item_t *drbSetupModCfg,  DRBs_ToBeModified_Item_t *drbModCfg, LogicalChannelConfig_t *ulLcCfg, DuLcCfg *lcCfg, UpTnlCfg *upTnlInfo)
 {
    if(drbCfg != NULLP)
    {
@@ -9089,20 +10436,21 @@ DRBs_ToBeSetupMod_Item_t *drbSetupModCfg,  DRBs_ToBeModified_Item_t *drbModCfg,
    }
    else
    {
-      lcCfg->drbQos = NULLP;
-      lcCfg->snssai = NULLP;
-      if(lcCfg->lcId == SRB2_LCID)
-         lcCfg->dlLcCfg.lcp = LC_PRIORITY_3;
+      lcCfg->lcConfig.drbQos = NULLP;
+      lcCfg->lcConfig.snssai = NULLP;
+      if(lcCfg->lcConfig.lcId == SRB2_LCID)
+         lcCfg->lcConfig.dlLcCfg.lcp = LC_PRIORITY_3;
       else
-         lcCfg->dlLcCfg.lcp = LC_PRIORITY_1;
+         lcCfg->lcConfig.dlLcCfg.lcp = LC_PRIORITY_1;
+
    }
    if(ulLcCfg)
    {
-      lcCfg->ulLcCfgPres = true;
-      extractUlLcCfg(&lcCfg->ulLcCfg, ulLcCfg);
+      lcCfg->lcConfig.ulLcCfgPres = true;
+      extractUlLcCfg(&lcCfg->lcConfig.ulLcCfg, ulLcCfg);
    }
    else
-      lcCfg->ulLcCfgPres = false;
+      lcCfg->lcConfig.ulLcCfgPres = false;
    return ROK;
 }
 
@@ -9123,17 +10471,17 @@ DRBs_ToBeSetupMod_Item_t *drbSetupModCfg,  DRBs_ToBeModified_Item_t *drbModCfg,
 
 uint8_t procMacLcCfg(uint8_t lcId, uint8_t rbType, uint8_t configType, DRBs_ToBeSetup_Item_t *drbItem,\
 DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem, LogicalChannelConfig_t *ulLcCfg,\
-LcCfg *lcCfg, UpTnlCfg *upTnlInfo)
+DuLcCfg *lcCfg, UpTnlCfg *upTnlInfo)
 {
    uint8_t ret = ROK;
 
-   lcCfg->lcId = lcId;
+   lcCfg->lcConfig.lcId = lcId;
    lcCfg->configType = configType;
    if(rbType == RB_TYPE_SRB)
    {
       ret = extractMacRbCfg(lcId, NULL, NULL, NULL, ulLcCfg, lcCfg, NULL);
    }
-   else if(rbType == RB_TYPE_DRB)
+   else if(rbType == RB_TYPE_DRB && upTnlInfo != NULLP)
    {
       if(drbItem != NULL)
         ret = extractMacRbCfg(lcId, drbItem, NULL, NULL, ulLcCfg, lcCfg, upTnlInfo);
@@ -9209,8 +10557,8 @@ uint8_t extractRlcCfgToAddMod(struct CellGroupConfigRrc__rlc_BearerToAddModList
      }
      
      /* Filling RLC/MAC Config*/
-     memset(&ueCfgDb->macLcCfg[idx], 0, sizeof(LcCfg));
-     memset(&ueCfgDb->rlcLcCfg[idx], 0, sizeof(RlcBearerCfg));
+     memset(&ueCfgDb->macLcCfg[idx], 0, sizeof(DuLcCfg));
+     memset(&ueCfgDb->rlcLcCfg[idx], 0, sizeof(DuRlcBearerCfg));
      procRlcLcCfg(rbId, lcId, rbType, rlcMode, CONFIG_UNKNOWN, f1RlcCfg, &(ueCfgDb->rlcLcCfg[idx]), NULLP);
      if(procMacLcCfg(lcId, rbType, CONFIG_UNKNOWN, NULL, NULL, NULL, macUlLcCfg, &ueCfgDb->macLcCfg[idx], NULL) != ROK)
      {
@@ -9275,7 +10623,7 @@ void freeMacPdschServCellInfo(PdschServCellCfg *pdsch)
  * @return void
  *
  * ****************************************************************/
-void freeMacServingCellInfo(ServCellCfgInfo *srvCellCfg)
+void freeMacServingCellInfo(ServCellRecfgInfo *srvCellCfg)
 {
    uint8_t timeDomRsrcIdx;
 
@@ -9306,16 +10654,16 @@ void freeMacServingCellInfo(ServCellCfgInfo *srvCellCfg)
  *
  * @details
  *
- *    Function : freeUeReCfgCellGrpInfo
+ *    Function : freeUeRecfgCellGrpInfo
  *
  *    Functionality: Free cell Grp Cfg Info
  *
- * @params[in] MacUeCfg*  duUeCfg
+ * @params[in] DuMacUeCfg*  duUeCfg
  * @return void
  *
  * ****************************************************************/
 
-void freeUeReCfgCellGrpInfo(MacUeCfg *macUeCfg)
+void freeUeRecfgCellGrpInfo(DuMacUeCfg *macUeCfg)
 {
    freeMacServingCellInfo(&macUeCfg->spCellCfg.servCellCfg);
 }
@@ -10513,8 +11861,8 @@ PucchCfg *storedPucchCfg)
  * @return ROK/RFAILD
  *
  * ****************************************************************/
-uint8_t extractSpCellDedicatedCfg(ServingCellConfig_t *cuSrvCellCfg, ServCellCfgInfo *macSrvCellCfg,\
-ServCellCfgInfo *storedSrvCellCfg)
+uint8_t extractSpCellDedicatedCfg(ServingCellConfig_t *cuSrvCellCfg, ServCellRecfgInfo *macSrvCellCfg,\
+ServCellRecfgInfo *storedSrvCellCfg)
 {
    uint8_t ret = ROK;
    BWP_DownlinkDedicated_t *dlBwp = NULLP;
@@ -10607,62 +11955,284 @@ ServCellCfgInfo *storedSrvCellCfg)
          }
       }
    }
-   if(cuSrvCellCfg->uplinkConfig)
+   if(cuSrvCellCfg->uplinkConfig)
+   {
+      if(cuSrvCellCfg->uplinkConfig->initialUplinkBWP)
+      {
+         ulBwp = ((BWP_UplinkDedicated_t *)(cuSrvCellCfg->uplinkConfig->initialUplinkBWP));
+         if(ulBwp->pusch_Config)
+         {
+            macSrvCellCfg->initUlBwp.puschPresent = true;
+            extractPuschCfg(ulBwp->pusch_Config, &macSrvCellCfg->initUlBwp.puschCfg);
+         }
+         if(ulBwp->pucch_Config)
+         {
+            macSrvCellCfg->initUlBwp.pucchPresent = true;
+            memset(&macSrvCellCfg->initUlBwp.pucchCfg, 0, sizeof(PucchCfg));
+            if(storedSrvCellCfg)
+            {
+               if(!storedSrvCellCfg->initUlBwp.pucchPresent)
+                  extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg, NULL);
+               else
+                  extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg,\
+                  &storedSrvCellCfg->initUlBwp.pucchCfg);
+            }
+            else
+            {
+               extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg, NULL);
+            }
+         }
+      }
+      if(cuSrvCellCfg->uplinkConfig->firstActiveUplinkBWP_Id)
+         macSrvCellCfg->firstActvUlBwpId = *(cuSrvCellCfg->uplinkConfig->firstActiveUplinkBWP_Id);
+   }
+   return ret;
+}
+
+#ifdef NR_DRX
+
+/*******************************************************************
+ *
+ * @brief fill long cycle offset value of drx in UE structure
+ *
+ * @details
+ *
+ *    Function : fillLongCycleOffsetValueInUeDb
+ *
+ *    Functionality: fill long cycle offset value of drx in UE structure
+ *
+ * @params[in] DrxLongCycleStartOffset  drxLongCycleStartOffset,
+ * struct DRX_ConfigRrc__drx_LongCycleStartOffset drx_LongCycleStartOffset
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+void fillLongCycleOffsetValueInUeDb(DrxLongCycleStartOffset *drxLongCycleStartOffset, struct DRX_ConfigRrc__drx_LongCycleStartOffset  *drx_LongCycleStartOffset)
+{
+
+   drxLongCycleStartOffset->drxLongCycleStartOffsetChoice = convertLongDrxCycleLengthEnumToValue(drx_LongCycleStartOffset->present);
+   switch(drx_LongCycleStartOffset->present)
+   {
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms10:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms10;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms20:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms20;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms32:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms32;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms40:
+        {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms40;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms60:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms60;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms64:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms64;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms70:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms70;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms80:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms80;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms128:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms128;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms160:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms160;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms256:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms256;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms320:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms320;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms512:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms512;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms640:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms640;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms1024:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms1024;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms1280:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms1280;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms2048:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms2048;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms2560:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms2560;
+            break;
+         }
+       case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms5120:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms5120;
+            break;
+         }
+      case DRX_ConfigRrc__drx_LongCycleStartOffset_PR_ms10240:
+         {
+            drxLongCycleStartOffset->drxLongCycleStartOffsetVal = drx_LongCycleStartOffset->choice.ms10240;
+            break;
+         }
+      default :
+         break;
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Fills drx configuration structure with the help of drx_ConfigRrc
+ *which recive from CU or storedDrxCfg which is already stored
+ *
+ * @details
+ *
+ *    Function : extractDrxConfiguration 
+ *
+ *    Functionality: Fills Reconfig Cell group Info received by CU
+ *   
+ * @params[in] cuMacCellGrpDrxConfig  = MAC_CellGroupConfig__drx_ConfigRrc information which
+ *                       is send by CU, which we have stored in F1UeContextSetupDb
+ *             DrxCfg * drxCfg  = Used to Store the information,
+ *                      which needs to send in other layer, as well as this can be
+ *                      the variable which stores the information in DuCb,
+ *             DrxCfg *storedDrxCfg = Null in case of sending the
+ *                      information to other layer else it will have the drx information 
+ *                      stored in the copyOfmacUeCfg which we have stored in F1UeContextSetupDb.
+ *
+ * @return void
+ *
+ * ****************************************************************/
+void extractDrxConfiguration(struct MAC_CellGroupConfig__drx_ConfigRrc *cuMacCellGrpDrxConfig, DrxCfg * drxCfg, DrxCfg *storedDrxCfg)
+{
+   struct DRX_ConfigRrc *cuDrxConfig;
+
+   if(storedDrxCfg)
+   {
+      memcpy(drxCfg, storedDrxCfg, sizeof(DrxCfg));
+   }
+   else
    {
-      if(cuSrvCellCfg->uplinkConfig->initialUplinkBWP)
+      if(cuMacCellGrpDrxConfig)
       {
-         ulBwp = ((BWP_UplinkDedicated_t *)(cuSrvCellCfg->uplinkConfig->initialUplinkBWP));
-         if(ulBwp->pusch_Config)
-         {
-            macSrvCellCfg->initUlBwp.puschPresent = true;
-            extractPuschCfg(ulBwp->pusch_Config, &macSrvCellCfg->initUlBwp.puschCfg);
-         }
-         if(ulBwp->pucch_Config)
+         switch(cuMacCellGrpDrxConfig->present)
          {
-            macSrvCellCfg->initUlBwp.pucchPresent = true;
-            memset(&macSrvCellCfg->initUlBwp.pucchCfg, 0, sizeof(PucchCfg));
-            if(storedSrvCellCfg)
-            {
-               if(!storedSrvCellCfg->initUlBwp.pucchPresent)
-                  extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg, NULL);
-               else
-                  extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg,\
-                  &storedSrvCellCfg->initUlBwp.pucchCfg);
-            }
-            else
-            {
-               extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg, NULL);
-            }
+            case MAC_CellGroupConfig__drx_ConfigRrc_PR_NOTHING:
+               break;
+
+            case MAC_CellGroupConfig__drx_ConfigRrc_PR_setup:
+               {
+                  cuDrxConfig = cuMacCellGrpDrxConfig->choice.setup;
+                  if(cuDrxConfig)
+                  {
+                     switch(cuDrxConfig->drx_onDurationTimer.present)
+                     {
+                        case DRX_ConfigRrc__drx_onDurationTimer_PR_NOTHING:
+                           break;
+                        case DRX_ConfigRrc__drx_onDurationTimer_PR_milliSeconds:
+                           {
+                              drxCfg->drxOnDurationTimer.onDurationTimerValInMs = true;
+                              drxCfg->drxOnDurationTimer.onDurationtimerValue.milliSeconds=convertOnDurationTimerMilliSecondsEnumToValue(cuDrxConfig->\
+                              drx_onDurationTimer.choice.milliSeconds);
+                              break;
+                           }
+                        case DRX_ConfigRrc__drx_onDurationTimer_PR_subMilliSeconds:
+                           {
+                              drxCfg->drxOnDurationTimer.onDurationTimerValInMs = false;
+                              drxCfg->drxOnDurationTimer.onDurationtimerValue.subMilliSeconds = cuDrxConfig->drx_onDurationTimer.choice.subMilliSeconds;
+                              break;
+                           }
+                     }
+                  }
+                  fillLongCycleOffsetValueInUeDb(&drxCfg->drxLongCycleStartOffset, &cuDrxConfig->drx_LongCycleStartOffset);
+                  drxCfg->drxInactivityTimer = convertDrxInactivityTimerEnumToValue(cuDrxConfig->drx_InactivityTimer);
+                  drxCfg->drxHarqRttTimerDl = cuDrxConfig->drx_HARQ_RTT_TimerDL;
+                  drxCfg->drxHarqRttTimerUl = cuDrxConfig->drx_HARQ_RTT_TimerUL;
+                  drxCfg->drxRetransmissionTimerDl = convertDrxRetransmissionTimerDlEnumToValue(cuDrxConfig->drx_RetransmissionTimerDL);
+                  drxCfg->drxRetransmissionTimerUl = convertDrxRetransmissionTimerUlEnumToValue(cuDrxConfig->drx_RetransmissionTimerUL);
+                  drxCfg->drxSlotOffset = cuDrxConfig->drx_SlotOffset;
+                  if(cuDrxConfig->shortDRX)
+                  {
+                     drxCfg->shortDrxPres=true;
+                     drxCfg->shortDrx.drxShortCycle = convertShortDrxCycleLengthEnumToValue(cuDrxConfig->shortDRX->drx_ShortCycle);
+                     drxCfg->shortDrx.drxShortCycleTimer = cuDrxConfig->shortDRX->drx_ShortCycleTimer;
+                  }
+                  else
+                     drxCfg->shortDrxPres=false;
+
+                  break;
+               }
+
+            case MAC_CellGroupConfig__drx_ConfigRrc_PR_release:
+               break;
          }
       }
-      if(cuSrvCellCfg->uplinkConfig->firstActiveUplinkBWP_Id)
-         macSrvCellCfg->firstActvUlBwpId = *(cuSrvCellCfg->uplinkConfig->firstActiveUplinkBWP_Id);
    }
-   return ret;
 }
+#endif
+
 /*******************************************************************
  *
  * @brief Fills Reconfig Cell group Info received by CU
  *
  * @details
  *
- *    Function : extractUeReCfgCellInfo
+ *    Function : extractUeRecfgCellInfo
  *
  *    Functionality: Fills Reconfig Cell group Info received by CU
  *   
  * @params[in] CellGroupConfigRrc_t *cellGrp = CellGroupConfigRrc_t information which
  *                       is send by CU, which we have stored in F1UeContextSetupDb
- *             MacUeCfg *MacUeCfg = Used to Store the information,
+ *             DuMacUeCfg *MacUeCfg = Used to Store the information,
  *                      which needs to send in other layer, as well as this can be
  *                      the variable which stores the information in DuCb,
- *             MacUeCfg *storedMacUeCfg = Null in case of sending the
+ *             DuMacUeCfg *storedMacUeCfg = Null in case of sending the
  *                      information to other layer else it will have copyOfmacUeCfg
  *                      which we have stored in F1UeContextSetupDb.
  *
  * @return ROK/RFAILED
  *
  * ****************************************************************/
-uint8_t extractUeReCfgCellInfo(CellGroupConfigRrc_t *cellGrp, MacUeCfg *macUeCfg, MacUeCfg *storedMacUeCfg)
+uint8_t extractUeRecfgCellInfo(CellGroupConfigRrc_t *cellGrp, DuMacUeCfg *macUeCfg, DuMacUeCfg *storedMacUeCfg)
 {
    uint8_t ret = ROK;
    MAC_CellGroupConfig_t     *macCellGroup = NULLP;
@@ -10677,6 +12247,28 @@ uint8_t extractUeReCfgCellInfo(CellGroupConfigRrc_t *cellGrp, MacUeCfg *macUeCfg
       {
          macUeCfg->macCellGrpCfgPres = true;
          macCellGroup = ((MAC_CellGroupConfig_t *)(cellGrp->mac_CellGroupConfig));
+
+#ifdef NR_DRX         
+         if(macCellGroup->drx_ConfigRrc)
+         {
+            if(storedMacUeCfg)
+            {
+               if(!storedMacUeCfg->macCellGrpCfgPres) 
+               {
+                  extractDrxConfiguration(macCellGroup->drx_ConfigRrc, &macUeCfg->macCellGrpCfg.drxCfg,NULL);    
+               }
+               else
+               {
+                  extractDrxConfiguration(macCellGroup->drx_ConfigRrc, &macUeCfg->macCellGrpCfg.drxCfg, &storedMacUeCfg->macCellGrpCfg.drxCfg);    
+               }
+            }
+            else
+            {
+               extractDrxConfiguration(macCellGroup->drx_ConfigRrc, &macUeCfg->macCellGrpCfg.drxCfg,NULL); 
+            }
+         }
+#endif
+
          if(macCellGroup->schedulingRequestConfig)
          {
             extractSchReqReConfig(macCellGroup->schedulingRequestConfig, &macUeCfg->macCellGrpCfg.schReqCfg);
@@ -11131,14 +12723,14 @@ void freeAperDecodeDRBSetup(DRBs_ToBeSetup_List_t *drbSet)
  *
  * @details
  *
- *    Function : procUeReCfgCellInfo
+ *    Function : procUeRecfgCellInfo
  *
  *    Functionality: builds Mac Cell Cfg
  *
- * @params[in] MacUeCfg *macUeCfgToSend = Used to Store the information which
+ * @params[in] DuMacUeCfg *macUeCfgToSend = Used to Store the information which
  *                       needs to send in other layer, as well as this can be
  *                       the variable which stores the information in DuCb.
- *             MacUeCfg *storedMacUeCfg = Null in case of sending the
+ *             DuMacUeCfg *storedMacUeCfg = Null in case of sending the
  *                       information to other layer else it will have copyOfmacUeCfg  
  *                       which we have stored in F1UeContextSetupDb
  *             void *cellInfo = CellGroupConfigRrc_t information which is send
@@ -11147,7 +12739,7 @@ void freeAperDecodeDRBSetup(DRBs_ToBeSetup_List_t *drbSet)
  * @return void 
  *
  * ****************************************************************/
-uint8_t procUeReCfgCellInfo(MacUeCfg *macUeCfgToSend, MacUeCfg *storedMacUeCfg, void *cellInfo)
+uint8_t procUeRecfgCellInfo(DuMacUeCfg *macUeCfgToSend, DuMacUeCfg *storedMacUeCfg, void *cellInfo)
 {
    uint8_t ret = ROK;
    CellGroupConfigRrc_t *cellGrp = NULLP;
@@ -11155,13 +12747,13 @@ uint8_t procUeReCfgCellInfo(MacUeCfg *macUeCfgToSend, MacUeCfg *storedMacUeCfg,
    if(cellInfo)
    {
       cellGrp = (CellGroupConfigRrc_t *)cellInfo;
-      ret = extractUeReCfgCellInfo(cellGrp, macUeCfgToSend, storedMacUeCfg);
+      ret = extractUeRecfgCellInfo(cellGrp, macUeCfgToSend, storedMacUeCfg);
       if(ret == RFAILED)
-         DU_LOG("\nERROR  -->  F1AP : Failed at procUeReCfgCellInfo()");
+         DU_LOG("\nERROR  -->  F1AP : Failed at procUeRecfgCellInfo()");
    }
    if(ret == RFAILED)
    {
-      freeUeReCfgCellGrpInfo(macUeCfgToSend);
+      freeUeRecfgCellGrpInfo(macUeCfgToSend);
    }
    return ret;
 }
@@ -11183,7 +12775,7 @@ uint8_t procUeReCfgCellInfo(MacUeCfg *macUeCfgToSend, MacUeCfg *storedMacUeCfg,
  *         RFAILED - failure
  *
  * ****************************************************************/
-void duFillModulationDetails(MacUeCfg *ueCfg, MacUeCfg *oldUeCfg, void *ueCap)
+void duFillModulationDetails(DuMacUeCfg *ueCfg, DuMacUeCfg *oldUeCfg, void *ueCap)
 {
    UE_NR_Capability_t *ueNrCap=NULLP;
 
@@ -11327,7 +12919,7 @@ uint8_t extractCuToDuRrcInfoExt(ProtocolExtensionContainer_4624P16_t *protocolIe
                   if(cellGrpCfg)
                   {
                      memset(cellGrpCfg, 0, sizeof(CellGroupConfigRrc_t));
-                     rval = aper_decode(0, &asn_DEF_CellGroupConfigRrc, (void **)&cellGrpCfg,
+                     rval = uper_decode(0, &asn_DEF_CellGroupConfigRrc, (void **)&cellGrpCfg,
                            extIeInfo->extensionValue.choice.CellGroupConfig.buf, recvBufLen, 0, 0);
                      if(rval.code == RC_FAIL || rval.code == RC_WMORE)
                      {
@@ -11369,19 +12961,19 @@ uint8_t extractCuToDuRrcInfoExt(ProtocolExtensionContainer_4624P16_t *protocolIe
  *    Functionality: Fills Srb List received  by CU
  *
  * @params[in] SRBs_ToBeSetup_Item_t *cuSrbItem
- *             LcCfg pointer
+ *             DuLcCfg pointer
  *             RlcBearerCfg pointer
  * @return void
  *
  * ****************************************************************/
-uint8_t procSrbListToSetup(SRBs_ToBeSetup_Item_t * srbItem, LcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd)
+uint8_t procSrbListToSetup(SRBs_ToBeSetup_Item_t * srbItem, DuLcCfg *duMacLcToAdd, DuRlcBearerCfg *rlcLcToAdd)
 {
 
    /* Filling RLC INFO */
    procRlcLcCfg(srbItem->sRBID, srbItem->sRBID, RB_TYPE_SRB, RLC_AM, CONFIG_ADD, NULL, rlcLcToAdd, NULL);
 
    /* Filling MAC INFO */
-   if(procMacLcCfg(srbItem->sRBID, RB_TYPE_SRB, CONFIG_ADD, NULL,NULL, NULL, NULL, macLcToAdd, NULL)  != ROK)
+   if(procMacLcCfg(srbItem->sRBID, RB_TYPE_SRB, CONFIG_ADD, NULL,NULL, NULL, NULL, duMacLcToAdd, NULL)  != ROK)
    { 
       DU_LOG("\nERROR  -->  F1AP : Failed at MAC LC Cfg in procSrbListToSetup()");
       return RFAILED;
@@ -11413,8 +13005,8 @@ uint8_t extractSrbListToSetup(SRBs_ToBeSetup_List_t *srbCfg, DuUeCfg *ueCfgDb)
 {
    uint8_t ret = ROK, srbIdx = 0, rlcLcIdx = 0;
    SRBs_ToBeSetup_Item_t *srbItem = NULLP;
-   LcCfg *macLcCtxt = NULLP;
-   RlcBearerCfg *rlcLcCtxt = NULLP;
+   DuLcCfg *macLcCtxt = NULLP;
+   DuRlcBearerCfg *rlcLcCtxt = NULLP;
 
    if(srbCfg)
    {
@@ -11439,7 +13031,7 @@ uint8_t extractSrbListToSetup(SRBs_ToBeSetup_List_t *srbCfg, DuUeCfg *ueCfgDb)
 
          for(rlcLcIdx = 0; rlcLcIdx < ueCfgDb->numMacLcs; rlcLcIdx++)
          {
-            if(ueCfgDb->rlcLcCfg[rlcLcIdx].rbId == srbItem->sRBID && ueCfgDb->rlcLcCfg[rlcLcIdx].rbType == RB_TYPE_SRB)
+            if(ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbId == srbItem->sRBID && ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbType == RB_TYPE_SRB)
             {
                macLcCtxt = &ueCfgDb->macLcCfg[rlcLcIdx];
                rlcLcCtxt = &ueCfgDb->rlcLcCfg[rlcLcIdx];
@@ -11448,13 +13040,13 @@ uint8_t extractSrbListToSetup(SRBs_ToBeSetup_List_t *srbCfg, DuUeCfg *ueCfgDb)
          }
          if(!macLcCtxt)
          {
-            memset(&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], 0, sizeof(LcCfg));
+            memset(&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], 0, sizeof(DuLcCfg));
             macLcCtxt = &ueCfgDb->macLcCfg[ueCfgDb->numMacLcs];
             ueCfgDb->numMacLcs++;
          }
          if(!rlcLcCtxt)
          {
-            memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(RlcBearerCfg));
+            memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(DuRlcBearerCfg));
             rlcLcCtxt = &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs];
             ueCfgDb->numRlcLcs++;
          }
@@ -11488,14 +13080,14 @@ uint8_t extractSrbListToSetup(SRBs_ToBeSetup_List_t *srbCfg, DuUeCfg *ueCfgDb)
  *                   for both MAC and RLC
  *
  * @params[in] DRBs_ToBeSetup_Item_t , DRBs_ToBeSetupMod_Item_t,
- *             DRBs_ToBeModified_Item_t , lcId, LcCfg pointer,
- *             RlcBearerCfg , UpTnlCfg, RlcUeCfg
+ *             DRBs_ToBeModified_Item_t , lcId, DuLcCfg pointer,
+ *             RlcBearerCfg , UpTnlCfg, DuRlcUeCfg
  * @return void
  *
  * ****************************************************************/
 
 uint8_t procDrbListToSetupMod(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbItem,\
-DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem, LcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd, UpTnlCfg *upTnlInfo, RlcUeCfg *storedRlcUeCfg)
+DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem, DuLcCfg *macLcToAdd, DuRlcBearerCfg *rlcLcToAdd, UpTnlCfg *upTnlInfo, DuRlcUeCfg *storedRlcUeCfg)
 {
    uint8_t cfgIdx = 0;
    RlcMode rlcModeInfo;
@@ -11532,9 +13124,9 @@ DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem,
       {
          for(cfgIdx = 0; cfgIdx < storedRlcUeCfg->numLcs; cfgIdx++)
          {
-            if(storedRlcUeCfg->rlcLcCfg[cfgIdx].lcId == lcId)
+            if(storedRlcUeCfg->rlcLcCfg[cfgIdx].rlcBearerCfg.lcId == lcId)
             {
-               rlcModeInfo = storedRlcUeCfg->rlcLcCfg[cfgIdx].rlcMode;
+               rlcModeInfo = storedRlcUeCfg->rlcLcCfg[cfgIdx].rlcBearerCfg.rlcMode;
                break;
             }
          }
@@ -11568,7 +13160,7 @@ DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem,
  * ****************************************************************/
 
 uint8_t extractDrbListToSetupMod(DRBs_ToBeSetup_List_t *drbCfg, DRBs_ToBeSetupMod_List_t *drbSetupModCfg,\
- DRBs_ToBeModified_List_t *drbModCfg, uint8_t drbCount, DuUeCfg *ueCfgDb, uint32_t *drbBitMap, RlcUeCfg *rlcUeCfg)
+ DRBs_ToBeModified_List_t *drbModCfg, uint8_t drbCount, DuUeCfg *ueCfgDb, uint32_t *drbBitMap, DuRlcUeCfg *rlcUeCfg)
 {
    uint8_t ret = ROK;
    uint8_t drbIdx = 0, rlcLcIdx = 0;
@@ -11576,8 +13168,8 @@ uint8_t extractDrbListToSetupMod(DRBs_ToBeSetup_List_t *drbCfg, DRBs_ToBeSetupMo
    DRBs_ToBeSetup_Item_t *drbItem = NULLP;
    DRBs_ToBeSetupMod_ItemIEs_t *drbSetupModItem = NULLP;
    DRBs_ToBeModified_ItemIEs_t *drbModItem = NULLP;
-   LcCfg *macLcCtxt = NULLP;
-   RlcBearerCfg *rlcLcCtxt = NULLP;
+   DuLcCfg *macLcCtxt = NULLP;
+   DuRlcBearerCfg *rlcLcCtxt = NULLP;
 
    ret = ROK;
    if(drbCount > 0)
@@ -11615,7 +13207,8 @@ uint8_t extractDrbListToSetupMod(DRBs_ToBeSetup_List_t *drbCfg, DRBs_ToBeSetupMo
 
          for(rlcLcIdx = 0; rlcLcIdx < ueCfgDb->numRlcLcs; rlcLcIdx++)
          {
-            if(ueCfgDb->rlcLcCfg[rlcLcIdx].rbId == drbId && ueCfgDb->rlcLcCfg[rlcLcIdx].rbType == RB_TYPE_DRB)
+            if(ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbId == drbId && \
+                   ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbType == RB_TYPE_DRB)
             {
                macLcCtxt = &ueCfgDb->macLcCfg[rlcLcIdx];
                rlcLcCtxt = &ueCfgDb->rlcLcCfg[rlcLcIdx];
@@ -11624,7 +13217,7 @@ uint8_t extractDrbListToSetupMod(DRBs_ToBeSetup_List_t *drbCfg, DRBs_ToBeSetupMo
          }
          if(!macLcCtxt)
          {
-            memset(&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], 0, sizeof(LcCfg));
+            memset(&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], 0, sizeof(DuLcCfg));
             macLcCtxt = &ueCfgDb->macLcCfg[ueCfgDb->numMacLcs];
             ueCfgDb->numMacLcs++;
          }
@@ -11650,6 +13243,7 @@ uint8_t extractDrbListToSetupMod(DRBs_ToBeSetup_List_t *drbCfg, DRBs_ToBeSetupMo
                DU_LOG("\nERROR  --> F1AP : Failed at extractDrbListToSetupMod() for Modified List");
                break;
             }
+            ueCfgDb->numDrbModified++;
          }
          else
          {
@@ -11699,6 +13293,120 @@ uint8_t extractDrbListToSetupMod(DRBs_ToBeSetup_List_t *drbCfg, DRBs_ToBeSetupMo
    return ret;
 }
 
+/*******************************************************************
+ *
+ * @brief extract Drb List received from CU
+ *
+ * @details
+ *
+ *    Function : extractDrbListToRelease
+ *
+ *    Functionality: extract Drb List received from CU
+ *                   for both MAC and RLC
+ *
+ * @params[in] DRBs_ToBeReleased_Item_t pointer
+ *             DuUeCfg pointer
+ * @return ROK/RFAIED
+ *
+ * ****************************************************************/
+
+uint8_t extractDrbListToRelease(uint8_t ueId, DRBs_ToBeReleased_List_t *drbToRel, uint8_t drbCount, DuUeCfg *ueCfgDb, DuRlcUeCfg *rlcUeCfg)
+{
+   uint8_t ret = ROK, teIdx = 0;
+   uint8_t drbIdx = 0, rlcLcIdx = 0;
+   uint8_t drbId = 0, lcId = 0;
+   DRBs_ToBeReleased_ItemIEs_t *drbRelItem = NULLP;
+   DuLcCfg *macLcCtxt = NULLP;
+   DuRlcBearerCfg *rlcLcCtxt = NULLP;
+
+   ret = ROK;
+   if(drbCount > 0)
+   {
+      for(drbIdx = 0; drbIdx < drbCount; drbIdx++)
+      {
+         macLcCtxt = NULL;
+         rlcLcCtxt = NULL;
+
+         if(drbToRel != NULLP)
+         {
+            drbRelItem = (DRBs_ToBeReleased_ItemIEs_t *) drbToRel->list.array[drbIdx];
+            drbId = drbRelItem->value.choice.DRBs_ToBeReleased_Item.dRBID;
+         }
+         else
+         {
+            DU_LOG("ERROR  --> DU APP : DrbToRelease pointer is NULL in extractDrbListToRelease");
+            return RFAILED;
+         }
+
+         for(rlcLcIdx = 0; rlcLcIdx < ueCfgDb->numRlcLcs; rlcLcIdx++)
+         {
+            if(ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbId == drbId && ueCfgDb->rlcLcCfg[rlcLcIdx].rlcBearerCfg.rbType == RB_TYPE_DRB)
+            {
+               macLcCtxt = &ueCfgDb->macLcCfg[rlcLcIdx];
+               rlcLcCtxt = &ueCfgDb->rlcLcCfg[rlcLcIdx];
+               break;
+            }
+         }
+
+         if(!macLcCtxt)
+         {
+            memset(&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], 0, sizeof(DuLcCfg));
+            macLcCtxt = &ueCfgDb->macLcCfg[ueCfgDb->numMacLcs];
+            ueCfgDb->numMacLcs++;
+         }
+         if(!rlcLcCtxt)
+         {
+            memset(&ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], 0, sizeof(DuRlcBearerCfg));
+            rlcLcCtxt = &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs];
+            ueCfgDb->numRlcLcs++;
+         }
+         lcId = fetchLcId(drbId);
+         if(lcId < MIN_DRB_LCID)
+         {
+            DU_LOG("\nERROR  --> F1AP : Failed fetching LCID %d in extractDrbListToRelease() for Modified List", lcId);
+            break;
+         } 
+
+         /* Filling RLC INFO */
+         procRlcLcCfg(drbId, lcId, RB_TYPE_DRB, rlcLcCtxt->rlcBearerCfg.rlcMode, CONFIG_DEL, NULL, rlcLcCtxt, NULLP);
+         /* Filling MAC INFO */
+         if(procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_DEL, NULL, NULL, NULL, NULL, macLcCtxt, NULLP) != ROK)
+         { 
+            DU_LOG("\nERROR  --> F1AP : Failed at RLC LC Cfg in extractDrbListToRelease()");
+            return RFAILED;
+         }
+         ueCfgDb->upTnlInfo[ueCfgDb->numDrb].configType = CONFIG_DEL;
+         ueCfgDb->upTnlInfo[ueCfgDb->numDrb].drbId = drbId;
+         ueCfgDb->upTnlInfo[ueCfgDb->numDrb].ueId = ueId;
+
+         for(teIdx = 0; teIdx < duCb.numTeId; teIdx++)
+         {
+            if((duCb.upTnlCfg[teIdx]->ueId == ueCfgDb->upTnlInfo[ueCfgDb->numDrb].ueId) && \
+                  (duCb.upTnlCfg[teIdx]->drbId == ueCfgDb->upTnlInfo[ueCfgDb->numDrb].drbId))
+            {
+               DU_ALLOC(ueCfgDb->upTnlInfo[ueCfgDb->numDrb].tnlCfg1, sizeof(GtpTnlCfg)); 
+               memcpy(ueCfgDb->upTnlInfo[ueCfgDb->numDrb].tnlCfg1, duCb.upTnlCfg[teIdx]->tnlCfg1, sizeof(GtpTnlCfg));
+               break;
+            }
+         }
+
+         ueCfgDb->numDrb++;
+         if(ret == RFAILED)
+         {
+            DU_LOG("\nERROR  --> F1AP : Failed at extractDrbListToRelease() for Modified List");
+            break;
+         }
+
+         DU_LOG("\nDEBUG --> DUAPP: extractDrbListToRelease():lcId:%x, [RLC,MAC,NumDrb]:[%x,%x,%x]",\
+               lcId,ueCfgDb->numRlcLcs, ueCfgDb->numMacLcs,  ueCfgDb->numDrb);
+      }
+   }
+   else
+      ret = RFAILED;
+
+   return ret;
+}
+
 /*******************************************************************
  *
  * @brief Function to extract Dl RRC Msg received from CU
@@ -11772,7 +13480,7 @@ UE_NR_Capability_t *extractUeCapability(UE_CapabilityRAT_ContainerList_t *ueCapa
    }
    memset(ueCapRatContList, 0, sizeof(UE_CapabilityRAT_ContainerListRRC_t));
    memset(&rval, 0, sizeof(asn_dec_rval_t));
-   rval = aper_decode(0, &asn_DEF_UE_CapabilityRAT_ContainerListRRC, (void **)&ueCapRatContList,
+   rval = uper_decode(0, &asn_DEF_UE_CapabilityRAT_ContainerListRRC, (void **)&ueCapRatContList,
           ueCapablityListBuf->buf, recvBufLen, 0, 0);
    if(rval.code == RC_FAIL || rval.code == RC_WMORE)
    {
@@ -11798,7 +13506,7 @@ UE_NR_Capability_t *extractUeCapability(UE_CapabilityRAT_ContainerList_t *ueCapa
           } 
           memset(ueNrCap, 0, sizeof(UE_NR_Capability_t));
           memset(&rval, 0, sizeof(asn_dec_rval_t));
-          rval = aper_decode(0, &asn_DEF_UE_NR_Capability, (void **)&ueNrCap,
+          rval = uper_decode(0, &asn_DEF_UE_NR_Capability, (void **)&ueNrCap,
                  ueCapRatContList->list.array[idx]->ue_CapabilityRAT_Container.buf, recvBufLen, 0, 0);
           if(rval.code == RC_FAIL || rval.code == RC_WMORE)
           {
@@ -11842,62 +13550,72 @@ void freeAperDecodeF1UeContextSetupReq(UEContextSetupRequest_t   *ueSetReq)
    {
       for(ieIdx = 0; ieIdx < ueSetReq->protocolIEs.list.count; ieIdx++)
       {
-        if(ueSetReq->protocolIEs.list.array[ieIdx])
-        {
-           switch(ueSetReq->protocolIEs.list.array[ieIdx]->id)
-           {
-              case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
-                 break;
-              case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
-                 break;
-              case ProtocolIE_ID_id_SpCell_ID:
-                 freeAperDecodeNrcgi(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.NRCGI);
-                 break;
-              case ProtocolIE_ID_id_ServCellIndex:
-                 break;
-              case ProtocolIE_ID_id_SpCellULConfigured:
-                 break;
-              case ProtocolIE_ID_id_CUtoDURRCInformation:
+         if(ueSetReq->protocolIEs.list.array[ieIdx])
+         {
+            switch(ueSetReq->protocolIEs.list.array[ieIdx]->id)
+            {
+               case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
+                  break;
+               case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
+                  break;
+               case ProtocolIE_ID_id_SpCell_ID:
+                  freeAperDecodeNrcgi(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.NRCGI);
+                  break;
+               case ProtocolIE_ID_id_ServCellIndex:
+                  break;
+               case ProtocolIE_ID_id_SpCellULConfigured:
+                  break;
+               case ProtocolIE_ID_id_CUtoDURRCInformation:
 
-                 freeAperDecodeCuToDuInfo(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.CUtoDURRCInformation);
-                 break;
-              case ProtocolIE_ID_id_SCell_ToBeSetup_List:
+                  freeAperDecodeCuToDuInfo(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.CUtoDURRCInformation);
+                  break;
+               case ProtocolIE_ID_id_SCell_ToBeSetup_List:
 
-                 freeAperDecodeSplCellList(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.SCell_ToBeSetup_List);
-                 break;
-              case ProtocolIE_ID_id_SRBs_ToBeSetup_List:
+                  freeAperDecodeSplCellList(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.SCell_ToBeSetup_List);
+                  break;
+               case ProtocolIE_ID_id_SRBs_ToBeSetup_List:
 
-                 freeAperDecodeSRBSetup(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.SRBs_ToBeSetup_List);
-                 break;
-              case ProtocolIE_ID_id_DRBs_ToBeSetup_List:
+                  freeAperDecodeSRBSetup(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.SRBs_ToBeSetup_List);
+                  break;
+               case ProtocolIE_ID_id_DRBs_ToBeSetup_List:
 
-                 freeAperDecodeDRBSetup(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRBs_ToBeSetup_List);
-                 break;
-              case ProtocolIE_ID_id_RRCContainer:
-                 {
+                  freeAperDecodeDRBSetup(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRBs_ToBeSetup_List);
+                  break;
+               case ProtocolIE_ID_id_RRCContainer:
+                  {
 
-                    if(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf != NULLP)
-                    {
+                     if(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf != NULLP)
+                     {
 
-                       free(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf);
-                    }
-                    break;
-                 }
-              case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
-                 break;
-              case ProtocolIE_ID_id_GNB_DU_UE_AMBR_UL:
-                 {
-                    if(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.buf)
-                    {
-                       free(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.buf);
-                    }
-                    break;
-                 }
-              default:
-                 DU_LOG("\nERROR  -->  F1AP: Invalid event type %ld " ,ueSetReq->protocolIEs.list.array[ieIdx]->id);
-           } 
-           free(ueSetReq->protocolIEs.list.array[ieIdx]);
-        }
+                        free(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf);
+                     }
+                     break;
+                  }
+               case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
+                  break;
+               case ProtocolIE_ID_id_GNB_DU_UE_AMBR_UL:
+                  {
+                     if(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.buf)
+                     {
+                        free(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.buf);
+                     }
+                     break;
+                  }
+#ifdef NR_DRX
+               case ProtocolIE_ID_id_DRXCycle:
+                  {
+                     if(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRXCycle.shortDRXCycleLength)
+                        free(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRXCycle.shortDRXCycleLength);
+                     if(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRXCycle.shortDRXCycleTimer)
+                        free(ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRXCycle.shortDRXCycleTimer);
+                     break;
+                  }
+#endif             
+                default:
+                  DU_LOG("\nERROR  -->  F1AP: Invalid event type %ld " ,ueSetReq->protocolIEs.list.array[ieIdx]->id);
+            } 
+            free(ueSetReq->protocolIEs.list.array[ieIdx]);
+         }
       }
       free(ueSetReq->protocolIEs.list.array);
    }
@@ -11920,15 +13638,19 @@ void freeAperDecodeF1UeContextSetupReq(UEContextSetupRequest_t   *ueSetReq)
 uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
 {
    int8_t ueIdx = -1;
-   uint8_t  ret=0, ieIdx=0, ieExtIdx = 0, servCellIdx = 0;
+   uint8_t  ret=0, ieIdx=0, ieExtIdx = 0;
+   //uint8_t servCellIdx = 0;
    bool ueCbFound = false, hoInProgress = false;
-   uint16_t nrCellId = 0,  cellIdx=0;
+   uint16_t cellIdx=0;
+   uint64_t nrCellId = 0;
    uint32_t gnbCuUeF1apId=0, gnbDuUeF1apId=0, bitRateSize=0;
    DuUeCb   *duUeCb = NULL;
    UEContextSetupRequest_t   *ueSetReq = NULL;
    DRBs_ToBeSetup_List_t *drbCfg = NULL;
    CUtoDURRCInformation_t *rrcInfo = NULL;
-
+#ifdef NR_DRX
+   DRXCycle_t *drxCycle;
+#endif
    ret = ROK;
 
    ueSetReq = &f1apMsg->choice.initiatingMessage->value.choice.UEContextSetupRequest;
@@ -11955,7 +13677,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
                GET_CELL_IDX(nrCellId, cellIdx);
                if(!duCb.actvCellLst[cellIdx])
                {
-                  DU_LOG("\nERROR  -->  F1AP : Cell Id [%d] not found", nrCellId);
+                  DU_LOG("\nERROR  -->  F1AP : Cell Id [%lu] not found", nrCellId);
                   ret = RFAILED;
                }
                break;
@@ -11963,7 +13685,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
 
          case ProtocolIE_ID_id_ServCellIndex:
             {
-               servCellIdx = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.ServCellIndex;
+               //servCellIdx = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.ServCellIndex;
                break;
             }
 
@@ -12010,7 +13732,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
                      gnbDuUeF1apId = ueIdx +1;
                   else
                   {
-                     DU_LOG("\nERROR  -->  F1AP : No free UE IDX found in UE bit map of cell Id [%d]", nrCellId);
+                     DU_LOG("\nERROR  -->  F1AP : No free UE IDX found in UE bit map of cell Id [%lu]", nrCellId);
                      ret = RFAILED;
                      break;
                   }
@@ -12064,12 +13786,25 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
                break;
             } 
 
-         case ProtocolIE_ID_id_SCell_ToBeSetup_List:
+#ifdef NR_DRX
+         case ProtocolIE_ID_id_DRXCycle:
             {
-               DU_LOG("\nINFO   -->  DU_APP: Received SCell_ToBeSetup_List but  Not processing the list");
+               duUeCb->f1UeDb->duUeCfg.drxCyclePres = true;
+               drxCycle = &ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRXCycle;
+               duUeCb->f1UeDb->duUeCfg.drxCycle.drxLongCycleLength =  convertLongDrxCycleLengthEnumToValue(drxCycle->longDRXCycleLength);
+               if(drxCycle->shortDRXCycleLength)
+               {
+                  duUeCb->f1UeDb->duUeCfg.drxCycle.shortDrxCyclePres = true;
+                  duUeCb->f1UeDb->duUeCfg.drxCycle.shortDrxCycle.drxShortCycle = \
+                  convertShortDrxCycleLengthEnumToValue(*(drxCycle->shortDRXCycleLength));
+               }
+               if(drxCycle->shortDRXCycleTimer)
+                  duUeCb->f1UeDb->duUeCfg.drxCycle.shortDrxCycle.drxShortCycleTimer = *(drxCycle->shortDRXCycleTimer);   
+
                break;
             }
 
+#endif
          case ProtocolIE_ID_id_SRBs_ToBeSetup_List:
             {
                if(extractSrbListToSetup(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.SRBs_ToBeSetup_List,\
@@ -12094,7 +13829,6 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
                }
                break;
             }
-
          case ProtocolIE_ID_id_RRCContainer:
             {
                /* Filling Dl RRC Msg Info */
@@ -12116,13 +13850,16 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
 
          case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
             {
-               if(duUeCb->f1UeDb->dlRrcMsg->rrcMsgPdu)
-               {
-                  duUeCb->f1UeDb->dlRrcMsg->deliveryStatRpt = true;
-               }
-               else
+               if(duUeCb->f1UeDb->dlRrcMsg)
                {
-                  DU_LOG("\nERROR  -->  Ignoring delivery report, since rrcContainer is not present");
+                  if(duUeCb->f1UeDb->dlRrcMsg->rrcMsgPdu)
+                  {
+                     duUeCb->f1UeDb->dlRrcMsg->deliveryStatRpt = true;
+                  }
+                  else
+                  {
+                     DU_LOG("\nERROR  -->  Ignoring delivery report, since rrcContainer is not present");
+                  }
                }
                break;
             }
@@ -12259,50 +13996,52 @@ void FreeUeContextSetupRsp(F1AP_PDU_t *f1apMsg)
    {
       if(f1apMsg->choice.successfulOutcome)
       {
-        ueSetRsp = &f1apMsg->choice.successfulOutcome->value.choice.\
-                   UEContextSetupResponse;
-        if(ueSetRsp->protocolIEs.list.array)
-        {
-           for(idx = 0; idx < ueSetRsp->protocolIEs.list.count; idx++)
-           {
-              if(ueSetRsp->protocolIEs.list.array[idx])
-              {
-                 switch(ueSetRsp->protocolIEs.list.array[idx]->id)
-                 {
-                    case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
-                       break;
-                    case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
-                       break;
-                    case ProtocolIE_ID_id_DUtoCURRCInformation:
-                       {
-                          CellGroupConfig_t *cellGrpCfg = NULLP;
-                          cellGrpCfg  = &ueSetRsp->protocolIEs.list.array[idx]->value.choice.\
-                                        DUtoCURRCInformation.cellGroupConfig;
-                          if(cellGrpCfg->buf != NULLP)
-                          {
-                             DU_FREE(cellGrpCfg->buf, cellGrpCfg->size);
-                             cellGrpCfg = NULLP;
-                          }
-                          break;
-                       }
-                    case ProtocolIE_ID_id_DRBs_Setup_List:
-                       {
+         ueSetRsp = &f1apMsg->choice.successfulOutcome->value.choice.\
+                    UEContextSetupResponse;
+         if(ueSetRsp->protocolIEs.list.array)
+         {
+            for(idx = 0; idx < ueSetRsp->protocolIEs.list.count; idx++)
+            {
+               if(ueSetRsp->protocolIEs.list.array[idx])
+               {
+                  switch(ueSetRsp->protocolIEs.list.array[idx]->id)
+                  {
+                     case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
+                        break;
+                     case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
+                        break;
+                     case ProtocolIE_ID_id_C_RNTI:
+                        break;
+                     case ProtocolIE_ID_id_DUtoCURRCInformation:
+                        {
+                           CellGroupConfig_t *cellGrpCfg = NULLP;
+                           cellGrpCfg  = &ueSetRsp->protocolIEs.list.array[idx]->value.choice.\
+                                         DUtoCURRCInformation.cellGroupConfig;
+                           if(cellGrpCfg->buf != NULLP)
+                           {
+                              DU_FREE(cellGrpCfg->buf, cellGrpCfg->size);
+                              cellGrpCfg = NULLP;
+                           }
+                           break;
+                        }
+                     case ProtocolIE_ID_id_DRBs_Setup_List:
+                        {
                            freeDrbSetupList(&ueSetRsp->protocolIEs.list.array[idx]->value.choice.DRBs_Setup_List); 
                            break;
-                       }
-                    default:
-                       DU_LOG("\nERROR  -->  DUAPP: Invalid Id %ld at FreeUeContextSetupRsp()",\
-                       ueSetRsp->protocolIEs.list.array[idx]->id);
-                       break;
-                 }
-                 DU_FREE(ueSetRsp->protocolIEs.list.array[idx],\
-                       sizeof(UEContextSetupResponseIEs_t));
-              }
-           }
-           DU_FREE(ueSetRsp->protocolIEs.list.array, \
-                 ueSetRsp->protocolIEs.list.size);
-        }
-        DU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
+                        }
+                     default:
+                        DU_LOG("\nERROR  -->  DUAPP: Invalid Id %ld at FreeUeContextSetupRsp()",\
+                              ueSetRsp->protocolIEs.list.array[idx]->id);
+                        break;
+                  }
+                  DU_FREE(ueSetRsp->protocolIEs.list.array[idx],\
+                        sizeof(UEContextSetupResponseIEs_t));
+               }
+            }
+            DU_FREE(ueSetRsp->protocolIEs.list.array, \
+                  ueSetRsp->protocolIEs.list.size);
+         }
+         DU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       }
       DU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
    }
@@ -12332,7 +14071,7 @@ uint8_t EncodeUeCntxtDuToCuInfo(CellGroupConfig_t *duToCuCellGrp, CellGroupConfi
    xer_fprint(stdout, &asn_DEF_CellGroupConfigRrc, duCellGrpCfg);
    memset((uint8_t *)encBuf, 0, ENC_BUF_MAX_LEN);
    encBufSize = 0;
-   encRetVal = aper_encode(&asn_DEF_CellGroupConfigRrc, 0, duCellGrpCfg, PrepFinalEncBuf, encBuf);
+   encRetVal = uper_encode(&asn_DEF_CellGroupConfigRrc, 0, duCellGrpCfg, PrepFinalEncBuf, encBuf);
    /* Encode results */
    if(encRetVal.encoded == ENCODE_FAIL)
    {
@@ -12343,10 +14082,12 @@ uint8_t EncodeUeCntxtDuToCuInfo(CellGroupConfig_t *duToCuCellGrp, CellGroupConfi
    else
    {
       DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for UeCntxtDuToCuInfo\n");
+#ifdef DEBUG_ASN_PRINT
       for(int i=0; i< encBufSize; i++)
       {
         printf("%x",encBuf[i]);
       }
+#endif
    }
    duToCuCellGrp->size = encBufSize;
    DU_ALLOC(duToCuCellGrp->buf, duToCuCellGrp->size);
@@ -12675,10 +14416,12 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t cellId,uint8_t ueId)
       else
       {
          DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for UE Context Setup Response\n");
+#ifdef DEBUG_ASN_PRINT
          for(int i=0; i< encBufSize; i++)
          {
             printf("%x",encBuf[i]);
          }
+#endif
       }
 
       /* Sending  msg  */
@@ -12693,6 +14436,7 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t cellId,uint8_t ueId)
    FreeUeContextSetupRsp(f1apMsg);
    return ret;
 }/* End of BuildAndSendUeContextSetupRsp */
+
 /*******************************************************************
 *
 * @brief  Build And Send Ue Context Rsp 
@@ -12890,10 +14634,12 @@ uint8_t BuildAndSendF1ResetReq()
       else
       {
         DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for F1Reset\n");
+#ifdef DEBUG_ASN_PRINT
         for(idx=0; idx< encBufSize; idx++)
         {
            printf("%x",encBuf[idx]);
         }
+#endif
       }
 
       if(sendF1APMsg() != ROK)
@@ -13043,10 +14789,12 @@ uint8_t BuildAndSendF1ResetAck()
       else
       {
         DU_LOG("\nDUBUG   -->  F1AP : Created APER encoded buffer for F1ResetAck\n");
+#ifdef DEBUG_ASN_PRINT
         for(int i=0; i< encBufSize; i++)
         {
            printf("%x",encBuf[i]);
         }
+#endif
       }
       /* Sending msg */
       if(sendF1APMsg() != ROK)
@@ -13309,10 +15057,12 @@ uint8_t BuildAndSendRrcDeliveryReport(uint32_t gnbCuUeF1apId, \
       else
       {
         DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for RRC Delivery Msg \n");
+#ifdef DEBUG_ASN_PRINT
         for(idx=0; idx< encBufSize; idx++)
         {
            printf("%x",encBuf[idx]);
         }
+#endif
       }
 
       /* Sending msg */
@@ -13350,7 +15100,8 @@ uint8_t BuildAndSendRrcDeliveryReport(uint32_t gnbCuUeF1apId, \
 uint8_t extractCellsToBeActivated(Cells_to_be_Activated_List_t cellsToActivate)
 {
    uint8_t  ret = ROK;
-   uint16_t idx, nci, pci = 0;
+   uint16_t idx, pci = 0;
+   uint64_t nci;
    Cells_to_be_Activated_List_Item_t cell;
 
    for(idx=0; idx<cellsToActivate.list.count; idx++)
@@ -13361,7 +15112,7 @@ uint8_t extractCellsToBeActivated(Cells_to_be_Activated_List_t cellsToActivate)
 
       if(cell.nRPCI)
       {
-        pci = *cell.nRPCI;
+         pci = *cell.nRPCI;
       }
       ret = duProcCellsToBeActivated(cell.nRCGI.pLMN_Identity.buf, nci, pci);
    }
@@ -13540,9 +15291,9 @@ uint8_t procF1SetupRsp(F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf)
            DU_LOG("\nERROR  -->  DU_APP : Invalid IE received in F1SetupRsp:%ld",
                  f1SetRspMsg->protocolIEs.list.array[idx]->id);
       }
-      duProcF1SetupRsp();
    }
    
+   duProcF1SetupRsp();
    freeAperDecodeF1SetupRsp(f1SetRspMsg);
 
    duCb.f1SetupReqAndRspMsg.f1MsgRspBufSize = recvBufLen;
@@ -13553,7 +15304,7 @@ uint8_t procF1SetupRsp(F1AP_PDU_t *f1apMsg, MsgLen recvBufLen, char *recvBuf)
       return RFAILED;
    }
    memcpy(duCb.f1SetupReqAndRspMsg.f1MsgRspBuf, recvBuf, recvBufLen);
-   
+
    if(BuildAndSendE2SetupReq() != ROK)
    {
       DU_LOG("\nERROR  -->  F1AP : Failed to build and send E2 setup request ");
@@ -13615,7 +15366,8 @@ uint8_t duProcGnbDuCfgUpdAckMsg(uint8_t transId)
 {
    uint8_t  ieIdx=0, arrIdx=0,ret=ROK;
    uint8_t  ueId =0 , ueIdx =0, totalActiveUe = 0;
-   uint16_t cellId =0, cellIdx =0, crnti=0;
+   uint16_t cellIdx =0, crnti=0;
+   uint64_t cellId =0;
    CmLList *f1apPduNode = NULLP;
    ReservedF1apPduInfo *f1apPduInfo =NULLP;
    F1AP_PDU_t *f1apMsgPdu = NULLP;
@@ -13671,7 +15423,7 @@ uint8_t duProcGnbDuCfgUpdAckMsg(uint8_t transId)
                            if(ret == RFAILED)
                            {
                               DU_LOG("\nERROR  --> DU_APP : duProcGnbDuCfgUpdAckMsg(): Failed to send cell delete\
-                              request for cellId[%d]", cellId);
+                              request for cellId[%lu]", cellId);
                            }
                         }
                         else
@@ -13692,7 +15444,7 @@ uint8_t duProcGnbDuCfgUpdAckMsg(uint8_t transId)
                               if(ret == RFAILED)
                               {
                                  DU_LOG("\nERROR  --> DU_APP : duProcGnbDuCfgUpdAckMsg(): Failed to build and send UE delete\
-                                 request for cellId[%d]", cellId);
+                                 request for cellId[%lu]", cellId);
                               }
                               ueIdx++;
                               totalActiveUe--;
@@ -13701,7 +15453,7 @@ uint8_t duProcGnbDuCfgUpdAckMsg(uint8_t transId)
                      }
                      else
                      {
-                        DU_LOG("\nERROR  --> DU_APP : duProcGnbDuCfgUpdAckMsg(): CellId [%d] not found", cellId);
+                        DU_LOG("\nERROR  --> DU_APP : duProcGnbDuCfgUpdAckMsg(): CellId [%lu] not found", cellId);
                         ret = RFAILED;
                      }
                      break;
@@ -13884,35 +15636,35 @@ uint8_t procF1DlRrcMsgTrans(F1AP_PDU_t *f1apMsg)
            {
               if(f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.size > 0)
               {
-                 dlMsg.rrcMsgSize = f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.size;
-                 DU_ALLOC_SHRABL_BUF(dlMsg.rrcMsgPdu, dlMsg.rrcMsgSize);
-                 if(dlMsg.rrcMsgPdu)
-                 {
-                    memcpy(dlMsg.rrcMsgPdu, f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.buf,\
-                       dlMsg.rrcMsgSize);
-                 }
-                 else
-                 {
-                    DU_LOG("\nERROR  -->  DU APP : Memory alloc Failed at RRC Container at procF1DlRrcMsgTrans()");
-                     return RFAILED;
-                 }
-              }
-              else
-              {
-                 DU_LOG("\nERROR  -->  DU_APP : RRC Container Size is invalid:%ld",\
-                 f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.size);
-                 return RFAILED;
-              }
-              break;
-           }
-         case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
-           {
-              dlMsg.deliveryStatRpt = true;
-              break;
-           }
-        default:
-           DU_LOG("\nERROR  -->  DU_APP : Invalid IE received in DL RRC Msg Transfer:%ld",
-                 f1DlRrcMsg->protocolIEs.list.array[idx]->id);
+             dlMsg.rrcMsgSize = f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.size;
+             DU_ALLOC_SHRABL_BUF(dlMsg.rrcMsgPdu, dlMsg.rrcMsgSize);
+             if(dlMsg.rrcMsgPdu)
+             {
+                memcpy(dlMsg.rrcMsgPdu, f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.buf,\
+                      dlMsg.rrcMsgSize);
+             }
+             else
+             {
+                DU_LOG("\nERROR  -->  DU APP : Memory alloc Failed at RRC Container at procF1DlRrcMsgTrans()");
+                return RFAILED;
+             }
+          }
+          else
+          {
+             DU_LOG("\nERROR  -->  DU_APP : RRC Container Size is invalid:%ld",\
+                   f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.size);
+             return RFAILED;
+          }
+          break;
+       }
+    case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
+       {
+          dlMsg.deliveryStatRpt = true;
+          break;
+       }
+    default:
+       DU_LOG("\nERROR  -->  DU_APP : Invalid IE received in DL RRC Msg Transfer:%ld",
+             f1DlRrcMsg->protocolIEs.list.array[idx]->id);
       }
    }
 
@@ -13968,8 +15720,8 @@ uint8_t BuildSrbSetupModList(SRBs_SetupMod_List_t *srbList, DuUeCfg *ueCfg)
       srbItemIe->id = ProtocolIE_ID_id_SRBs_SetupMod_Item;
       srbItemIe->criticality = Criticality_reject;
       srbItemIe->value.present = SRBs_SetupMod_ItemIEs__value_PR_SRBs_SetupMod_Item;
-      srbItemIe->value.choice.SRBs_SetupMod_Item.sRBID = ueCfg->rlcLcCfg[srbIdx].rbId;
-      srbItemIe->value.choice.SRBs_SetupMod_Item.lCID = ueCfg->rlcLcCfg[srbIdx].lcId;
+      srbItemIe->value.choice.SRBs_SetupMod_Item.sRBID = ueCfg->rlcLcCfg[srbIdx].rlcBearerCfg.rbId;
+      srbItemIe->value.choice.SRBs_SetupMod_Item.lCID = ueCfg->rlcLcCfg[srbIdx].rlcBearerCfg.lcId;
    }
    return ROK;
 }
@@ -13999,12 +15751,6 @@ uint8_t BuildDrbSetupModList(DRBs_SetupMod_List_t *drbSet , DuUeCfg *ueCfg)
 
    drbCnt = ueCfg->numDrbSetupMod;
 
-   if(!drbCnt)
-   {
-      DU_LOG("\nINFO  -->  F1AP : BuildDrbToBeSetupModList(): No DRB information to avaialble to add");
-      return ROK;
-   }
-
    drbSet->list.count = drbCnt;
    drbSet->list.size = drbCnt * sizeof(DRBs_SetupMod_ItemIEs_t *);
    DU_ALLOC(drbSet->list.array, drbSet->list.size);
@@ -14066,6 +15812,98 @@ void FreeDrbSetupModList(DRBs_SetupMod_List_t *drbSetupList)
    DU_FREE(drbSetupList->list.array, drbSetupList->list.size);
 }
 
+/*******************************************************************
+*
+* @brief Builds the DRB to be Mod list
+*
+* @details
+*
+*    Function : 
+*
+*    Functionality: Constructs the DRB to be Mod list
+*
+* @params[in] DRBs_Modified_List_t *drbModList
+*
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t BuildDrbModList(DRBs_Modified_List_t *drbModList, DuUeCfg *ueCfg)
+{
+   uint8_t arrIdx =0, drbIdx = 0;
+   uint8_t drbCnt =0;
+   struct DRBs_Modified_ItemIEs *drbItemIe;
+
+   drbCnt = ueCfg->numDrbModified;
+
+   drbModList->list.count = drbCnt;
+   drbModList->list.size = drbCnt * sizeof(DRBs_Modified_ItemIEs_t *);
+   DU_ALLOC(drbModList->list.array, drbModList->list.size);
+   if(drbModList->list.array == NULLP)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDrbModList()");
+      return  RFAILED;
+   }
+
+   drbIdx = 0;
+   for(arrIdx = 0; arrIdx < ueCfg->numMacLcs; arrIdx++)
+   {
+      if(ueCfg->macLcCfg[arrIdx].configType == CONFIG_MOD)
+      {
+         DU_ALLOC(drbModList->list.array[drbIdx], sizeof(DRBs_Modified_ItemIEs_t));
+         if(drbModList->list.array[drbIdx] == NULLP)
+         {
+            DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDrbModList");
+            return  RFAILED;
+         }
+
+         drbItemIe = (struct DRBs_Modified_ItemIEs *)drbModList->list.array[drbIdx];
+         drbItemIe->id = ProtocolIE_ID_id_DRBs_Modified_Item;
+         drbItemIe->criticality = Criticality_reject;
+         drbItemIe->value.present = DRBs_Modified_ItemIEs__value_PR_DRBs_Modified_Item;
+         drbItemIe->value.choice.DRBs_Modified_Item.dRBID = ueCfg->upTnlInfo[arrIdx].drbId;
+         if(fillDlTnlSetupList(&drbItemIe->value.choice.DRBs_Modified_Item.dLUPTNLInformation_ToBeSetup_List,\
+                  &ueCfg->upTnlInfo[arrIdx])!= ROK)
+         {
+            DU_LOG("\nERROR  -->  F1AP : Failed to fill DlTnl SetupList in BuildDrbModList");
+            return RFAILED;
+         }
+         drbIdx++;
+      } 
+   }
+
+   return ROK;
+}
+
+/*******************************************************************
+* @brief Free the memory allocated for DRB Mod List
+*
+* @details
+*
+*    Function : FreeDrbModList 
+*
+*    Functionality:
+*       Free the memory allocated for DRB modified list
+*
+* @params[in] DRBs_Modified_List_t *
+* @return void
+*
+* ****************************************************************/
+void FreeDrbModList(DRBs_Modified_List_t *drbModList)
+{
+   uint8_t arrIdx = 0;
+   DRBs_Modified_ItemIEs_t *drbItemIe = NULLP;
+
+   for(arrIdx = 0; arrIdx < drbModList->list.count; arrIdx++)
+   {
+      drbItemIe = ((DRBs_Modified_ItemIEs_t *)drbModList->list.array[arrIdx]);
+      freeDlTnlInfo(&drbItemIe->value.choice.DRBs_Modified_Item.dLUPTNLInformation_ToBeSetup_List);
+      DU_FREE(drbModList->list.array[arrIdx], sizeof(DRBs_Modified_ItemIEs_t));
+   }
+   DU_FREE(drbModList->list.array, drbModList->list.size);
+}
+
 /*******************************************************************
 * @brief Free the memory allocated for SRB setup List
 *
@@ -14131,6 +15969,12 @@ void FreeUeContextModResp(F1AP_PDU_t *f1apMsg)
                             value.choice.DRBs_SetupMod_List));
                             break;
                         }
+                     case ProtocolIE_ID_id_DRBs_Modified_List:
+                        {
+                            FreeDrbModList(&(ueContextModifyRes->protocolIEs.list.array[ieIdx]->\
+                            value.choice.DRBs_Modified_List));
+                            break;
+                        }
                      case ProtocolIE_ID_id_SRBs_SetupMod_List:
                         {
                            FreeSrbSetupModList(&(ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.\
@@ -14177,7 +16021,7 @@ uint8_t BuildAndSendUeContextModRsp(DuUeCb *ueCb)
 
    DU_LOG("\nINFO  -->  F1AP : Building UE context modification response\n");
 
-   while(1)
+   while(true)
    {
       DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
@@ -14202,13 +16046,16 @@ uint8_t BuildAndSendUeContextModRsp(DuUeCb *ueCb)
   
       if(ueCb->f1UeDb->actionType == UE_CTXT_MOD)
       {
+         elementCnt = 2;
          if(ueCb->f1UeDb->duUeCfg.numDrbSetupMod)
-            elementCnt =3;
-         else
-            elementCnt =2;
+            elementCnt++;
+         if(ueCb->f1UeDb->duUeCfg.numDrbModified)
+            elementCnt++; 
       }
       if(ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY)
+      {
          elementCnt = 5;
+      }
       if(ueCb->f1UeDb->actionType == UE_CTXT_RRC_RECFG_COMPLETE)
          elementCnt = 2;
       ueContextModifyRes->protocolIEs.list.count = elementCnt;
@@ -14256,7 +16103,8 @@ uint8_t BuildAndSendUeContextModRsp(DuUeCb *ueCb)
          BuildCellGroupConfigRrc(ueCb, &ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.DUtoCURRCInformation.cellGroupConfig);
       }
 
-      if((ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY) || ((ueCb->f1UeDb->actionType == UE_CTXT_MOD) && (ueCb->f1UeDb->duUeCfg.numDrbSetupMod)))
+      if((ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY) || \
+           ((ueCb->f1UeDb->actionType == UE_CTXT_MOD) && (ueCb->f1UeDb->duUeCfg.numDrbSetupMod)))
       { 
          ieIdx++;
          ueContextModifyRes->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_DRBs_SetupMod_List;
@@ -14282,6 +16130,22 @@ uint8_t BuildAndSendUeContextModRsp(DuUeCb *ueCb)
          }
       }
 
+      if((ueCb->f1UeDb->actionType == UE_CTXT_MOD) && (ueCb->f1UeDb->duUeCfg.numDrbModified))
+      { 
+         ieIdx++;
+         ueContextModifyRes->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_DRBs_Modified_List;
+         ueContextModifyRes->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
+         ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.present =\
+                                                                    UEContextModificationResponseIEs__value_PR_DRBs_Modified_List;
+         ret = BuildDrbModList(&(ueContextModifyRes->protocolIEs.list.array[ieIdx]->\
+                                 value.choice.DRBs_Modified_List) , &ueCb->f1UeDb->duUeCfg);
+         if(ret != ROK)
+         {
+            DU_LOG( "\nERROR  -->  F1AP : Failed to build DRB Modified List ");
+            break;
+         }
+      }
+
       if(ueCb->f1UeDb->actionType == UE_CTXT_CFG_QUERY)
       {
          ieIdx++;
@@ -14289,12 +16153,12 @@ uint8_t BuildAndSendUeContextModRsp(DuUeCb *ueCb)
          ueContextModifyRes->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
          ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.present = \
                                                                             UEContextModificationResponseIEs__value_PR_SRBs_SetupMod_List;
-         for(rbIdx = 0; rbIdx < ueCb->rlcUeCfg.numLcs; rbIdx++)
+         for(rbIdx = 0; rbIdx < ueCb->duRlcUeCfg.numLcs; rbIdx++)
          {
-            if(ueCb->rlcUeCfg.rlcLcCfg[rbIdx].rbType == RB_TYPE_SRB)
+            if(ueCb->duRlcUeCfg.rlcLcCfg[rbIdx].rlcBearerCfg.rbType == RB_TYPE_SRB)
             {
-               memcpy(&ueCb->f1UeDb->duUeCfg.rlcLcCfg[ueCb->f1UeDb->duUeCfg.numRlcLcs++], &ueCb->rlcUeCfg.rlcLcCfg[rbIdx],\
-                     sizeof(RlcBearerCfg));
+               memcpy(&ueCb->f1UeDb->duUeCfg.rlcLcCfg[ueCb->f1UeDb->duUeCfg.numRlcLcs++], &ueCb->duRlcUeCfg.rlcLcCfg[rbIdx],\
+                     sizeof(DuRlcBearerCfg));
             }
          }
          ret = BuildSrbSetupModList(&ueContextModifyRes->protocolIEs.list.array[ieIdx]->value.choice.SRBs_SetupMod_List, \
@@ -14319,7 +16183,7 @@ uint8_t BuildAndSendUeContextModRsp(DuUeCb *ueCb)
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-         DU_LOG( "\nERROR  -->  F1AP : Could not encode UE Context Setup Request structure (at %s)\n",\
+         DU_LOG( "\nERROR  -->  F1AP : Could not encode UE Modification Response structure (at %s)\n",\
                encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
          ret = RFAILED;
          break;
@@ -14327,16 +16191,18 @@ uint8_t BuildAndSendUeContextModRsp(DuUeCb *ueCb)
       else
       {
          DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for UE Context Modification Response\n");
+#ifdef DEBUG_ASN_PRINT
          for(int i=0; i< encBufSize; i++)
          {
             printf("%x",encBuf[i]);
          }
+#endif
       }
 
       /* Sending  msg  */
-      if(sendF1APMsg() != ROK)
+      if(sendF1APMsg() != ROK && (ret == ROK))
       {
-         DU_LOG("\nERROR  -->  F1AP : Sending UE Context Setup Res Failed");
+         DU_LOG("\nERROR  -->  F1AP : Sending UE Modification Res Failed");
          ret = RFAILED;
          break;
       }
@@ -14347,6 +16213,7 @@ uint8_t BuildAndSendUeContextModRsp(DuUeCb *ueCb)
    FreeUeContextModResp(f1apMsg);
    return ret;
 }
+
 /*******************************************************************
  *
  * @brief Deallocating the memory allocated by the aper decoder
@@ -14425,6 +16292,7 @@ void freeAperDecodeUlTnlInfoforDrbSetupMod(ULUPTNLInformation_ToBeSetup_List_t *
       free(ulInfo->list.array);
    }
 }
+
 /*******************************************************************
  *
  * @brief Deallocating the memory allocated by the aper decoder
@@ -14548,6 +16416,169 @@ void freeAperDecodeDrbToBeSetupModList(DRBs_ToBeSetupMod_List_t *drbSet)
       free(drbSet->list.array);
    }
 
+}
+
+/*******************************************************************
+ *
+ * @brief Deallocating the memory allocated by the aper decoder
+ *          for DrbSetupModItem  
+ *
+ * @details
+ *
+ *    Function : freeAperDecodeDrbModifiedItem 
+ *
+ *    Functionality:  Deallocating memory allocated for DrbModifedItem
+ *
+ * @params[in] DRBs_ToBeModified_Item_t *drbItem
+ *
+ * @return void
+ *
+ * ****************************************************************/
+
+void freeAperDecodeDrbModifiedItem(DRBs_ToBeModified_Item_t *drbItem)
+{
+   uint8_t arrIdx =0;
+   SNSSAI_t *snssai =NULLP;
+   Flows_Mapped_To_DRB_List_t *flowMap = NULLP;
+
+   if(drbItem->qoSInformation != NULLP)
+   {
+      drbItem->qoSInformation->present = QoSInformation_PR_choice_extension;
+      switch(drbItem->qoSInformation->present)
+      {
+         case QoSInformation_PR_NOTHING:
+            break;
+         case QoSInformation_PR_eUTRANQoS:
+            {
+               if(drbItem->qoSInformation->choice.eUTRANQoS)
+               {
+                  free(drbItem->qoSInformation->choice.eUTRANQoS);
+               }
+               break;
+            }
+         case QoSInformation_PR_choice_extension:
+            {
+               if(drbItem->qoSInformation->choice.choice_extension)
+               {
+                  freeAperDecodeQosInfo(&drbItem->qoSInformation->choice.choice_extension->value.choice.\
+                        DRB_Information.dRB_QoS);
+                  snssai = &drbItem->qoSInformation->choice.choice_extension->value.choice.DRB_Information.sNSSAI;
+                  if(snssai->sST.buf)
+                  {
+                     free(snssai->sST.buf);
+                  }
+                  if(snssai->sD)
+                  {
+                     if(snssai->sD->buf)
+                     {
+                        free(snssai->sD->buf);
+                     }
+                     free(snssai->sD);
+                  }
+
+                  flowMap = &drbItem->qoSInformation->choice.choice_extension->value.choice.\
+                            DRB_Information.flows_Mapped_To_DRB_List;
+                  if(flowMap->list.array)
+                  {
+                     for(arrIdx=0; arrIdx<flowMap->list.count; arrIdx++)
+                     {
+                        if(flowMap->list.array[arrIdx] )
+                        {
+                           freeAperDecodeQosInfo(&flowMap->list.array[arrIdx]->qoSFlowLevelQoSParameters);
+                           free(flowMap->list.array[arrIdx]);
+                        }
+                     }
+                     free(flowMap->list.array);
+                  }
+
+                  free(drbItem->qoSInformation->choice.choice_extension);
+               }
+               break;
+            }
+      }
+      free(drbItem->qoSInformation);
+   }
+   freeAperDecodeUlTnlInfoforDrbSetupMod(&drbItem->uLUPTNLInformation_ToBeSetup_List);
+   if(drbItem->uLConfiguration)
+   {
+      free(drbItem->uLConfiguration);
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Deallocating the memory allocated by the aper decoder
+ *          for DrbToBeSetupModList
+ *
+ * @details
+ *
+ *    Function : freeAperDecodeDrbToBeModifiedList
+ *
+ *    Functionality:  Deallocating memory allocated for DrbToBeModifiedList
+ *
+ * @params[in] DRBs_ToBeModified_List_t *drbSet
+ *
+ * @return void
+ *
+ * ****************************************************************/
+
+void freeAperDecodeDrbToBeModifiedList(DRBs_ToBeModified_List_t *drbSet)
+{
+   uint8_t arrIdx =0;
+   struct DRBs_ToBeModified_ItemIEs *drbItemIe;
+
+   if(drbSet->list.array)
+   {
+      for(arrIdx=0; arrIdx<drbSet->list.count ; arrIdx++)
+      {
+         if(drbSet->list.array[arrIdx] != NULLP)
+         {
+            if(arrIdx == 0)
+            {
+               drbItemIe = (DRBs_ToBeModified_ItemIEs_t *)drbSet->list.array[arrIdx];
+               freeAperDecodeDrbModifiedItem(&(drbItemIe->value.choice.DRBs_ToBeModified_Item));
+            }
+            free(drbSet->list.array[arrIdx]);
+         }
+      }
+      free(drbSet->list.array);
+   }
+
+}
+
+/*******************************************************************
+ *
+ * @brief Deallocating the memory allocated by the aper decoder
+ *          for DrbToBeSetupModList
+ *
+ * @details
+ *
+ *    Function : freeAperDecodeDrbToBeReleasedList
+ *
+ *    Functionality:  Deallocating memory allocated for DrbToBeReleasedList
+ *
+ * @params[in] DRBs_ToBeReleased_List_t *drbSet
+ *
+ * @return void
+ *
+ * ****************************************************************/
+
+void freeAperDecodeDrbToBeReleasedList(DRBs_ToBeReleased_List_t *drbSet)
+{
+   uint8_t arrIdx =0;
+
+   if(drbSet->list.array)
+   {
+      for(arrIdx=0; arrIdx<drbSet->list.count ; arrIdx++)
+      {
+         if(drbSet->list.array[arrIdx] != NULLP)
+         {
+            free(drbSet->list.array[arrIdx]);
+         }
+      }
+      free(drbSet->list.array);
+   }
+
 }
 /*******************************************************************
  *
@@ -14589,6 +16620,18 @@ void freeAperDecodeUeContextModificationReqMsg(UEContextModificationRequest_t *u
                            value.choice.DRBs_ToBeSetupMod_List);
                      break;
                   }
+               case ProtocolIE_ID_id_DRBs_ToBeModified_List:
+                  {
+                     freeAperDecodeDrbToBeModifiedList(&ueContextModifyReq->protocolIEs.list.array[arrIdx]->\
+                           value.choice.DRBs_ToBeModified_List);
+                     break;
+                  }
+               case ProtocolIE_ID_id_DRBs_ToBeReleased_List:
+                  {
+                     freeAperDecodeDrbToBeReleasedList(&ueContextModifyReq->protocolIEs.list.array[arrIdx]->\
+                           value.choice.DRBs_ToBeReleased_List);
+                     break;
+                  }
                case ProtocolIE_ID_id_TransmissionActionIndicator:
                   break;
                case ProtocolIE_ID_id_RRCContainer:
@@ -14621,8 +16664,9 @@ uint8_t procF1UeContextModificationReq(F1AP_PDU_t *f1apMsg)
    UEContextModificationRequest_t *ueContextModifyReq = NULLP;
    uint8_t  ret = ROK, ieIdx = 0, cellIdx=0;
    DuUeCb   *duUeCb = NULLP;
-   DRBs_ToBeSetupMod_List_t *drbSetupModCfg;
-   DRBs_ToBeModified_List_t *drbModifiedCfg;
+   DRBs_ToBeSetupMod_List_t *drbSetupModCfg = NULLP;
+   DRBs_ToBeModified_List_t *drbModifiedCfg = NULLP;
+   DRBs_ToBeReleased_List_t *drbToRelease = NULLP;
    uint32_t gnbCuUeF1apId, gnbDuUeF1apId;
 
    ueContextModifyReq = &f1apMsg->choice.initiatingMessage->value.choice.UEContextModificationRequest;
@@ -14688,9 +16732,11 @@ uint8_t procF1UeContextModificationReq(F1AP_PDU_t *f1apMsg)
 
          case ProtocolIE_ID_id_DRBs_ToBeSetupMod_List:
          case ProtocolIE_ID_id_DRBs_ToBeModified_List:
+         case ProtocolIE_ID_id_DRBs_ToBeReleased_List:
             {
                if(duUeCb->f1UeDb)
                {
+                  /*DRBs to be Added*/
                   if(ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.present ==\
                         UEContextModificationRequestIEs__value_PR_DRBs_ToBeSetupMod_List)
                   {
@@ -14705,6 +16751,7 @@ uint8_t procF1UeContextModificationReq(F1AP_PDU_t *f1apMsg)
                      }
                   }
 
+                  /*DRBs to be Modified*/
                   if(ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.present == \
                         UEContextModificationRequestIEs__value_PR_DRBs_ToBeModified_List)
 
@@ -14712,7 +16759,21 @@ uint8_t procF1UeContextModificationReq(F1AP_PDU_t *f1apMsg)
                      drbModifiedCfg = &ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.\
                                       choice.DRBs_ToBeModified_List;
                      if(extractDrbListToSetupMod(NULL, NULL, drbModifiedCfg, drbModifiedCfg->list.count,\
-                              &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap, &duUeCb->rlcUeCfg))
+                              &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap, &duUeCb->duRlcUeCfg))
+                     {
+                        DU_LOG("\nERROR  -->  DU APP : Failed at extractDrbListToSetupMod() for DrbModifiedList");
+                        ret = RFAILED;
+                     }
+                  }
+                  /*DRBs to be Released*/
+                  if(ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.present == \
+                        UEContextModificationRequestIEs__value_PR_DRBs_ToBeReleased_List)
+
+                  {
+                     drbToRelease = &ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.\
+                                      choice.DRBs_ToBeReleased_List;
+                     if(extractDrbListToRelease(gnbDuUeF1apId, drbToRelease, drbToRelease->list.count,\
+                              &duUeCb->f1UeDb->duUeCfg, &duUeCb->duRlcUeCfg))
                      {
                         DU_LOG("\nERROR  -->  DU APP : Failed at extractDrbListToSetupMod() for DrbModifiedList");
                         ret = RFAILED;
@@ -14765,6 +16826,13 @@ uint8_t procF1UeContextModificationReq(F1AP_PDU_t *f1apMsg)
                }
                break;
             }
+#ifdef NR_DRX
+         case ProtocolIE_ID_id_DRXConfigurationIndicator:
+            {
+               duUeCb->f1UeDb->duUeCfg.drxConfigIndicatorRelease = true;
+               break;
+            }
+#endif
               
       }
    }
@@ -14946,10 +17014,12 @@ uint8_t BuildAndSendUeContextReleaseReq(uint16_t cellId, uint8_t ueId)
       else
       {
          DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for UEContextReleaseRequest\n");
+#ifdef DEBUG_ASN_PRINT
          for(ieIdx=0; ieIdx< encBufSize; ieIdx++)
          {
             printf("%x",encBuf[ieIdx]);
          }
+#endif
       }
 
       /* Sending msg */
@@ -15110,10 +17180,12 @@ uint8_t BuildAndSendUeContextReleaseComplete(uint16_t cellId, uint32_t gnbCuUeF1
       else
       {
          DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for UEContextReleaseComplete\n");
+#ifdef DEBUG_ASN_PRINT
          for(ieIdx=0; ieIdx< encBufSize; ieIdx++)
          {
             printf("%x",encBuf[ieIdx]);
          }
+#endif
       }
 
       /* Sending msg */
@@ -15433,14 +17505,13 @@ void freeAperDecodePagingMsg(Paging_t   *paging)
 uint8_t procPagingMsg(F1AP_PDU_t *f1apMsg) 
 {
    uint8_t ieIdx = 0, cellListIdx = 0;
-   uint16_t cellId = 0;
+   uint64_t cellId = 0;
    Paging_t   *paging = NULLP;
    PagingCell_list_t  *pagingCelllist = NULLP;
    PagingCell_ItemIEs_t *pagingCellItemIes = NULLP;
    PagingCell_Item_t *pagingCellItem = NULLP;
    DuPagingMsg *tmpPagingParam = NULLP;
 
-   DU_LOG("\nINFO  --> DU APP : Processing the Paging Message");
    paging = &f1apMsg->choice.initiatingMessage->value.choice.Paging;
    if(paging)
    {
@@ -15520,7 +17591,7 @@ uint8_t procPagingMsg(F1AP_PDU_t *f1apMsg)
                                  bitStringToInt(&pagingCellItem->nRCGI.nRCellIdentity, &cellId);
                                  if(processPagingMsg(cellId, tmpPagingParam) != ROK)
                                  {
-                                    DU_LOG("\nERROR  --> DU APP : Paging Processing Failed at CellId:%d",cellId);
+                                    DU_LOG("\nERROR  --> DU APP : Paging Processing Failed at CellId:%lu",cellId);
                                     continue;
                                  }
                               }
@@ -15588,11 +17659,13 @@ void F1APMsgHdlr(Buffer *mBuf)
       return;
    }
 
+#ifdef DEBUG_ASN_PRINT
    printf("\nDEBUG   -->  F1AP : Received flat buffer to be decoded : ");
    for(i=0; i< recvBufLen; i++)
    {
       printf("%x",recvBuf[i]);
    }
+#endif
 
    /* Decoding flat buffer into F1AP messsage */
    f1apMsg = &f1apasnmsg;