Merge "Separation of logs in based on error, info, debug"
[o-du/l2.git] / src / du_app / du_f1ap_msg_hdl.c
index 95862d1..0c31605 100644 (file)
 #include "DUtoCURRCContainer.h"
 #include "GBR-QoSFlowInformation.h"
 #include "QoSFlowLevelQoSParameters.h"
+#include "PUCCH-Config.h"
+#include "PUCCH-ResourceSet.h"
+#include "PUCCH-Resource.h"
+#include "PUCCH-PowerControl.h"
+#include "P0-PUCCH.h"
+#include "PUCCH-PathlossReferenceRS.h"
+#include "PUCCH-format0.h"
+#include "PUCCH-format1.h"
+#include "PUCCH-format2.h"
+#include "PUCCH-format3.h"
+#include "PUCCH-format4.h"
+#include "PUCCH-FormatConfig.h"
+#include "SchedulingRequestResourceConfig.h"
 #include<ProtocolIE-Field.h>
 #include "ProtocolExtensionField.h"
 #include "F1AP-PDU.h"
@@ -702,24 +715,24 @@ uint8_t BuildRrcVer(RRC_Version_t *rrcVer)
  * ****************************************************************/
 uint8_t SendF1APMsg(Region region, Pool pool)
 {
-   Buffer *mBuf;
-
+   Buffer *mBuf = NULLP;
+  
    if(ODU_GET_MSG_BUF(region, pool, &mBuf) == ROK)
    {
       if(ODU_ADD_POST_MSG_MULT((Data *)encBuf, encBufSize, mBuf) == ROK)
       {
-        ODU_PRINT_MSG(mBuf, 0,0);
+           ODU_PRINT_MSG(mBuf, 0,0);
 
-        if(sctpSend(mBuf, F1_INTERFACE) != ROK)
-        {
-           DU_LOG("\nF1AP : SCTP Send failed");
-           ODU_PUT_MSG_BUF(mBuf);
-           return RFAILED;
-        }
+           if(sctpSend(mBuf, F1_INTERFACE) != ROK)
+           {
+              DU_LOG("\nERROR  -->  F1AP : SCTP Send failed");
+              ODU_PUT_MSG_BUF(mBuf);
+              return RFAILED;
+           }
       }
       else
       {
-        DU_LOG("\nF1AP : ODU_ADD_POST_MSG_MULT failed");
+        DU_LOG("\nERROR  -->  F1AP : ODU_ADD_POST_MSG_MULT failed");
         ODU_PUT_MSG_BUF(mBuf);
         return RFAILED;
       }
@@ -727,7 +740,7 @@ uint8_t SendF1APMsg(Region region, Pool pool)
    }
    else
    {
-      DU_LOG("\nF1AP : Failed to allocate memory");
+      DU_LOG("\nERROR  -->  F1AP : Failed to allocate memory");
       return RFAILED;
    }
    return ROK; 
@@ -998,7 +1011,7 @@ void FreeF1SetupReq(F1AP_PDU_t *f1apMsg)
                        FreeRrcVer(&f1SetupReq->protocolIEs.list.array[ieIdx]->value.choice.RRC_Version);
                        break;
                     default:
-                       DU_LOG("\nInvalid Event Type %ld", f1SetupReq->protocolIEs.list.array[ieIdx]->id);
+                       DU_LOG("\nERROR  -->  Invalid Event Type %ld", f1SetupReq->protocolIEs.list.array[ieIdx]->id);
                        break;
                  }
               }
@@ -1040,7 +1053,7 @@ uint8_t BuildAndSendF1SetupReq()
    asn_enc_rval_t             encRetVal;        /* Encoder return value */
    ret= RFAILED;
 
-   DU_LOG("\nF1AP : Building F1 Setup Request\n");
+   DU_LOG("\nINFO   -->  F1AP : Building F1 Setup Request\n");
    do
    {
       DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
@@ -1169,13 +1182,13 @@ uint8_t BuildAndSendF1SetupReq()
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG("\nF1AP : Could not encode F1SetupRequest structure (at %s)\n",\
+        DU_LOG("\nERROR  -->  F1AP : Could not encode F1SetupRequest structure (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\nF1AP : Created APER encoded buffer for F1SetupRequest\n");
+        DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for F1SetupRequest\n");
         for(ieIdx=0; ieIdx< encBufSize; ieIdx++)
         {
            printf("%x",encBuf[ieIdx]);
@@ -1185,7 +1198,7 @@ uint8_t BuildAndSendF1SetupReq()
       /* Sending msg */
       if(SendF1APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK)
       {
-        DU_LOG("\nF1AP : Sending F1 Setup request failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending F1 Setup request failed");
         break;
       }
 
@@ -1883,12 +1896,12 @@ uint8_t BuildAndSendDUConfigUpdate()
 
    while(true)
    {
-      DU_LOG("\nF1AP : Building DU config update\n");
+      DU_LOG("\nINFO   -->  F1AP : Building DU config update\n");
       /* Allocate the memory for F1DuCfg */
       DU_ALLOC(f1apDuCfg, sizeof(F1AP_PDU_t));
       if(f1apDuCfg == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         break;
       }
 
@@ -1896,7 +1909,7 @@ uint8_t BuildAndSendDUConfigUpdate()
       DU_ALLOC(f1apDuCfg->choice.initiatingMessage,sizeof(InitiatingMessage_t));
       if(f1apDuCfg->choice.initiatingMessage == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         break;
       }
 
@@ -1916,7 +1929,7 @@ uint8_t BuildAndSendDUConfigUpdate()
       DU_ALLOC(duCfgUpdate->protocolIEs.list.array,duCfgUpdate->protocolIEs.list.size);
       if(duCfgUpdate->protocolIEs.list.array == NULLP)
       {
-        DU_LOG("F1AP : Memory allocation for F1RequestIEs failed");
+        DU_LOG("ERROR  -->  F1AP : Memory allocation for F1RequestIEs failed");
         break;
       }
       for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
@@ -1973,12 +1986,13 @@ uint8_t BuildAndSendDUConfigUpdate()
       /* Checking encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG("F1AP : Could not encode DUConfigUpdate structure (at %s)\n",encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
+        DU_LOG("ERROR  -->  F1AP : Could not encode DUConfigUpdate structure (at %s)\n",\
+        encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\nF1AP : Created APER encoded buffer for DUConfigUpdate\n");
+        DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for DUConfigUpdate\n");
         for(ieIdx =0; ieIdx < encBufSize; ieIdx++)
         {
            printf("%x",encBuf[ieIdx]);
@@ -1987,7 +2001,7 @@ uint8_t BuildAndSendDUConfigUpdate()
       /* Sending msg */
       if(SendF1APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK)
       {
-        DU_LOG("\nF1AP : Sending GND-DU Config Update failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending GNB-DU Config Update failed");
         break;
       }
 
@@ -2068,29 +2082,31 @@ void FreeULRRCMessageTransfer( F1AP_PDU_t *f1apMsg)
 uint8_t BuildAndSendULRRCMessageTransfer(DuUeCb  ueCb, uint8_t lcId, \
       uint16_t msgLen, uint8_t *rrcMsg)
 {
-   uint8_t   elementCnt;
-   uint8_t   idx1;
-   uint8_t   idx;
-   F1AP_PDU_t                  *f1apMsg = NULL;
-   ULRRCMessageTransfer_t      *ulRRCMsg;
+   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;
+   
+   memset(&encRetVal, 0, sizeof(asn_enc_rval_t));
+
    while(true)
    {
-      DU_LOG("\n F1AP : Building UL RRC Message Transfer Message\n");
+      DU_LOG("\n INFO   -->  F1AP : Building UL RRC Message Transfer Message\n");
 
       DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         break;
       }
-
       f1apMsg->present = F1AP_PDU_PR_initiatingMessage;
       DU_ALLOC(f1apMsg->choice.initiatingMessage,sizeof(InitiatingMessage_t));
       if(f1apMsg->choice.initiatingMessage == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for  F1AP-PDU failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for      F1AP-PDU failed");
         break;
       }
       f1apMsg->choice.initiatingMessage->procedureCode = ProcedureCode_id_ULRRCMessageTransfer;
@@ -2108,7 +2124,7 @@ uint8_t BuildAndSendULRRCMessageTransfer(DuUeCb  ueCb, uint8_t lcId, \
       DU_ALLOC(ulRRCMsg->protocolIEs.list.array, ulRRCMsg->protocolIEs.list.size);
       if(ulRRCMsg->protocolIEs.list.array == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for UL RRC MessageTransferIEs failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for UL RRC MessageTransferIEs failed");
         break;
       }
       for(idx=0; idx<elementCnt; idx++)
@@ -2154,11 +2170,12 @@ uint8_t BuildAndSendULRRCMessageTransfer(DuUeCb  ueCb, uint8_t lcId, \
       ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.size = msgLen;
       DU_ALLOC(ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.buf,
            ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.size)
-        if(!ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.buf)
-        {
-           DU_LOG(" F1AP : Memory allocation for BuildAndSendULRRCMessageTransfer failed");
-           break;
-        }
+      if(!ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.buf)
+      {
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for BuildAndSendULRRCMessageTransfer failed");
+        break;
+      }
+      memset(ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.buf, 0, msgLen);
       memcpy(ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.buf, \
            rrcMsg, ulRRCMsg->protocolIEs.list.array[idx1]->value.choice.RRCContainer.size);
 
@@ -2172,13 +2189,13 @@ uint8_t BuildAndSendULRRCMessageTransfer(DuUeCb  ueCb, uint8_t lcId, \
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG( "\n F1AP : Could not encode ULRRCMessageTransfer structure (at %s)\n",\
+        DU_LOG( "\nERROR  -->  F1AP : Could not encode ULRRCMessageTransfer structure (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\n F1AP : Created APER encoded buffer for ULRRCMessageTransfer\n");
+        DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for ULRRCMessageTransfer\n");
         for(int i=0; i< encBufSize; i++)
         {
            printf("%x",encBuf[i]);
@@ -2188,7 +2205,7 @@ uint8_t BuildAndSendULRRCMessageTransfer(DuUeCb  ueCb, uint8_t lcId, \
       /* Sending  msg  */
       if(SendF1APMsg(DU_APP_MEM_REGION,DU_POOL)        !=      ROK)
       {
-        DU_LOG("\n F1AP : Sending      UL RRC Message Transfer Failed");
+        DU_LOG("\nERROR  -->   F1AP : Sending  UL RRC Message Transfer Failed");
         break;
       }
       ret = ROK;
@@ -2225,7 +2242,7 @@ uint8_t BuildTagConfig(struct TAG_Config *tagConfig)
    DU_ALLOC(tagConfig->tag_ToAddModList, sizeof(struct TAG_Config__tag_ToAddModList));
    if(!tagConfig->tag_ToAddModList)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildTagConfig");
       return RFAILED;
    }
 
@@ -2238,7 +2255,7 @@ uint8_t BuildTagConfig(struct TAG_Config *tagConfig)
    DU_ALLOC(tagList->list.array, tagList->list.size);
    if(!tagList->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildTagConfig");
       return RFAILED;
    }
 
@@ -2248,7 +2265,7 @@ uint8_t BuildTagConfig(struct TAG_Config *tagConfig)
       DU_ALLOC(tagList->list.array[idx], sizeof(struct TAG));
       if(!tagList->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildTagConfig");
         return RFAILED;
       }
    }
@@ -2284,7 +2301,7 @@ uint8_t BuildPhrConfig(struct MAC_CellGroupConfig__phr_Config *phrConfig)
    DU_ALLOC(phrConfig->choice.setup, sizeof(struct PHR_Config));
    if(!phrConfig->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildPhrConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildPhrConfig");
       return RFAILED;
    }
 
@@ -2350,7 +2367,7 @@ uint8_t BuildSchedulingReqConfig(struct SchedulingRequestConfig *schedulingReque
         sizeof(struct SchedulingRequestConfig__schedulingRequestToAddModList));
    if(!schedulingRequestConfig->schedulingRequestToAddModList)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSchedulingReqConfig");
       return RFAILED;
    }
 
@@ -2363,7 +2380,7 @@ uint8_t BuildSchedulingReqConfig(struct SchedulingRequestConfig *schedulingReque
    DU_ALLOC(schReqList->list.array, schReqList->list.size);
    if(!schReqList->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSchedulingReqConfig");
       return RFAILED;
    }
 
@@ -2373,7 +2390,7 @@ uint8_t BuildSchedulingReqConfig(struct SchedulingRequestConfig *schedulingReque
       DU_ALLOC(schReqList->list.array[idx], sizeof(struct SchedulingRequestToAddMod));
       if(!schReqList->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSchedulingReqConfig");
         return RFAILED;
       }
    }
@@ -2385,7 +2402,7 @@ uint8_t BuildSchedulingReqConfig(struct SchedulingRequestConfig *schedulingReque
    DU_ALLOC(schReqList->list.array[idx]->sr_ProhibitTimer, sizeof(long));
    if(!schReqList->list.array[idx]->sr_ProhibitTimer)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSchedulingReqConfig");
       return RFAILED;
    }
    *(schReqList->list.array[idx]->sr_ProhibitTimer) = SR_PROHIBIT_TMR;
@@ -2420,7 +2437,7 @@ uint8_t BuildRlcConfig(struct RLC_Config *rlcConfig)
    DU_ALLOC(rlcConfig->choice.am, sizeof(struct RLC_Config__am));
    if(!rlcConfig->choice.am)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcConfig");
       return RFAILED;
    }
 
@@ -2429,7 +2446,7 @@ uint8_t BuildRlcConfig(struct RLC_Config *rlcConfig)
    DU_ALLOC(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t));
    if(!rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcConfig");
       return RFAILED;
    }
    *(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength) = SN_FIELD_LEN;
@@ -2443,7 +2460,7 @@ uint8_t BuildRlcConfig(struct RLC_Config *rlcConfig)
    DU_ALLOC(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t)); 
    if(!rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcConfig");
       return RFAILED;
    }
    *(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength) = SN_FIELD_LEN;
@@ -2476,7 +2493,7 @@ uint8_t BuildMacLCConfig(struct LogicalChannelConfig *macLcConfig)
    DU_ALLOC(macLcConfig->ul_SpecificParameters, sizeof(struct LogicalChannelConfig__ul_SpecificParameters));
    if(!macLcConfig->ul_SpecificParameters)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacLCConfig");
       return RFAILED;
    }
 
@@ -2492,7 +2509,7 @@ uint8_t BuildMacLCConfig(struct LogicalChannelConfig *macLcConfig)
    DU_ALLOC(macLcConfig->ul_SpecificParameters->logicalChannelGroup,   sizeof(long));
    if(!macLcConfig->ul_SpecificParameters->logicalChannelGroup)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacLCConfig");
       return RFAILED;
    }
    *(macLcConfig->ul_SpecificParameters->logicalChannelGroup) = LC_GRP;
@@ -2501,7 +2518,7 @@ uint8_t BuildMacLCConfig(struct LogicalChannelConfig *macLcConfig)
    DU_ALLOC(macLcConfig->ul_SpecificParameters->schedulingRequestID,   sizeof(SchedulingRequestId_t));
    if(!macLcConfig->ul_SpecificParameters->schedulingRequestID)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacLCConfig");
       return RFAILED;
    }
    *(macLcConfig->ul_SpecificParameters->schedulingRequestID) = SCH_REQ_ID;
@@ -2541,7 +2558,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    DU_ALLOC(rlcBearerList->list.array, rlcBearerList->list.size);
    if(!rlcBearerList->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
       return RFAILED;
    }
 
@@ -2551,7 +2568,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
       DU_ALLOC(rlcBearerList->list.array[idx], sizeof(struct RLC_BearerConfig));
       if(!rlcBearerList->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
         return RFAILED;
       }
    }
@@ -2563,7 +2580,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
       sizeof(struct RLC_BearerConfig__servedRadioBearer));
    if(!rlcBearerList->list.array[idx]->servedRadioBearer)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
       return RFAILED;
    }
 
@@ -2577,13 +2594,13 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    DU_ALLOC(rlcBearerList->list.array[idx]->rlc_Config, sizeof(struct RLC_Config));
    if(!rlcBearerList->list.array[idx]->rlc_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
       return RFAILED;
    }
 
    if(BuildRlcConfig(rlcBearerList->list.array[idx]->rlc_Config) != ROK)
    {
-      DU_LOG("\nF1AP : BuildRlcConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildRlcConfig failed");
       return RFAILED;
    }
 
@@ -2592,13 +2609,13 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
       sizeof(struct LogicalChannelConfig));
    if(!rlcBearerList->list.array[idx]->mac_LogicalChannelConfig)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
       return RFAILED;
    }
 
    if(BuildMacLCConfig(rlcBearerList->list.array[idx]->mac_LogicalChannelConfig) != ROK)
    {
-      DU_LOG("\nF1AP : BuildMacLCConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildMacLCConfig failed");
       return RFAILED;
    }
 
@@ -2644,7 +2661,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    DU_ALLOC(controlRSetList->list.array, controlRSetList->list.size);
    if(!controlRSetList->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
       return RFAILED;
    }
 
@@ -2654,7 +2671,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
       DU_ALLOC(controlRSetList->list.array[idx], sizeof(struct ControlResourceSet));
       if(!controlRSetList->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
         return RFAILED;
       }
    }
@@ -2677,7 +2694,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
         controlRSet->frequencyDomainResources.size);
    if(!controlRSet->frequencyDomainResources.buf)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
       return RFAILED;
    }
 
@@ -2705,7 +2722,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
         sizeof(struct ControlResourceSet__tci_StatesPDCCH_ToAddList));
    if(!controlRset->tci_StatesPDCCH_ToAddList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
       return RFAILED;
    }
 
@@ -2716,7 +2733,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
         controlRset->tci_StatesPDCCH_ToAddList->list.size)
       if(!controlRset->tci_StatesPDCCH_ToAddList->list.array)
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
         return RFAILED;
       }
 
@@ -2725,7 +2742,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
       DU_ALLOC(controlRset->tci_StatesPDCCH_ToAddList->list.array[tciStateIdx], sizeof(TCI_StateId_t));
       if(!controlRset->tci_StatesPDCCH_ToAddList->list.array[tciStateIdx])
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
         return RFAILED;
       }
    }
@@ -2737,7 +2754,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    DU_ALLOC(controlRset->tci_PresentInDCI, sizeof(long));
    if(!controlRset->tci_PresentInDCI)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
       return RFAILED;
    }
    /* TODO */
@@ -2748,7 +2765,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    DU_ALLOC(controlRSet->pdcch_DMRS_ScramblingID, sizeof(long));
    if(!controlRSet->pdcch_DMRS_ScramblingID)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
       return RFAILED;
    }
    *(controlRSet->pdcch_DMRS_ScramblingID) = SCRAMBLING_ID;
@@ -2791,7 +2808,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    DU_ALLOC(searchSpcList->list.array, searchSpcList->list.size);
    if(!searchSpcList->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
 
@@ -2801,7 +2818,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
       DU_ALLOC(searchSpcList->list.array[idx], sizeof(struct SearchSpace));
       if(!searchSpcList->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
         return RFAILED;
       }
    }
@@ -2815,7 +2832,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    DU_ALLOC(searchSpc->controlResourceSetId, sizeof(ControlResourceSetId_t));
    if(!searchSpc->controlResourceSetId)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
    *(searchSpc->controlResourceSetId) = PDCCH_CTRL_RSRC_SET_ONE_ID;
@@ -2825,7 +2842,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
         sizeof(struct SearchSpace__monitoringSlotPeriodicityAndOffset));
    if(!searchSpc->monitoringSlotPeriodicityAndOffset)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
    searchSpc->monitoringSlotPeriodicityAndOffset->present = \
@@ -2836,7 +2853,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    DU_ALLOC(searchSpc->monitoringSymbolsWithinSlot, sizeof(BIT_STRING_t));
    if(!searchSpc->monitoringSymbolsWithinSlot)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
 
@@ -2854,7 +2871,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
         searchSpc->monitoringSymbolsWithinSlot->size);
    if(!searchSpc->monitoringSymbolsWithinSlot->buf)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
 
@@ -2868,7 +2885,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    DU_ALLOC(searchSpc->nrofCandidates, sizeof(struct SearchSpace__nrofCandidates));
    if(!searchSpc->nrofCandidates)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
 
@@ -2887,7 +2904,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    DU_ALLOC(searchSpc->searchSpaceType, sizeof(struct SearchSpace__searchSpaceType));
    if(!searchSpc->searchSpaceType)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
 
@@ -2898,7 +2915,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
         sizeof(struct SearchSpace__searchSpaceType__ue_Specific));
    if(!searchSpc->searchSpaceType->choice.ue_Specific)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }  
    searchSpc->searchSpaceType->choice.ue_Specific->dci_Formats = \
@@ -2930,7 +2947,7 @@ uint8_t BuildBWPDlDedPdcchCfg(struct PDCCH_Config *pdcchCfg)
         sizeof(struct PDCCH_Config__controlResourceSetToAddModList));
    if(!pdcchCfg->controlResourceSetToAddModList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
       return RFAILED;
    }
 
@@ -2946,7 +2963,7 @@ uint8_t BuildBWPDlDedPdcchCfg(struct PDCCH_Config *pdcchCfg)
         sizeof(struct PDCCH_Config__searchSpacesToAddModList));
    if(!pdcchCfg->searchSpacesToAddModList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
       return RFAILED;
    }
 
@@ -2990,7 +3007,7 @@ uint8_t BuildBWPDlDedPdcchCfg(struct PDCCH_Config *pdcchCfg)
    DU_ALLOC(dmrsDlCfg->choice.setup, sizeof(struct DMRS_DownlinkConfig));
    if(!dmrsDlCfg->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
       return RFAILED;
    }
 
@@ -2999,7 +3016,7 @@ uint8_t BuildBWPDlDedPdcchCfg(struct PDCCH_Config *pdcchCfg)
    DU_ALLOC(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition, sizeof(long));
    if(!dmrsDlCfg->choice.setup->dmrs_AdditionalPosition)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSDLPdschMapTypeA");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDMRSDLPdschMapTypeA");
       return RFAILED;
    }
    *(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition) = DMRS_ADDITIONAL_POS;
@@ -3068,7 +3085,7 @@ uint8_t BuildTCIStatesToAddModList(struct PDSCH_Config__tci_StatesToAddModList *
         sizeof(struct PDSCH_TimeDomainResourceAllocationList));
    if(!timeDomAllocList->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
       return RFAILED;
    }
 
@@ -3082,7 +3099,7 @@ uint8_t BuildTCIStatesToAddModList(struct PDSCH_Config__tci_StatesToAddModList *
         timeDomAllocList->choice.setup->list.size);
    if(!timeDomAllocList->choice.setup->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
       return RFAILED;
    }
 
@@ -3093,7 +3110,7 @@ uint8_t BuildTCIStatesToAddModList(struct PDSCH_Config__tci_StatesToAddModList *
            sizeof(struct PDSCH_TimeDomainResourceAllocation));
       if(!timeDomAllocList->choice.setup->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
         return RFAILED;
       }
    }
@@ -3138,7 +3155,7 @@ uint8_t BuildTCIStatesToAddModList(struct PDSCH_Config__tci_StatesToAddModList *
         sizeof(struct PDSCH_Config__prb_BundlingType__staticBundling));
    if(!prbBndlType->choice.staticBundling)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPdschPrbBundlingType");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschPrbBundlingType");
       return RFAILED;
    }
    prbBndlType->choice.staticBundling->bundleSize = NULLP;
@@ -3171,7 +3188,7 @@ uint8_t BuildBWPDlDedPdschCfg(struct PDSCH_Config *pdschCfg)
         sizeof(struct PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA));
    if(!pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
       return RFAILED;
    }
 
@@ -3188,7 +3205,7 @@ uint8_t BuildBWPDlDedPdschCfg(struct PDSCH_Config *pdschCfg)
    DU_ALLOC(pdschCfg->tci_StatesToAddModList, sizeof(struct PDSCH_Config__tci_StatesToAddModList));
    if(!pdschCfg->tci_StatesToAddModList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
       return RFAILED;
    }
    if(BuildTCIStatesToAddModList(pdschCfg->tci_StatesToAddModList) != ROK)
@@ -3204,7 +3221,7 @@ uint8_t BuildBWPDlDedPdschCfg(struct PDSCH_Config *pdschCfg)
         sizeof(struct PDSCH_Config__pdsch_TimeDomainAllocationList));
    if(!pdschCfg->pdsch_TimeDomainAllocationList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
       return RFAILED;
    }
 
@@ -3225,7 +3242,7 @@ uint8_t BuildBWPDlDedPdschCfg(struct PDSCH_Config *pdschCfg)
    DU_ALLOC(pdschCfg->maxNrofCodeWordsScheduledByDCI, sizeof(long));
    if(!pdschCfg->maxNrofCodeWordsScheduledByDCI)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
       return RFAILED;
    }
    *(pdschCfg->maxNrofCodeWordsScheduledByDCI) = PDSCH_MAX_CODEWORD_SCH_BY_DCI;
@@ -3267,7 +3284,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    DU_ALLOC(dlBwp->pdcch_Config, sizeof(struct BWP_DownlinkDedicated__pdcch_Config));
    if(!dlBwp->pdcch_Config)
    {
-      DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failure in BuildInitialDlBWP");
       return RFAILED;
    }
    dlBwp->pdcch_Config->present = BWP_DownlinkDedicated__pdcch_Config_PR_setup; 
@@ -3276,7 +3293,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    DU_ALLOC(dlBwp->pdcch_Config->choice.setup, sizeof(struct PDCCH_Config));
    if(!dlBwp->pdcch_Config->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failure in BuildInitialDlBWP");
       return RFAILED;
    }
    if(BuildBWPDlDedPdcchCfg(dlBwp->pdcch_Config->choice.setup) != ROK)
@@ -3288,7 +3305,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    DU_ALLOC(dlBwp->pdsch_Config, sizeof(struct BWP_DownlinkDedicated__pdsch_Config));
    if(!dlBwp->pdsch_Config)
    {
-      DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failure in BuildInitialDlBWP");
       return RFAILED;
    }
    dlBwp->pdsch_Config->present = BWP_DownlinkDedicated__pdsch_Config_PR_setup;
@@ -3297,7 +3314,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    DU_ALLOC(dlBwp->pdsch_Config->choice.setup, sizeof(struct PDSCH_Config));
    if(!dlBwp->pdsch_Config->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failure in BuildInitialDlBWP");
       return RFAILED;
    }
 
@@ -3337,7 +3354,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    DU_ALLOC(dmrsUlCfg->choice.setup, sizeof(DMRS_UplinkConfig_t));
    if(!dmrsUlCfg->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
       return RFAILED;
    }
 
@@ -3346,7 +3363,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    DU_ALLOC(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition, sizeof(long));
    if(!dmrsUlCfg->choice.setup->dmrs_AdditionalPosition)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
       return RFAILED;
    }
    *(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition) = DMRS_ADDITIONAL_POS; 
@@ -3358,7 +3375,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
         sizeof(struct DMRS_UplinkConfig__transformPrecodingDisabled));
    if(!dmrsUlCfg->choice.setup->transformPrecodingDisabled)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
       return RFAILED;
    }
 
@@ -3367,7 +3384,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
         sizeof(long));
    if(!dmrsUlCfg->choice.setup->transformPrecodingDisabled->scramblingID0)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
       return RFAILED;
    }
    *(dmrsUlCfg->choice.setup->transformPrecodingDisabled->scramblingID0) = SCRAMBLING_ID;
@@ -3409,7 +3426,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
         sizeof(struct PUSCH_TimeDomainResourceAllocationList));
    if(!timeDomAllocList->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
       return RFAILED;
    }
 
@@ -3422,7 +3439,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
         timeDomAllocList->choice.setup->list.size);
    if(!timeDomAllocList->choice.setup->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
       return RFAILED;
    }
 
@@ -3433,7 +3450,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
            sizeof(PUSCH_TimeDomainResourceAllocation_t));
       if(!timeDomAllocList->choice.setup->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
         return RFAILED;
       }
    }
@@ -3443,7 +3460,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    DU_ALLOC(timeDomAlloc->k2, sizeof(long));
    if(!timeDomAlloc->k2)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
       return RFAILED;
    }
    *(timeDomAlloc->k2) = PUSCH_K2;
@@ -3475,7 +3492,7 @@ uint8_t BuildBWPUlDedPuschCfg(PUSCH_Config_t *puschCfg)
    DU_ALLOC(puschCfg->dataScramblingIdentityPUSCH, sizeof(long));
    if(!puschCfg->dataScramblingIdentityPUSCH)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
       return RFAILED;
    }
    *(puschCfg->dataScramblingIdentityPUSCH) = SCRAMBLING_ID;
@@ -3486,7 +3503,7 @@ uint8_t BuildBWPUlDedPuschCfg(PUSCH_Config_t *puschCfg)
         sizeof(struct PUSCH_Config__dmrs_UplinkForPUSCH_MappingTypeA));
    if(!puschCfg->dmrs_UplinkForPUSCH_MappingTypeA)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
       return RFAILED;
    }
 
@@ -3506,7 +3523,7 @@ uint8_t BuildBWPUlDedPuschCfg(PUSCH_Config_t *puschCfg)
         sizeof(struct PUSCH_Config__pusch_TimeDomainAllocationList));
    if(!puschCfg->pusch_TimeDomainAllocationList)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
       return RFAILED;
    }
 
@@ -3522,7 +3539,7 @@ uint8_t BuildBWPUlDedPuschCfg(PUSCH_Config_t *puschCfg)
    DU_ALLOC(puschCfg->transformPrecoder, sizeof(long));
    if(!puschCfg->transformPrecoder)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
       return RFAILED;
    }
    *(puschCfg->transformPrecoder) = PUSCH_TRANSFORM_PRECODER;
@@ -3563,7 +3580,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
    DU_ALLOC(resourceList->list.array, resourceList->list.size);
    if(!resourceList->list.array)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcAddModList");
       return RFAILED;
    }
 
@@ -3572,7 +3589,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
       DU_ALLOC(resourceList->list.array[rsrcIdx], sizeof(SRS_Resource_t));
       if(!resourceList->list.array[rsrcIdx])
       {
-        DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcAddModList");
         return RFAILED;
       }
    }
@@ -3587,7 +3604,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
         sizeof(struct SRS_Resource__transmissionComb__n2));
    if(!resourceList->list.array[rsrcIdx]->transmissionComb.choice.n2)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcAddModList");
       return RFAILED;
    }
    resourceList->list.array[rsrcIdx]->transmissionComb.choice.n2->combOffset_n2\
@@ -3618,7 +3635,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
         sizeof(struct SRS_Resource__resourceType__aperiodic));
    if(!resourceList->list.array[rsrcIdx]->resourceType.choice.aperiodic)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcAddModList");
       return RFAILED;
    }
    resourceList->list.array[rsrcIdx]->sequenceId = SRS_SEQ_ID;
@@ -3658,7 +3675,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
    DU_ALLOC(rsrcSetList->list.array, rsrcSetList->list.size);
    if(!rsrcSetList->list.array)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
       return RFAILED;
    }
 
@@ -3667,7 +3684,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
       DU_ALLOC(rsrcSetList->list.array[rSetIdx], sizeof(SRS_ResourceSet_t));
       if(!rsrcSetList->list.array[rSetIdx])
       {
-        DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
         return RFAILED;
       }
    }
@@ -3681,7 +3698,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
         sizeof(struct SRS_ResourceSet__srs_ResourceIdList));
    if(!rsrcSetList->list.array[rSetIdx]->srs_ResourceIdList)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
       return RFAILED;
    }
 
@@ -3693,7 +3710,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
    DU_ALLOC(rsrcIdList->list.array, rsrcIdList->list.size);
    if(!rsrcIdList->list.array)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
       return RFAILED;
    }
 
@@ -3702,7 +3719,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
       DU_ALLOC(rsrcIdList->list.array[rsrcIdx], sizeof(SRS_ResourceId_t));
       if(!rsrcIdList->list.array[rsrcIdx])
       {
-        DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
         return RFAILED;
       }
    }
@@ -3719,7 +3736,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
         sizeof(struct SRS_ResourceSet__resourceType__aperiodic));
    if(!rsrcSetList->list.array[rSetIdx]->resourceType.choice.aperiodic)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
       return RFAILED;
    }
    rsrcSetList->list.array[rSetIdx]->resourceType.choice.aperiodic->aperiodicSRS_ResourceTrigger \
@@ -3762,7 +3779,7 @@ uint8_t BuildBWPUlDedSrsCfg(SRS_Config_t *srsCfg)
         sizeof(struct SRS_Config__srs_ResourceSetToAddModList));
    if(!srsCfg->srs_ResourceSetToAddModList)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedSrsCfg");
       return RFAILED;
    }
    if(BuildSrsRsrcSetAddModList(srsCfg->srs_ResourceSetToAddModList) != ROK)
@@ -3778,7 +3795,7 @@ uint8_t BuildBWPUlDedSrsCfg(SRS_Config_t *srsCfg)
         sizeof(struct SRS_Config__srs_ResourceToAddModList));
    if(!srsCfg->srs_ResourceToAddModList)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedSrsCfg");
       return RFAILED;
    }
 
@@ -3817,7 +3834,7 @@ uint8_t BuildPuschSrvCellCfg(struct UplinkConfig__pusch_ServingCellConfig *pusch
    DU_ALLOC(puschCfg->choice.setup, sizeof(struct PUSCH_ServingCellConfig));
    if(!puschCfg->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
       return RFAILED;
    }
 
@@ -3828,7 +3845,7 @@ uint8_t BuildPuschSrvCellCfg(struct UplinkConfig__pusch_ServingCellConfig *pusch
    DU_ALLOC(puschCfg->choice.setup->ext1, sizeof(struct PUSCH_ServingCellConfig__ext1));
    if(!puschCfg->choice.setup->ext1)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
       return RFAILED;
    }
 
@@ -3836,7 +3853,7 @@ uint8_t BuildPuschSrvCellCfg(struct UplinkConfig__pusch_ServingCellConfig *pusch
    DU_ALLOC(puschCfg->choice.setup->ext1->maxMIMO_Layers, sizeof(long));
    if(!puschCfg->choice.setup->ext1->maxMIMO_Layers)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
       return RFAILED;
    }
    *(puschCfg->choice.setup->ext1->maxMIMO_Layers) = PUSCH_MAX_MIMO_LAYERS;
@@ -3845,7 +3862,7 @@ uint8_t BuildPuschSrvCellCfg(struct UplinkConfig__pusch_ServingCellConfig *pusch
    DU_ALLOC(puschCfg->choice.setup->ext1->processingType2Enabled,sizeof(BOOLEAN_t));
    if(!puschCfg->choice.setup->ext1->processingType2Enabled)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
       return RFAILED;
    }
    *(puschCfg->choice.setup->ext1->processingType2Enabled) = PUSCH_PROCESS_TYPE2_ENABLED;
@@ -3876,7 +3893,7 @@ uint8_t BuildInitialUlBWP(BWP_UplinkDedicated_t *ulBwp)
    DU_ALLOC(ulBwp->pusch_Config, sizeof(struct BWP_UplinkDedicated__pusch_Config));
    if(!ulBwp->pusch_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildInitialUlBWP");
       return RFAILED;
    }
 
@@ -3885,7 +3902,7 @@ uint8_t BuildInitialUlBWP(BWP_UplinkDedicated_t *ulBwp)
    DU_ALLOC(ulBwp->pusch_Config->choice.setup, sizeof(PUSCH_Config_t));
    if(!ulBwp->pusch_Config->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildInitialUlBWP");
       return RFAILED;
    }
 
@@ -3901,7 +3918,7 @@ uint8_t BuildInitialUlBWP(BWP_UplinkDedicated_t *ulBwp)
    DU_ALLOC(ulBwp->srs_Config, sizeof(struct BWP_UplinkDedicated__srs_Config));
    if(!ulBwp->srs_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildInitialUlBWP");
       return RFAILED;
    }
 
@@ -3910,7 +3927,7 @@ uint8_t BuildInitialUlBWP(BWP_UplinkDedicated_t *ulBwp)
    DU_ALLOC(ulBwp->srs_Config->choice.setup, sizeof(SRS_Config_t));
    if(!ulBwp->srs_Config->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildInitialUlBWP");
       return RFAILED;
    }
 
@@ -3945,7 +3962,7 @@ uint8_t BuildUlCfg(UplinkConfig_t *ulCfg)
    DU_ALLOC(ulCfg->initialUplinkBWP, sizeof(BWP_UplinkDedicated_t));
    if(!ulCfg->initialUplinkBWP)
    {
-      DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failed in BuildUlCfg");
       return RFAILED;
    }
 
@@ -3960,7 +3977,7 @@ uint8_t BuildUlCfg(UplinkConfig_t *ulCfg)
    DU_ALLOC(ulCfg->firstActiveUplinkBWP_Id, sizeof(BWP_Id_t));
    if(!ulCfg->firstActiveUplinkBWP_Id)
    {
-      DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failed in BuildUlCfg");
       return RFAILED;
    }
    *(ulCfg->firstActiveUplinkBWP_Id) = ACTIVE_UL_BWP_ID;
@@ -3970,7 +3987,7 @@ uint8_t BuildUlCfg(UplinkConfig_t *ulCfg)
         sizeof(struct UplinkConfig__pusch_ServingCellConfig));
    if(!ulCfg->pusch_ServingCellConfig)
    {
-      DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failed in BuildUlCfg");
       return RFAILED;
    }
 
@@ -4006,7 +4023,7 @@ uint8_t BuildPdschSrvCellCfg(struct ServingCellConfig__pdsch_ServingCellConfig *
    DU_ALLOC(pdschCfg->choice.setup, sizeof( struct PDSCH_ServingCellConfig));
    if(!pdschCfg->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPdschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschSrvCellCfg");
       return RFAILED;
    }
 
@@ -4016,7 +4033,7 @@ uint8_t BuildPdschSrvCellCfg(struct ServingCellConfig__pdsch_ServingCellConfig *
    DU_ALLOC(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH, sizeof(long));
    if(!pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPdschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschSrvCellCfg");
       return RFAILED;
    }
    *(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH)= PDSCH_NUM_HARQ_PROC;
@@ -4068,7 +4085,7 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    DU_ALLOC(srvCellCfg->tdd_UL_DL_ConfigurationDedicated, sizeof(TDD_UL_DL_ConfigDedicated_t));
    if(!srvCellCfg->tdd_UL_DL_ConfigurationDedicated)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
 
@@ -4076,13 +4093,13 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    DU_ALLOC(srvCellCfg->initialDownlinkBWP, sizeof(BWP_DownlinkDedicated_t));
    if(!srvCellCfg->initialDownlinkBWP)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
 
    if(BuildInitialDlBWP(srvCellCfg->initialDownlinkBWP) != ROK)
    {
-      DU_LOG("\nF1AP : BuildInitialDlBWP failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildInitialDlBWP failed");
       return RFAILED;
    }
    srvCellCfg->downlinkBWP_ToReleaseList = NULLP;
@@ -4092,7 +4109,7 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    DU_ALLOC(srvCellCfg->firstActiveDownlinkBWP_Id, sizeof(long));
    if(!srvCellCfg->firstActiveDownlinkBWP_Id)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
    *(srvCellCfg->firstActiveDownlinkBWP_Id) = ACTIVE_DL_BWP_ID;
@@ -4103,7 +4120,7 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    DU_ALLOC(srvCellCfg->defaultDownlinkBWP_Id, sizeof(long));
    if(!srvCellCfg->defaultDownlinkBWP_Id)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
    *(srvCellCfg->defaultDownlinkBWP_Id) = ACTIVE_DL_BWP_ID;
@@ -4112,13 +4129,13 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    DU_ALLOC(srvCellCfg->uplinkConfig, sizeof(UplinkConfig_t));
    if(!srvCellCfg->uplinkConfig)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
 
    if(BuildUlCfg(srvCellCfg->uplinkConfig) != ROK)
    {
-      DU_LOG("\nF1AP : BuildUlCfg failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildUlCfg failed");
       return RFAILED;
    }
    srvCellCfg->supplementaryUplink = NULLP;
@@ -4128,13 +4145,13 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    DU_ALLOC(srvCellCfg->pdsch_ServingCellConfig, sizeof(struct ServingCellConfig__pdsch_ServingCellConfig));
    if(!srvCellCfg->pdsch_ServingCellConfig)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
 
    if(BuildPdschSrvCellCfg(srvCellCfg->pdsch_ServingCellConfig) != ROK)
    {
-      DU_LOG("\nF1AP : BuildPdschSrvCellCfg failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildPdschSrvCellCfg failed");
       return RFAILED;
    }
 
@@ -4143,7 +4160,7 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    DU_ALLOC(srvCellCfg->csi_MeasConfig, sizeof(struct  ServingCellConfig__csi_MeasConfig))
       if(!srvCellCfg->csi_MeasConfig)
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
         return RFAILED;
       }
 
@@ -4186,7 +4203,7 @@ uint8_t BuildSpCellCfg(SpCellConfig_t *spCellCfg)
    DU_ALLOC(spCellCfg->servCellIndex, sizeof(long));
    if(!spCellCfg->servCellIndex)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
       return RFAILED;
    }
    *(spCellCfg->servCellIndex) = SERV_CELL_IDX;
@@ -4197,7 +4214,7 @@ uint8_t BuildSpCellCfg(SpCellConfig_t *spCellCfg)
    DU_ALLOC(spCellCfg->rlmInSyncOutOfSyncThreshold, sizeof(long));
    if(!spCellCfg->rlmInSyncOutOfSyncThreshold)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
       return RFAILED;
    }
    *(spCellCfg->rlmInSyncOutOfSyncThreshold) = RLM_SYNC_OUT_SYNC_THRESHOLD;
@@ -4206,12 +4223,12 @@ uint8_t BuildSpCellCfg(SpCellConfig_t *spCellCfg)
    DU_ALLOC(spCellCfg->spCellConfigDedicated, sizeof(ServingCellConfig_t));
    if(!spCellCfg->spCellConfigDedicated)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
       return RFAILED;
    }
    if(BuildSpCellCfgDed(spCellCfg->spCellConfigDedicated) != ROK)
    {
-      DU_LOG("\nF1AP : BuildSpCellCfgDed failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildSpCellCfgDed failed");
       return RFAILED;
    }
    return ROK;
@@ -4241,7 +4258,7 @@ uint8_t BuildPhyCellGrpCfg(PhysicalCellGroupConfig_t *phyCellGrpCfg)
    DU_ALLOC(phyCellGrpCfg->p_NR_FR1, sizeof(long));
    if(!phyCellGrpCfg->p_NR_FR1)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildPhyCellGrpCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildPhyCellGrpCfg");
       return RFAILED;
    }
    *(phyCellGrpCfg->p_NR_FR1)             = P_NR_FR1;
@@ -4279,13 +4296,13 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg)
    DU_ALLOC(macCellGrpCfg->schedulingRequestConfig, sizeof(struct SchedulingRequestConfig));
    if(!macCellGrpCfg->schedulingRequestConfig)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
       return RFAILED;
    }
 
    if(BuildSchedulingReqConfig(macCellGrpCfg->schedulingRequestConfig) != ROK)
    {
-      DU_LOG("\nF1AP : BuildSchedulingReqConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildSchedulingReqConfig failed");
       return RFAILED;
    }
 
@@ -4293,13 +4310,13 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg)
    DU_ALLOC(macCellGrpCfg->bsr_Config, sizeof(struct BSR_Config));
    if(!macCellGrpCfg->bsr_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
       return RFAILED;
    }
 
    if(BuildBsrConfig(macCellGrpCfg->bsr_Config) != ROK)
    {
-      DU_LOG("\nF1AP : BuildBsrConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildBsrConfig failed");
       return RFAILED;
    }
 
@@ -4307,13 +4324,13 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg)
    DU_ALLOC(macCellGrpCfg->tag_Config, sizeof(struct TAG_Config));
    if(!macCellGrpCfg->tag_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
       return RFAILED;
    }
 
    if(BuildTagConfig(macCellGrpCfg->tag_Config) != ROK)
    {
-      DU_LOG("\nF1AP : BuildTagConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildTagConfig failed");
       return RFAILED;
    }
 
@@ -4321,13 +4338,13 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg)
    DU_ALLOC(macCellGrpCfg->phr_Config, sizeof(struct MAC_CellGroupConfig__phr_Config));
    if(!macCellGrpCfg->phr_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
       return RFAILED;
    }
 
    if(BuildPhrConfig(macCellGrpCfg->phr_Config) != ROK)
    {
-      DU_LOG("\nF1AP : BuildPhrConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildPhrConfig failed");
       return RFAILED;
    }
 
@@ -4452,7 +4469,7 @@ void FreePdschTimeDomAllocList( struct PDSCH_Config__pdsch_TimeDomainAllocationL
  *
  * @return void
  *
4221 * ****************************************************************/
+ * ****************************************************************/
 void FreePuschTimeDomAllocList(PUSCH_Config_t *puschCfg)
 {
    uint8_t idx1=0;
@@ -5024,13 +5041,13 @@ uint8_t BuildDuToCuRrcContainer(DUtoCURRCContainer_t *duToCuRrcContainer)
       DU_ALLOC(cellGrpCfg.rlc_BearerToAddModList, sizeof(struct CellGroupConfigRrc__rlc_BearerToAddModList));
       if(!cellGrpCfg.rlc_BearerToAddModList)
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
         ret = RFAILED;
         break;
       }
       if(BuildRlcBearerToAddModList(cellGrpCfg.rlc_BearerToAddModList) != ROK)
       {
-        DU_LOG("\nF1AP : BuildRlcBearerToAddModList failed");
+        DU_LOG("\nERROR  -->  F1AP : BuildRlcBearerToAddModList failed");
         ret = RFAILED;
         break;
       }
@@ -5040,13 +5057,13 @@ uint8_t BuildDuToCuRrcContainer(DUtoCURRCContainer_t *duToCuRrcContainer)
       DU_ALLOC(cellGrpCfg.mac_CellGroupConfig, sizeof(MAC_CellGroupConfig_t));
       if(!cellGrpCfg.mac_CellGroupConfig)
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
         ret = RFAILED;
         break;
       }
       if(BuildMacCellGrpCfg(cellGrpCfg.mac_CellGroupConfig) != ROK)
       {
-        DU_LOG("\nF1AP : BuildMacCellGrpCfg failed");
+        DU_LOG("\nERROR  -->  F1AP : BuildMacCellGrpCfg failed");
         ret = RFAILED;
         break;
       }
@@ -5055,13 +5072,13 @@ uint8_t BuildDuToCuRrcContainer(DUtoCURRCContainer_t *duToCuRrcContainer)
       DU_ALLOC(cellGrpCfg.physicalCellGroupConfig, sizeof(PhysicalCellGroupConfig_t));
       if(!cellGrpCfg.physicalCellGroupConfig)
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
         ret = RFAILED;
         break;
       }
       if(BuildPhyCellGrpCfg(cellGrpCfg.physicalCellGroupConfig) != ROK)
       {
-        DU_LOG("\nF1AP : BuildPhyCellGrpCfg failed");
+        DU_LOG("\nERROR  -->  F1AP : BuildPhyCellGrpCfg failed");
         ret = RFAILED;
         break;
       }
@@ -5070,13 +5087,13 @@ uint8_t BuildDuToCuRrcContainer(DUtoCURRCContainer_t *duToCuRrcContainer)
       DU_ALLOC(cellGrpCfg.spCellConfig, sizeof(SpCellConfig_t));
       if(!cellGrpCfg.spCellConfig)
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
         ret = RFAILED;
         break;
       }
       if(BuildSpCellCfg(cellGrpCfg.spCellConfig) != ROK)
       {
-        DU_LOG("\nF1AP : BuildSpCellCfg failed");
+        DU_LOG("\nERROR  -->  F1AP : BuildSpCellCfg failed");
         ret = RFAILED;
         break;
       }
@@ -5093,14 +5110,14 @@ uint8_t BuildDuToCuRrcContainer(DUtoCURRCContainer_t *duToCuRrcContainer)
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG( "\n F1AP : Could not encode DuToCuRrcContainer (at %s)\n",\
+        DU_LOG( "\nERROR  --> F1AP : Could not encode DuToCuRrcContainer (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         ret = RFAILED;
         break;
       }
       else
       {
-        DU_LOG("\n F1AP : Created APER encoded buffer for DuToCuRrcContainer\n");
+        DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for DuToCuRrcContainer\n");
         for(int i=0; i< encBufSize; i++)
         {
            printf("%x",encBuf[i]);
@@ -5111,7 +5128,7 @@ uint8_t BuildDuToCuRrcContainer(DUtoCURRCContainer_t *duToCuRrcContainer)
       DU_ALLOC(duToCuRrcContainer->buf, duToCuRrcContainer->size);
       if(!duToCuRrcContainer->buf)
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildDuToCuRrcContainer");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDuToCuRrcContainer");
         ret = RFAILED;
         break;
       }
@@ -5211,7 +5228,7 @@ uint8_t freeInitUlRrcMsgTransfer(F1AP_PDU_t  *f1apMsg)
    }
    else
    {
-      DU_LOG("\nDU_APP : Recevied F1ap Pdu is null at freeInitUlRrcMsgTransfer()");
+      DU_LOG("\nERROR  -->  DU_APP : Recevied F1ap Pdu is null at freeInitUlRrcMsgTransfer()");
       return RFAILED;
    }
    return ROK;
@@ -5247,18 +5264,18 @@ uint8_t BuildAndSendInitialRrcMsgTransfer(uint32_t gnbDuUeF1apId, uint16_t crnti
 
    while(true)
    {
-      DU_LOG("\n F1AP : Building RRC Setup Request\n");
+      DU_LOG("\n INFO   -->  F1AP : Building RRC Setup Request\n");
       DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         break;
       }
       f1apMsg->present = F1AP_PDU_PR_initiatingMessage;
       DU_ALLOC(f1apMsg->choice.initiatingMessage,sizeof(InitiatingMessage_t));
       if(f1apMsg->choice.initiatingMessage == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for  F1AP-PDU failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for  F1AP-PDU failed");
         break;
       }
       f1apMsg->choice.initiatingMessage->procedureCode =\
@@ -5276,7 +5293,7 @@ uint8_t BuildAndSendInitialRrcMsgTransfer(uint32_t gnbDuUeF1apId, uint16_t crnti
       DU_ALLOC(initULRRCMsg->protocolIEs.list.array,initULRRCMsg->protocolIEs.list.size);
       if(initULRRCMsg->protocolIEs.list.array == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for\
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for\
               RRCSetupRequestMessageTransferIEs failed");
         break;
       }
@@ -5336,7 +5353,7 @@ uint8_t BuildAndSendInitialRrcMsgTransfer(uint32_t gnbDuUeF1apId, uint16_t crnti
            initULRRCMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size)
       if(!initULRRCMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf)
       {
-         DU_LOG(" F1AP : Memory allocation for RRCSetupRequestMessageTransferIEs failed");
+         DU_LOG(" ERROR  -->  F1AP : Memory allocation for RRCSetupRequestMessageTransferIEs failed");
          break;
       
       }
@@ -5366,7 +5383,7 @@ uint8_t BuildAndSendInitialRrcMsgTransfer(uint32_t gnbDuUeF1apId, uint16_t crnti
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG( "\n F1AP : Could not encode Initial UL RRC Message Transfer\
+        DU_LOG( "\nERROR  --> F1AP : Could not encode Initial UL RRC Message Transfer\
               structure (at %s)\n",encRetVal.failed_type ? \
               encRetVal.failed_type->name : "unknown");
         ret = RFAILED;
@@ -5375,7 +5392,7 @@ uint8_t BuildAndSendInitialRrcMsgTransfer(uint32_t gnbDuUeF1apId, uint16_t crnti
       else
       {
 
-        DU_LOG("\n F1AP : Created APER encoded buffer for Initial UL RRC\
+        DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for Initial UL RRC\
               Message transfer\n");
         for(int i=0; i< encBufSize; i++)
         {
@@ -5385,7 +5402,7 @@ uint8_t BuildAndSendInitialRrcMsgTransfer(uint32_t gnbDuUeF1apId, uint16_t crnti
       /* Sending  msg  */
       if(SendF1APMsg(DU_APP_MEM_REGION,DU_POOL) != ROK)
       {
-        DU_LOG("\n F1AP : Sending Initial UL RRC Message Transfer Failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending Initial UL RRC Message Transfer Failed");
         ret = RFAILED;
         break;
       }
@@ -5478,7 +5495,7 @@ void freeRlcLcCfg(RlcBearerCfg *lcCfg)
          break;
       }
       default:
-         DU_LOG("\nDU_APP: Invalid Rlc Mode %d at freeRlcLcCfg()", lcCfg->rlcMode);
+         DU_LOG("\nERROR  -->  DU_APP: Invalid Rlc Mode %d at freeRlcLcCfg()", lcCfg->rlcMode);
         break;
    }
    memset(lcCfg, 0, sizeof(LcCfg));
@@ -5514,14 +5531,13 @@ void  freeMacLcCfg(LcCfg *lcCfg)
    }
    memset(lcCfg, 0, sizeof(LcCfg));
 }
-
 /*******************************************************************
  *
  * @brief Free UE NR Capability received in UE Context setup request
  *
  * @details
  *
- *    Function : freeUeNrCapability
+ *    Function : freeAperDecodeUeNrCapability
  *
  *    Functionality:  
  *       Free UE NR Capability received in UE Context setup request
@@ -5531,18 +5547,18 @@ void  freeMacLcCfg(LcCfg *lcCfg)
  *         RFAILED - failure
  *
  * ****************************************************************/
-void freeUeNrCapability(void *ueNrCapability)
+void freeAperDecodeUeNrCapability(void *ueNrCapability)
 {
-   uint8_t idx;
-   FeatureSets_t *featureSets;
+   uint8_t arrIdx =0;
+   FeatureSets_t *featureSets =NULLP;
    UE_NR_Capability_t *ueNrCap = (UE_NR_Capability_t *)ueNrCapability;
 
    if(ueNrCap->rf_Parameters.supportedBandListNR.list.array)
    {
-      for(idx = 0; idx < ueNrCap->rf_Parameters.supportedBandListNR.list.count; idx++)
+      for(arrIdx = 0; arrIdx < ueNrCap->rf_Parameters.supportedBandListNR.list.count; arrIdx++)
       {
-         if(ueNrCap->rf_Parameters.supportedBandListNR.list.array[idx])
-            free(ueNrCap->rf_Parameters.supportedBandListNR.list.array[idx]);
+         if(ueNrCap->rf_Parameters.supportedBandListNR.list.array[arrIdx])
+            free(ueNrCap->rf_Parameters.supportedBandListNR.list.array[arrIdx]);
       }
       free(ueNrCap->rf_Parameters.supportedBandListNR.list.array);
    }
@@ -5554,13 +5570,13 @@ void freeUeNrCapability(void *ueNrCapability)
       {
          if(featureSets->featureSetsDownlinkPerCC->list.array)
          {
-            for(idx = 0; idx < featureSets->featureSetsDownlinkPerCC->list.count; idx++)
+            for(arrIdx = 0; arrIdx < featureSets->featureSetsDownlinkPerCC->list.count; arrIdx++)
             {
-               if(featureSets->featureSetsDownlinkPerCC->list.array[idx])
+               if(featureSets->featureSetsDownlinkPerCC->list.array[arrIdx])
                {
-                  if(featureSets->featureSetsDownlinkPerCC->list.array[idx]->supportedModulationOrderDL)
-                     free(featureSets->featureSetsDownlinkPerCC->list.array[idx]->supportedModulationOrderDL);
-                  free(featureSets->featureSetsDownlinkPerCC->list.array[idx]);
+                  if(featureSets->featureSetsDownlinkPerCC->list.array[arrIdx]->supportedModulationOrderDL)
+                     free(featureSets->featureSetsDownlinkPerCC->list.array[arrIdx]->supportedModulationOrderDL);
+                  free(featureSets->featureSetsDownlinkPerCC->list.array[arrIdx]);
                }
             }
             free(featureSets->featureSetsDownlinkPerCC->list.array);
@@ -5571,13 +5587,13 @@ void freeUeNrCapability(void *ueNrCapability)
       {
          if(featureSets->featureSetsUplinkPerCC->list.array)
          {
-            for(idx = 0; idx < featureSets->featureSetsUplinkPerCC->list.count; idx++)
+            for(arrIdx = 0; arrIdx < featureSets->featureSetsUplinkPerCC->list.count; arrIdx++)
             {
-               if(featureSets->featureSetsUplinkPerCC->list.array[idx])
+               if(featureSets->featureSetsUplinkPerCC->list.array[arrIdx])
                {
-                  if(featureSets->featureSetsUplinkPerCC->list.array[idx]->supportedModulationOrderUL)
-                     free(featureSets->featureSetsUplinkPerCC->list.array[idx]->supportedModulationOrderUL);
-                  free(featureSets->featureSetsUplinkPerCC->list.array[idx]);
+                  if(featureSets->featureSetsUplinkPerCC->list.array[arrIdx]->supportedModulationOrderUL)
+                     free(featureSets->featureSetsUplinkPerCC->list.array[arrIdx]->supportedModulationOrderUL);
+                  free(featureSets->featureSetsUplinkPerCC->list.array[arrIdx]);
                }
             }
             free(featureSets->featureSetsUplinkPerCC->list.array);
@@ -5589,167 +5605,788 @@ void freeUeNrCapability(void *ueNrCapability)
 }
 
 /*******************************************************************
- *
- * @brief Function to free DuUeCfg
- *
- * @details
- *
- *    Function : freeDuUeCfg
- *
- *    Functionality: Function to free DuUeCfg
- *
- * @params[in] DuUeCfg *ueCfg
- * @return void
- *
- * ****************************************************************/
-void freeDuUeCfg(DuUeCfg *ueCfg)
+*
+* @brief Function to free PdcchSearchSpcToAddModList
+         where memory allocated by aper_decoder
+*
+* @details
+*
+*    Function : freeAperDecodePdcchSearchSpcToAddModList 
+*
+*    Functionality: Function to free PdcchSearchSpcToAddModList
+*
+* @params[in] struct PDCCH_Config__searchSpacesToAddModList *searchSpcList
+* @return void
+*
+* ****************************************************************/
+
+void freeAperDecodePdcchSearchSpcToAddModList(struct PDCCH_Config__searchSpacesToAddModList *searchSpcList)
 {
-   uint8_t lcIdx;
+   uint8_t searchSpcArrIdx=0;
+   uint8_t searchSpcArrIdx1=0;
+   struct  SearchSpace *searchSpc=NULLP;
 
-   if(ueCfg->ueNrCapability)
-   {
-      freeUeNrCapability(ueCfg->ueNrCapability);
-      DU_FREE(ueCfg->ueNrCapability, sizeof(UE_NR_Capability_t));
-      ueCfg->ueNrCapability = NULLP;
-   }
-   if(ueCfg->cellGrpCfg)
-   {
-      DU_FREE(ueCfg->cellGrpCfg, sizeof(CellGroupConfigRrc_t));
-      ueCfg->cellGrpCfg = NULLP;
-   }
-   if(ueCfg->ambrCfg)
-   {
-      memset(ueCfg->ambrCfg, 0, sizeof(AmbrCfg));
-      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, ueCfg->ambrCfg, sizeof(AmbrCfg));
-   }
-   for(lcIdx = 0; lcIdx < ueCfg->numRlcLcs; lcIdx++)
-   {
-      freeRlcLcCfg(&ueCfg->rlcLcCfg[lcIdx]);
-   }
-   for(lcIdx = 0; lcIdx < ueCfg->numMacLcs; lcIdx++)
+
+   if(searchSpcList->list.array)
    {
-      freeMacLcCfg(&ueCfg->macLcCfg[lcIdx]);
+      if(searchSpcList->list.array[searchSpcArrIdx1])
+      {
+        searchSpc = searchSpcList->list.array[searchSpcArrIdx1];
+        if(searchSpc->controlResourceSetId)
+        {
+           if(searchSpc->monitoringSlotPeriodicityAndOffset)
+           {
+              if(searchSpc->monitoringSymbolsWithinSlot)
+              {
+                 if(searchSpc->monitoringSymbolsWithinSlot->buf)
+                 {
+                    if(searchSpc->nrofCandidates)
+                    {
+                       if(searchSpc->searchSpaceType)
+                       {
+                          free(searchSpc->searchSpaceType->choice.ue_Specific);
+                          free(searchSpc->searchSpaceType);
+                       }
+                       free(searchSpc->nrofCandidates);
+                    }
+                    free(searchSpc->monitoringSymbolsWithinSlot->buf);
+                 }
+                 free(searchSpc->monitoringSymbolsWithinSlot);
+              }
+              free(searchSpc->monitoringSlotPeriodicityAndOffset);
+           }
+           free(searchSpc->controlResourceSetId);
+        }
+      }
+      for(searchSpcArrIdx = 0; searchSpcArrIdx < searchSpcList->list.count; searchSpcArrIdx++)
+      {
+        free(searchSpcList->list.array[searchSpcArrIdx]);
+      }
+      free(searchSpcList->list.array);
    }
 }
-
 /*******************************************************************
- *
- * @brief Function to free UecontextSetupDb
- *
- * @details
- *
- *    Function : freeF1UeDb
- *
- *    Functionality: Function to free UecontextSetupDb
- *
- * @params[in] UecontextSetupDb *
- * @return void
- *
- * ****************************************************************/
+*
+* @brief Function for free part for the memory allocated by aper_decoder
+* 
+* @details
+*
+*    Function : freeAperDecodeBWPDlDedPdcchConfig
+*
+*    Functionality: Function to free BWPDlDedPdcchConfig
+*
+* @params[in] 
+* @return void
+*
+* ****************************************************************/
 
-void freeF1UeDb(F1UeContextSetupDb *f1UeDb)
+
+void freeAperDecodeBWPDlDedPdcchConfig(BWP_DownlinkDedicated_t *dlBwp)
 {
+   uint8_t arrIdx1=0;
+   uint8_t arrIdx2=0;
+   struct PDCCH_Config *pdcchCfg=NULLP;
+   struct ControlResourceSet *controlRSet=NULLP;
+   struct PDCCH_Config__controlResourceSetToAddModList *controlRSetList=NULLP;
    
-   if(f1UeDb->dlRrcMsg)
+   if(dlBwp->pdcch_Config->choice.setup)
    {
-      if(f1UeDb->dlRrcMsg->rrcMsgPdu)
+      pdcchCfg=dlBwp->pdcch_Config->choice.setup;
+      if(pdcchCfg->controlResourceSetToAddModList)
       {
-         DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL,\
-           f1UeDb->dlRrcMsg->rrcMsgPdu, f1UeDb->dlRrcMsg->rrcMsgSize);
+        controlRSetList = pdcchCfg->controlResourceSetToAddModList;
+        if(controlRSetList->list.array)
+        {
+           controlRSet = controlRSetList->list.array[arrIdx2];
+           if(controlRSet)
+           {
+              if(controlRSet->frequencyDomainResources.buf)
+              {
+                 if(controlRSet->pdcch_DMRS_ScramblingID)
+                 {
+                    if(pdcchCfg->searchSpacesToAddModList)
+                    {
+                       freeAperDecodePdcchSearchSpcToAddModList(pdcchCfg->searchSpacesToAddModList);
+                       free(pdcchCfg->searchSpacesToAddModList);
+                    }
+                    free(controlRSet->pdcch_DMRS_ScramblingID);
+                 }
+                 free(controlRSet->frequencyDomainResources.buf);
+              }
+           }
+           for(arrIdx1 = 0; arrIdx1 <controlRSetList->list.count; arrIdx1++)
+           {
+              free(controlRSetList->list.array[arrIdx1]);
+           }
+           free(controlRSetList->list.array);
+        }
+        free(pdcchCfg->controlResourceSetToAddModList);
       }
-      memset(f1UeDb->dlRrcMsg, 0, sizeof(F1DlRrcMsg));
+      free(dlBwp->pdcch_Config->choice.setup);
    }
-   freeDuUeCfg(&f1UeDb->duUeCfg);
-   memset(f1UeDb, 0, sizeof(F1UeContextSetupDb));
-   DU_FREE(f1UeDb, sizeof(F1UeContextSetupDb));
 }
-
 /*******************************************************************
- *
- * @brief Function to build Am cfg Info
- *
- * @details
- *
- *    Function : extractRlcAmCfg
- *
- *    Functionality: Function to build Am cfg Info
- *
- * @params[in] AmBearerCfg *
- *             void *
- *
- * @return ROK/RFAILED
- *
- * ****************************************************************/
+*
+* @brief Function to free PdschTimeDomAllocationList 
+*     where the memory allocated by aper_decoder
+* 
+* @details
+*
+*    Function : freeAperDecodePdschTimeDomAllocationList
+*
+*    Functionality: Function to free PdschTimeDomAllocationList
+*
+* @params[in] struct PDSCH_Config__pdsch_TimeDomainAllocationList *timeDomAllocList 
+* @return void
+*
+* ****************************************************************/
 
-void extractRlcAmCfg(AmBearerCfg *amCfgToSet, struct RLC_Config__am *rlcAmCfg)
+
+void freeAperDecodePdschTimeDomAllocationList( struct PDSCH_Config__pdsch_TimeDomainAllocationList *timeDomAllocList)
 {
-   if(rlcAmCfg)
-   {
-      /* UL AM */
-      if(rlcAmCfg->dl_AM_RLC.sn_FieldLength)
-      {
-        amCfgToSet->ulAmCfg.snLenUl = *(rlcAmCfg->dl_AM_RLC.sn_FieldLength);
-        amCfgToSet->ulAmCfg.reAssemTmr = rlcAmCfg->dl_AM_RLC.t_Reassembly;
-        amCfgToSet->ulAmCfg.statProhTmr = rlcAmCfg->dl_AM_RLC.t_StatusProhibit;
-      }
+   uint8_t arrIdx=0;
 
-      /* DL AM */
-      if(rlcAmCfg->ul_AM_RLC.sn_FieldLength)
+   if(timeDomAllocList->choice.setup)
+   {
+      if(timeDomAllocList->choice.setup->list.array)
       {
-        amCfgToSet->dlAmCfg.snLenDl = *(rlcAmCfg->ul_AM_RLC.sn_FieldLength);
-        amCfgToSet->dlAmCfg.pollRetxTmr = rlcAmCfg->ul_AM_RLC.t_PollRetransmit;
-        amCfgToSet->dlAmCfg.pollPdu   = rlcAmCfg->ul_AM_RLC.pollPDU;
-        amCfgToSet->dlAmCfg.pollByte  = rlcAmCfg->ul_AM_RLC.pollByte;
-        amCfgToSet->dlAmCfg.maxRetxTh = rlcAmCfg->ul_AM_RLC.maxRetxThreshold;
+        for(arrIdx = 0; arrIdx <timeDomAllocList->choice.setup->list.count ; arrIdx++)
+        {
+           free(timeDomAllocList->choice.setup->list.array[arrIdx]);
+        }
+        free(timeDomAllocList->choice.setup->list.array);
       }
+      free(timeDomAllocList->choice.setup);
    }
 }
 
 /*******************************************************************
- *
- * @brief Function to build Um Bi Info
- *
- * @details
- *
- *    Function : extractRlcUmBiCfg
- *
- *    Functionality: Function to build Um Bi Info
- *
- * @params[in] UmBiDirBearerCfg *
- *             void *
- *
- * @return ROK/RFAILED
- *
- * ****************************************************************/
+*
+* @brief Function to free BWPDlDedPdschConfig 
+*        where the memory allocated by aper_decoder
+*  
+* @details
+*
+*    Function : freeAperDecodeBWPDlDedPdschConfig 
+*
+*    Functionality: Function to free BWPDlDedPdschConfig 
+*
+* @params[in] BWP_DownlinkDedicated_t *dlBwp 
+* @return void
+*
+* ****************************************************************/
 
-void extractRlcUmBiCfg(UmBiDirBearerCfg *umBiCfgToSet, struct RLC_Config__um_Bi_Directional *rlcBiCfg)
+
+void freeAperDecodeBWPDlDedPdschConfig(BWP_DownlinkDedicated_t *dlBwp)
 {
-   if(rlcBiCfg)
+   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)
    {
-      /* UL UM BI DIR Cfg */
-      if(rlcBiCfg->dl_UM_RLC.sn_FieldLength)
+      pdschCfg=dlBwp->pdsch_Config->choice.setup;
+      if(pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA)
       {
-        umBiCfgToSet->ulUmCfg.snLenUlUm  = *(rlcBiCfg->dl_UM_RLC.sn_FieldLength);
-        umBiCfgToSet->ulUmCfg.reAssemTmr = rlcBiCfg->dl_UM_RLC.t_Reassembly;
+        if(pdschCfg->pdsch_TimeDomainAllocationList)
+        {
+           timeDomAllocList=pdschCfg->pdsch_TimeDomainAllocationList;
+           if(pdschCfg->maxNrofCodeWordsScheduledByDCI)
+           {
+              prbBndlType=&pdschCfg->prb_BundlingType;
+              free(prbBndlType->choice.staticBundling);
+              free(pdschCfg->maxNrofCodeWordsScheduledByDCI);
+           }
+           freeAperDecodePdschTimeDomAllocationList(timeDomAllocList);
+           free(pdschCfg->pdsch_TimeDomainAllocationList);
+        }
+        dmrsDlCfg=pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA;
+        if(dmrsDlCfg->choice.setup)
+        {
+           free(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition);
+           free(dmrsDlCfg->choice.setup);
+        }
+        free(pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA);
       }
-
-      /* DL UM BI DIR Cfg */
-      if(rlcBiCfg->ul_UM_RLC.sn_FieldLength)
-        umBiCfgToSet->dlUmCfg.snLenDlUm  = *(rlcBiCfg->ul_UM_RLC.sn_FieldLength);
+      free(dlBwp->pdsch_Config->choice.setup);
    }
 }
-
 /*******************************************************************
- *
- * @brief Function to build Um Ul Info
- *
- * @details
- *
- *    Function : extractRlcUmUlCfg
- *
- *    Functionality: Function to build Um Ul Info
- *
- * @params[in] UmUniDirUlBearerCfg *
+*
+* @brief Function to free PuschTimeDomAllocListCfg
+                 where the memory allocated by aper_decoder
+*
+* @details
+*
+*    Function : freeAperDecodePuschTimeDomAllocListCfg
+*
+*    Functionality: Function to free PuschTimeDomAllocListCfg
+*
+* @params[in] PUSCH_Config_t *puschCfg 
+* @return void
+*
+* ****************************************************************/
+
+
+void freeAperDecodePuschTimeDomAllocListCfg(PUSCH_Config_t *puschCfg)
+{
+   uint8_t arrIdx=0;
+   uint8_t arrIdx1=0;
+   struct PUSCH_Config__pusch_TimeDomainAllocationList *timeDomAllocList_t=NULLP;
+
+   if(puschCfg->pusch_TimeDomainAllocationList)
+   {
+      timeDomAllocList_t=puschCfg->pusch_TimeDomainAllocationList;
+      if(timeDomAllocList_t->choice.setup)
+      {
+        if(timeDomAllocList_t->choice.setup->list.array)
+        {
+           free(timeDomAllocList_t->choice.setup->list.array[arrIdx1]->k2);
+           for(arrIdx = 0; arrIdx<timeDomAllocList_t->choice.setup->list.count; arrIdx++)
+           {
+              free(timeDomAllocList_t->choice.setup->list.array[arrIdx]);
+           }
+           free(timeDomAllocList_t->choice.setup->list.array);
+        }
+        free(timeDomAllocList_t->choice.setup);
+      }
+      free(puschCfg->transformPrecoder);
+      free(puschCfg->pusch_TimeDomainAllocationList);
+   }
+}
+/*******************************************************************
+*
+* @brief Function to free InitialUlBWPConfig where memory allocated by aper_decoder
+*
+* @details
+*
+*    Function : freeAperDecodeInitialUlBWPConfig 
+*
+*    Functionality: Function to free InitialUlBWPConfig
+*
+* @params[in]  BWP_UplinkDedicated_t *ulBwp
+* @return void
+*
+* ****************************************************************/
+
+
+void freeAperDecodeInitialUlBWPConfig(BWP_UplinkDedicated_t *ulBwp)
+{
+   uint8_t  rSetIdx =0;
+   uint8_t  rsrcIdx =0;
+   SRS_Config_t   *srsCfg = NULLP;
+   PUSCH_Config_t *puschCfg = NULLP;
+   struct PUSCH_Config__dmrs_UplinkForPUSCH_MappingTypeA *dmrsUlCfg = NULLP;
+   struct SRS_Config__srs_ResourceSetToAddModList *rsrcSetList = NULLP;
+   struct SRS_ResourceSet__srs_ResourceIdList *rsrcIdList = NULLP;
+   struct SRS_Config__srs_ResourceToAddModList *resourceList = NULLP;
+
+   if(ulBwp->pusch_Config)
+   {
+      if(ulBwp->pusch_Config->choice.setup)
+      {
+        puschCfg=ulBwp->pusch_Config->choice.setup;
+        if(puschCfg->dataScramblingIdentityPUSCH)
+        {
+           if(puschCfg->dmrs_UplinkForPUSCH_MappingTypeA)
+           {
+              freeAperDecodePuschTimeDomAllocListCfg(puschCfg);
+              dmrsUlCfg=puschCfg->dmrs_UplinkForPUSCH_MappingTypeA;
+              if(dmrsUlCfg->choice.setup)
+              {
+                 if(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition)
+                 {
+                    if(dmrsUlCfg->choice.setup->transformPrecodingDisabled)
+                    {
+                       free(dmrsUlCfg->choice.setup->transformPrecodingDisabled->scramblingID0);
+                       free(dmrsUlCfg->choice.setup->transformPrecodingDisabled);
+                    }
+                    free(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition);
+                 }
+                 free(dmrsUlCfg->choice.setup);
+              }
+              free(puschCfg->dmrs_UplinkForPUSCH_MappingTypeA);
+           }
+           free(puschCfg->dataScramblingIdentityPUSCH);
+        }
+        free(ulBwp->pusch_Config->choice.setup);
+      }
+      free(ulBwp->pusch_Config);
+
+      /* Free SRS-Config */
+      if(ulBwp->srs_Config)
+      {
+        if(ulBwp->srs_Config->choice.setup)
+        {
+           srsCfg = ulBwp->srs_Config->choice.setup;
+
+           /* Free Resource Set to add/mod list */
+           if(srsCfg->srs_ResourceSetToAddModList)
+           {
+              rsrcSetList = srsCfg->srs_ResourceSetToAddModList;
+              if(rsrcSetList->list.array)
+              {
+                 rSetIdx = 0;
+
+                 /* Free SRS resource Id list in this SRS resource set */
+                 if(rsrcSetList->list.array[rSetIdx]->srs_ResourceIdList)
+                 {
+                    rsrcIdList =
+                       rsrcSetList->list.array[rSetIdx]->srs_ResourceIdList;
+
+                    if(rsrcIdList->list.array)
+                    {
+                       for(rsrcIdx = 0; rsrcIdx < rsrcIdList->list.count;
+                             rsrcIdx++)
+                       {
+                          free(rsrcIdList->list.array[rsrcIdx]);
+                       }
+                       free(rsrcIdList->list.array);
+                    }
+                    free(rsrcSetList->list.array[rSetIdx]->srs_ResourceIdList);
+                 }
+
+                 /* Free resource type info for this SRS resource set */
+
+                 free(rsrcSetList->list.array[rSetIdx]->resourceType.choice.aperiodic);
+
+                 /* Free memory for each resource set */
+                 for(rSetIdx = 0; rSetIdx < rsrcSetList->list.count; rSetIdx++)
+                 {
+                    free(rsrcSetList->list.array[rSetIdx]);
+                 }
+                 free(rsrcSetList->list.array);
+              }
+              free(srsCfg->srs_ResourceSetToAddModList);
+           }
+
+           /* Free resource to add/modd list */
+           if(srsCfg->srs_ResourceToAddModList)
+           {
+              resourceList = srsCfg->srs_ResourceToAddModList;
+              if(resourceList->list.array)
+              {
+                 rsrcIdx = 0;
+
+                 free(resourceList->list.array[rsrcIdx]->transmissionComb.choice.n2);
+                 free(resourceList->list.array[rsrcIdx]->resourceType.choice.aperiodic);
+
+                 for(rsrcIdx = 0; rsrcIdx < resourceList->list.count; rsrcIdx++)
+                 {
+                    free(resourceList->list.array[rsrcIdx]);
+                 }
+                 free(resourceList->list.array);
+              }
+              free(srsCfg->srs_ResourceToAddModList);
+           }
+
+           free(ulBwp->srs_Config->choice.setup);
+        }
+        free(ulBwp->srs_Config);
+      }
+   }
+}
+/*******************************************************************
+*
+* @brief Function to free initialUplinkBWPConfig where memory allocated by aper_decoder
+*
+* @details
+*
+*    Function : freeAperDecodeinitialUplinkBWPConfig
+*
+*    Functionality: Function to free initialUplinkBWPConfig
+*
+* @params[in] UplinkConfig_t *ulCfg 
+* @return void
+*
+* ****************************************************************/
+
+
+void freeAperDecodeinitialUplinkBWPConfig(UplinkConfig_t *ulCfg)
+{
+   BWP_UplinkDedicated_t *ulBwp=NULLP;
+   struct UplinkConfig__pusch_ServingCellConfig *puschCfg=NULLP;
+   
+   if(ulCfg->initialUplinkBWP)
+   {
+      ulBwp=ulCfg->initialUplinkBWP;
+      if(ulCfg->firstActiveUplinkBWP_Id)
+      {
+        if(ulCfg->pusch_ServingCellConfig)
+        {
+           puschCfg=ulCfg->pusch_ServingCellConfig;
+           if(puschCfg->choice.setup)
+           {
+              if(puschCfg->choice.setup->ext1)
+              {
+                 free(puschCfg->choice.setup->ext1->processingType2Enabled);
+                 free(puschCfg->choice.setup->ext1->maxMIMO_Layers);
+                 free(puschCfg->choice.setup->ext1);
+              }
+              free(puschCfg->choice.setup);
+           }
+           free(ulCfg->pusch_ServingCellConfig);
+        }
+        free(ulCfg->firstActiveUplinkBWP_Id);
+      }
+      freeAperDecodeInitialUlBWPConfig(ulBwp);
+      free(ulCfg->initialUplinkBWP);
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Function to free DuUeCfg
+ *
+ * @details
+ *
+ *    Function : freeDuUeCfg
+ *
+ *    Functionality: Function to free DuUeCfg
+ *
+ * @params[in] DuUeCfg *ueCfg
+ * @return void
+ *
+ * ****************************************************************/
+void freeDuUeCfg(DuUeCfg *ueCfg)
+{
+   uint8_t lcIdx = 0;
+   uint8_t arrIdx = 0;
+   SpCellConfig_t *spCellCfg = NULLP;
+   ServingCellConfig_t *srvCellCfg = NULLP;
+   BWP_DownlinkDedicated_t *dlBwp = NULLP;
+   MAC_CellGroupConfig_t *macCellGrpCfg = NULLP;
+   PhysicalCellGroupConfig_t *phyCellGrpCfg = NULLP;
+   struct CellGroupConfigRrc__rlc_BearerToAddModList *rlcBearerList = NULLP;
+   struct RLC_Config *rlcConfig = NULLP;
+   struct LogicalChannelConfig *macLcConfig = NULLP;
+   struct SchedulingRequestConfig *schedulingRequestConfig = NULLP;
+   struct SchedulingRequestConfig__schedulingRequestToAddModList *schReqList = NULLP;
+   struct TAG_Config *tagConfig = NULLP;
+   struct TAG_Config__tag_ToAddModList *tagList = NULLP;
+   struct MAC_CellGroupConfig__phr_Config *phrConfig = NULLP;
+   struct ServingCellConfig__pdsch_ServingCellConfig *pdschCfg = NULLP;
+   CellGroupConfigRrc_t *cellGrpCfg = ueCfg->cellGrpCfg;
+  
+   if(ueCfg->ueNrCapability)
+   {
+      freeAperDecodeUeNrCapability(ueCfg->ueNrCapability);
+      DU_FREE(ueCfg->ueNrCapability, sizeof(UE_NR_Capability_t));
+      ueCfg->ueNrCapability = NULLP;
+   }
+
+   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);
+      }
+
+      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); 
+        }
+
+        phrConfig = macCellGrpCfg->phr_Config;
+        if(phrConfig)
+        {
+           free(phrConfig->choice.setup); 
+           free(phrConfig); 
+        }
+
+        free(macCellGrpCfg); 
+      }
+
+      phyCellGrpCfg = cellGrpCfg->physicalCellGroupConfig;
+      if(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(srvCellCfg->pdsch_ServingCellConfig)
+                             {
+                                pdschCfg=
+                                   srvCellCfg->pdsch_ServingCellConfig;
+                                if(pdschCfg->choice.setup)
+                                {
+
+                                   free(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH);
+                                   free(pdschCfg->choice.setup);
+                                }
+
+                                free(srvCellCfg->pdsch_ServingCellConfig);
+                             }
+
+                             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(spCellCfg->spCellConfigDedicated);
+              }
+              free(spCellCfg->rlmInSyncOutOfSyncThreshold);
+           }
+           free(spCellCfg->servCellIndex); 
+        }
+        free(spCellCfg);
+      }
+      DU_FREE(ueCfg->cellGrpCfg, sizeof(CellGroupConfigRrc_t));
+      ueCfg->cellGrpCfg = NULLP;
+   }
+   if(ueCfg->ambrCfg)
+   {
+      memset(ueCfg->ambrCfg, 0, sizeof(AmbrCfg));
+      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, ueCfg->ambrCfg, sizeof(AmbrCfg));
+   }
+   for(lcIdx = 0; lcIdx < ueCfg->numRlcLcs; lcIdx++)
+   {
+      freeRlcLcCfg(&ueCfg->rlcLcCfg[lcIdx]);
+   }
+   for(lcIdx = 0; lcIdx < ueCfg->numMacLcs; lcIdx++)
+   {
+      freeMacLcCfg(&ueCfg->macLcCfg[lcIdx]);
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Function to free UecontextSetupDb
+ *
+ * @details
+ *
+ *    Function : freeF1UeDb
+ *
+ *    Functionality: Function to free UecontextSetupDb
+ *
+ * @params[in] UecontextSetupDb *
+ * @return void
+ *
+ * ****************************************************************/
+
+void freeF1UeDb(F1UeContextSetupDb *f1UeDb)
+{
+   
+   if(f1UeDb->dlRrcMsg)
+   {
+      if(f1UeDb->dlRrcMsg->rrcMsgPdu)
+      {
+         DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL,\
+           f1UeDb->dlRrcMsg->rrcMsgPdu, f1UeDb->dlRrcMsg->rrcMsgSize);
+      }
+      memset(f1UeDb->dlRrcMsg, 0, sizeof(F1DlRrcMsg));
+   }
+   freeDuUeCfg(&f1UeDb->duUeCfg);
+   memset(f1UeDb, 0, sizeof(F1UeContextSetupDb));
+   DU_FREE(f1UeDb, sizeof(F1UeContextSetupDb));
+}
+
+/*******************************************************************
+ *
+ * @brief Function to build Am cfg Info
+ *
+ * @details
+ *
+ *    Function : extractRlcAmCfg
+ *
+ *    Functionality: Function to build Am cfg Info
+ *
+ * @params[in] AmBearerCfg *
+ *             void *
+ *
+ * @return ROK/RFAILED
+ *
+ * ****************************************************************/
+
+void extractRlcAmCfg(AmBearerCfg *amCfgToSet, struct RLC_Config__am *rlcAmCfg)
+{
+   if(rlcAmCfg)
+   {
+      /* UL AM */
+      if(rlcAmCfg->dl_AM_RLC.sn_FieldLength)
+      {
+        amCfgToSet->ulAmCfg.snLenUl = *(rlcAmCfg->dl_AM_RLC.sn_FieldLength);
+        amCfgToSet->ulAmCfg.reAssemTmr = rlcAmCfg->dl_AM_RLC.t_Reassembly;
+        amCfgToSet->ulAmCfg.statProhTmr = rlcAmCfg->dl_AM_RLC.t_StatusProhibit;
+      }
+
+      /* DL AM */
+      if(rlcAmCfg->ul_AM_RLC.sn_FieldLength)
+      {
+        amCfgToSet->dlAmCfg.snLenDl = *(rlcAmCfg->ul_AM_RLC.sn_FieldLength);
+        amCfgToSet->dlAmCfg.pollRetxTmr = rlcAmCfg->ul_AM_RLC.t_PollRetransmit;
+        amCfgToSet->dlAmCfg.pollPdu   = rlcAmCfg->ul_AM_RLC.pollPDU;
+        amCfgToSet->dlAmCfg.pollByte  = rlcAmCfg->ul_AM_RLC.pollByte;
+        amCfgToSet->dlAmCfg.maxRetxTh = rlcAmCfg->ul_AM_RLC.maxRetxThreshold;
+      }
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Function to build Um Bi Info
+ *
+ * @details
+ *
+ *    Function : extractRlcUmBiCfg
+ *
+ *    Functionality: Function to build Um Bi Info
+ *
+ * @params[in] UmBiDirBearerCfg *
+ *             void *
+ *
+ * @return ROK/RFAILED
+ *
+ * ****************************************************************/
+
+void extractRlcUmBiCfg(UmBiDirBearerCfg *umBiCfgToSet, struct RLC_Config__um_Bi_Directional *rlcBiCfg)
+{
+   if(rlcBiCfg)
+   {
+      /* UL UM BI DIR Cfg */
+      if(rlcBiCfg->dl_UM_RLC.sn_FieldLength)
+      {
+        umBiCfgToSet->ulUmCfg.snLenUlUm  = *(rlcBiCfg->dl_UM_RLC.sn_FieldLength);
+        umBiCfgToSet->ulUmCfg.reAssemTmr = rlcBiCfg->dl_UM_RLC.t_Reassembly;
+      }
+
+      /* DL UM BI DIR Cfg */
+      if(rlcBiCfg->ul_UM_RLC.sn_FieldLength)
+        umBiCfgToSet->dlUmCfg.snLenDlUm  = *(rlcBiCfg->ul_UM_RLC.sn_FieldLength);
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Function to build Um Ul Info
+ *
+ * @details
+ *
+ *    Function : extractRlcUmUlCfg
+ *
+ *    Functionality: Function to build Um Ul Info
+ *
+ * @params[in] UmUniDirUlBearerCfg *
  *             void *
  *
  * @return ROK/RFAILED
@@ -5856,7 +6493,7 @@ void extractRlcModeCfg(uint8_t rlcMode, RlcBearerCfg *rlcDbCfg, RLC_Config_t *lc
                break;
             }
          default:
-            DU_LOG("\nDUAPP: Invalid rlcMode %d at extractRlcCfgToAddMod()", rlcMode);
+            DU_LOG("\nERROR  -->  DUAPP: Invalid rlcMode %d at extractRlcCfgToAddMod()", rlcMode);
             break;
       }
    }
@@ -6022,7 +6659,7 @@ uint8_t extractDrbCfg(DRBs_ToBeSetup_Item_t *drbItem, LcCfg *macLcToAdd)
            DU_ALLOC_SHRABL_BUF(macLcToAdd->drbQos, sizeof(DrbQosInfo));
            if(macLcToAdd->drbQos == NULLP)
            {
-              DU_LOG("\n DUAPP:Memory failed at allocating DrbQos at extractDrbCfg()");
+              DU_LOG("\nERROR  -->  DUAPP:Memory failed at allocating DrbQos at extractDrbCfg()");
               return RFAILED;
            }
 
@@ -6037,7 +6674,7 @@ uint8_t extractDrbCfg(DRBs_ToBeSetup_Item_t *drbItem, LcCfg *macLcToAdd)
            DU_ALLOC_SHRABL_BUF(macLcToAdd->snssai, sizeof(Snssai));
            if(macLcToAdd->snssai == NULLP)
            {
-              DU_LOG("\n DUAPP:Memory failed at allocating SNSSAI at extractDrbCfg()");
+              DU_LOG("\nERROR  -->  DUAPP : Memory failed at allocating SNSSAI at extractDrbCfg()");
               return RFAILED;
            }
         }
@@ -6062,7 +6699,7 @@ uint8_t extractMacRbCfg(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbCfg, LogicalChan
       ret = extractDrbCfg(drbCfg, lcCfg);
       if(ret == RFAILED)
       {
-         DU_LOG("F1AP: Failed to build Drb Qos at extractMacRbCfg()");
+         DU_LOG("ERROR  -->  F1AP : Failed to build Drb Qos at extractMacRbCfg()");
         return ret;
       }
    }
@@ -6146,7 +6783,7 @@ uint8_t extractRlcCfgToAddMod(struct CellGroupConfigRrc__rlc_BearerToAddModList
         }
         else
         {
-           DU_LOG("\n No components present in Bearer config to ADD/MOD");
+           DU_LOG("\nERROR  -->  No components present in Bearer config to ADD/MOD");
            return RFAILED;
         }
         /* MAC UL LC Config */
@@ -6157,7 +6794,7 @@ uint8_t extractRlcCfgToAddMod(struct CellGroupConfigRrc__rlc_BearerToAddModList
      }
      else
      {
-        DU_LOG("\nDUAPP: Received RadioBearer config is NULL");
+        DU_LOG("\nERROR  -->  DUAPP: Received RadioBearer config is NULL");
         return RFAILED;
      }
      /* RLC Mode Config */
@@ -6174,7 +6811,7 @@ uint8_t extractRlcCfgToAddMod(struct CellGroupConfigRrc__rlc_BearerToAddModList
      ret = procMacLcCfg(lcId, rbType, CONFIG_UNKNOWN, NULL, macUlLcCfg, &ueCfgDb->macLcCfg[idx]);
      if(ret == RFAILED)
      {
-        DU_LOG("\nDUAPP: Failed while filling MAC LC config at extractRlcCfgToAddMod()");
+        DU_LOG("\nERROR  -->  DU APP : Failed while filling MAC LC config at extractRlcCfgToAddMod()");
         return ret;
      }
      (ueCfgDb->numRlcLcs)++;
@@ -6186,611 +6823,1193 @@ uint8_t extractRlcCfgToAddMod(struct CellGroupConfigRrc__rlc_BearerToAddModList
 
 /*******************************************************************
  *
- * @brief DeAlloc pdsch serv cell config info
+ * @brief DeAlloc pdsch serv cell config info
+ *
+ * @details
+ *
+ *    Function : freeMacPdschServCellInfo
+ *
+ *    Functionality: DeAlloc pdsch serv cell config info
+ *
+ * @params[in] PdschServCellCfg pointer
+ * @return void
+ *
+ * ****************************************************************/
+
+void freeMacPdschServCellInfo(PdschServCellCfg *pdsch)
+{
+   if(pdsch->xOverhead)
+   {
+      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, pdsch->xOverhead, sizeof(uint8_t));
+   }
+   if(pdsch->codeBlkGrpFlushInd)
+   {
+      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, pdsch->codeBlkGrpFlushInd, sizeof(bool));
+   }
+   if(pdsch->maxCodeBlkGrpPerTb)
+   {
+      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, pdsch->maxCodeBlkGrpPerTb, sizeof(uint8_t));
+   }
+   if(pdsch->maxMimoLayers)
+   {
+      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, pdsch->maxMimoLayers, sizeof(uint8_t));
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Free Serving cell Info
+ *
+ * @details
+ *
+ *    Function : freeMacServingCellInfo
+ *
+ *    Functionality: Free Serving cell Info
+ *
+ * @params[in] ServCellCfgInfo *srvCellCfg
+ * @return void
+ *
+ * ****************************************************************/
+void freeMacServingCellInfo(ServCellCfgInfo *srvCellCfg)
+{
+   freeMacPdschServCellInfo(&srvCellCfg->pdschServCellCfg);
+   if(srvCellCfg->bwpInactivityTmr)
+   {
+      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, srvCellCfg->bwpInactivityTmr, sizeof(uint8_t));
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Free cell Grp Cfg Info
+ *
+ * @details
+ *
+ *    Function : freeUeReCfgCellGrpInfo
+ *
+ *    Functionality: Free cell Grp Cfg Info
+ *
+ * @params[in] MacUeCfg*  duUeCfg
+ * @return void
+ *
+ * ****************************************************************/
+
+void freeUeReCfgCellGrpInfo(MacUeCfg *macUeCfg)
+{
+   freeMacServingCellInfo(&macUeCfg->spCellCfg.servCellCfg);
+}
+
+/*******************************************************************
+ *
+ * @brief Fills Reconfig SchReqReConfig
+ *
+ * @details
+ *
+ *    Function : extractSchReqReConfig
+ *
+ *    Functionality: Fills Reconfig SchReqReConfig
+ *
+ * @params[in] SchedulingRequestConfig_t *cuSchedReq
+ *             SchedReqCfg*  macSchedReq
+ * @return void
+ *
+ * ****************************************************************/
+void extractSchReqReConfig(SchedulingRequestConfig_t *cuSchedReq, SchedReqCfg *macSchedReq)
+{
+   uint8_t schReqIdx = 0;
+   struct SchedulingRequestConfig__schedulingRequestToAddModList *schReqListToAdd = NULLP;
+   struct SchedulingRequestConfig__schedulingRequestToReleaseList *schReqListToRel = NULLP;
+
+   if(cuSchedReq->schedulingRequestToAddModList)
+   {
+      schReqListToAdd = cuSchedReq->schedulingRequestToAddModList;
+      if(schReqListToAdd->list.count)
+      {
+        macSchedReq->addModListCount = schReqListToAdd->list.count;
+        for(schReqIdx = 0; schReqIdx < schReqListToAdd->list.count; schReqIdx++)
+        {
+           macSchedReq->addModList[schReqIdx].schedReqId = \
+              schReqListToAdd->list.array[schReqIdx]->schedulingRequestId;
+           macSchedReq->addModList[schReqIdx].srProhibitTmr = \
+              *(schReqListToAdd->list.array[schReqIdx]->sr_ProhibitTimer);
+           macSchedReq->addModList[schReqIdx].srTransMax    =\
+              schReqListToAdd->list.array[schReqIdx]->sr_TransMax;
+        }
+      }
+   }
+   /* Scheduling Req To release */
+   if(cuSchedReq->schedulingRequestToReleaseList)
+   {
+      schReqListToRel = cuSchedReq->schedulingRequestToReleaseList;
+      if(schReqListToRel->list.count)
+      {
+        macSchedReq->relListCount = schReqListToRel->list.count;
+        for(schReqIdx = 0; schReqIdx < schReqListToRel->list.count; schReqIdx++)
+        {
+           macSchedReq->relList[schReqIdx] = \
+              *schReqListToRel->list.array[schReqIdx];
+        }
+      }
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Fills TagReconfig
+ *
+ * @details
+ *
+ *    Function : extractTagReconfig
+ *
+ *    Functionality: Fills extractTagReconfig
+ *
+ * @params[in] TAG_Config_t *cuTagCfg
+ *             TagCfg *macTagCfg
+ * @return void
+ *
+ * ****************************************************************/
+
+void extractTagReconfig(TAG_Config_t *cuTagCfg, TagCfg *macTagCfg)
+{
+  uint8_t tagIdx = 0;
+  struct TAG_Config__tag_ToAddModList  *tagListToAddMod = NULLP;
+  struct TAG_Config__tag_ToReleaseList *tagListToRel = NULLP;
+
+  /* Tag config to AddMod */
+  if(cuTagCfg->tag_ToAddModList)
+  {
+     tagListToAddMod = cuTagCfg->tag_ToAddModList; 
+     if(tagListToAddMod->list.count)
+     {
+        macTagCfg->addModListCount = tagListToAddMod->list.count;
+        for(tagIdx = 0; tagIdx < tagListToAddMod->list.count; tagIdx++)
+       {
+           macTagCfg->addModList[tagIdx].tagId =\
+              tagListToAddMod->list.array[tagIdx]->tag_Id;     
+           macTagCfg->addModList[tagIdx].timeAlignTimer = \
+
+              tagListToAddMod->list.array[tagIdx]->timeAlignmentTimer;
+       }
+     }
+  }
+  /* Tag config to release */
+  if(cuTagCfg->tag_ToReleaseList)
+  {
+     tagListToRel = cuTagCfg->tag_ToReleaseList;
+     if(tagListToRel->list.count)
+     {
+        macTagCfg->relListCount = tagListToRel->list.count;
+        for(tagIdx = 0; tagIdx < tagListToRel->list.count; tagIdx++)
+       {
+           macTagCfg->relList[tagIdx] = *tagListToRel->list.array[tagIdx];     
+       }
+     }
+  }
+}
+
+/*******************************************************************
+ *
+ * @brief Fills PdcchCfg received by CU
+ *
+ * @details
+ *
+ *    Function : extractPdcchCfg
+ *
+ *    Functionality: Fills PdcchCfg received  by CU
+ *
+ * @params[in] PDCCH_Config_t *cuPdcchCfg,
+ *             PdcchConfig *duPdcchCfg
+ * @return void
+ *
+ * ****************************************************************/
+
+void extractPdcchCfg(PDCCH_Config_t *cuPdcchCfg, PdcchConfig *macPdcchCfg)
+{
+   uint8_t cRsetIdx = 0;
+   uint8_t srchSpcIdx = 0;
+
+   struct PDCCH_Config__controlResourceSetToAddModList *cRsetToAddModList = NULLP;
+   struct PDCCH_Config__controlResourceSetToReleaseList *cRsetToRelList = NULLP;
+   struct PDCCH_Config__searchSpacesToAddModList *srchSpcToAddModList = NULLP;
+   struct PDCCH_Config__searchSpacesToReleaseList *srchSpcToRelList = NULLP;
+
+
+   /* Control Resource Set To Add/Mod List */
+   if(cuPdcchCfg->controlResourceSetToAddModList)
+   {
+      cRsetToAddModList = cuPdcchCfg->controlResourceSetToAddModList;
+      if(cRsetToAddModList->list.count)
+      {
+         macPdcchCfg->numCRsetToAddMod = cRsetToAddModList->list.count;
+        for(cRsetIdx = 0; cRsetIdx < cRsetToAddModList->list.count; cRsetIdx++)
+        {
+           macPdcchCfg->cRSetToAddModList[cRsetIdx].cRSetId = \
+             cRsetToAddModList->list.array[cRsetIdx]->controlResourceSetId;
+           bitStringToInt(&cRsetToAddModList->list.array[cRsetIdx]->frequencyDomainResources,\
+              macPdcchCfg->cRSetToAddModList[cRsetIdx].freqDomainRsrc);
+            macPdcchCfg->cRSetToAddModList[cRsetIdx].duration = \
+             cRsetToAddModList->list.array[cRsetIdx]->duration;
+
+           macPdcchCfg->cRSetToAddModList[cRsetIdx].cceRegMappingType = \
+             cRsetToAddModList->list.array[cRsetIdx]->cce_REG_MappingType.present;   
+            if(macPdcchCfg->cRSetToAddModList[cRsetIdx].cceRegMappingType == CCE_REG_MAPPINGTYPE_PR_INTERLEAVED)
+           {
+              //TODO: handle the case for Interleaved
+            }
+            macPdcchCfg->cRSetToAddModList[cRsetIdx].precoderGranularity = \
+             cRsetToAddModList->list.array[cRsetIdx]->precoderGranularity;
+           if(cRsetToAddModList->list.array[cRsetIdx]->pdcch_DMRS_ScramblingID)
+           {
+              macPdcchCfg->cRSetToAddModList[cRsetIdx].dmrsScramblingId= \
+                 *(cRsetToAddModList->list.array[cRsetIdx]->pdcch_DMRS_ScramblingID);
+           }
+         }
+      }
+
+   }
+   /* Control Resource Set To Release List */
+   if(cuPdcchCfg->controlResourceSetToReleaseList)
+   {
+      cRsetToRelList = cuPdcchCfg->controlResourceSetToReleaseList;
+      if(cRsetToRelList->list.count)
+      {
+         macPdcchCfg->numCRsetToRel = cRsetToRelList->list.count;
+        for(cRsetIdx = 0; cRsetIdx < cRsetToRelList->list.count; cRsetIdx++)
+        {
+            macPdcchCfg->cRSetToRelList[cRsetIdx] = *(cRsetToRelList->list.array[cRsetIdx]);
+        }
+      }
+   }
+
+   /* Search space To Add/Mod List */
+   if(cuPdcchCfg->searchSpacesToAddModList)
+   {
+      srchSpcToAddModList = cuPdcchCfg->searchSpacesToAddModList;
+      if(srchSpcToAddModList->list.count)
+      {
+         macPdcchCfg->numSearchSpcToAddMod = srchSpcToAddModList->list.count;
+        for(srchSpcIdx = 0; srchSpcIdx < srchSpcToAddModList->list.count; srchSpcIdx++)
+        {
+            macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceId =\
+              srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceId;
+            macPdcchCfg->searchSpcToAddModList[srchSpcIdx].cRSetId =\
+              *(srchSpcToAddModList->list.array[srchSpcIdx]->controlResourceSetId);
+           if(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset)
+           {
+               macPdcchCfg->searchSpcToAddModList[srchSpcIdx].mSlotPeriodicityAndOffset =\
+                 srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset->present;
+            }
+            if(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSymbolsWithinSlot)
+            {
+              bitStringToInt(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSymbolsWithinSlot,\
+                 macPdcchCfg->searchSpcToAddModList[srchSpcIdx].mSymbolsWithinSlot);
+            }
+           if(srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates)
+            {
+             macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel1 = \
+                 srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel1;
+              macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel2 = \
+                 srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel2;
+              macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel4 = \
+                 srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel4;
+              
+              macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel8 = \
+                 srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel8;
+              
+              macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel16 = \
+                 srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel16;
+           }
+            if(srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType)
+           {
+              macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceType =\
+                 srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType->present;
+              if(macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceType == SEARCHSPACETYPE_PR_UE_SPECIFIC)
+              {
+                 macPdcchCfg->searchSpcToAddModList[srchSpcIdx].ueSpecificDciFormat =\
+                    srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType->choice.ue_Specific->dci_Formats;
+              }
+         
+           }
+        }
+      }
+   }
+   /* Search space To Rel List */
+   if(cuPdcchCfg->searchSpacesToReleaseList)
+   {
+      srchSpcToRelList = cuPdcchCfg->searchSpacesToReleaseList;
+      if(srchSpcToRelList->list.count)
+      {
+         macPdcchCfg->numSearchSpcToRel = srchSpcToRelList->list.count;
+        for(srchSpcIdx = 0; srchSpcIdx < srchSpcToRelList->list.count; srchSpcIdx++)
+        {
+            macPdcchCfg->searchSpcToRelList[srchSpcIdx] =\
+              *(srchSpcToRelList->list.array[srchSpcIdx]);
+        }
+      }
+   }
+}
+
+/*******************************************************************
+ *
+ * @brief Fills PdschCfg received by CU
  *
  * @details
  *
- *    Function : freeMacPdschServCellInfo
+ *    Function : extractPdschCfg
  *
- *    Functionality: DeAlloc pdsch serv cell config info
+ *    Functionality: Fills PdschCfg received  by CU
  *
- * @params[in] PdschServCellCfg pointer
+ * @params[in] PDSCH_Config_t *cuPdschCfg,
+ *             PdschConfig *macPdschCfg
  * @return void
  *
  * ****************************************************************/
 
-void freeMacPdschServCellInfo(PdschServCellCfg *pdsch)
+void extractPdschCfg(PDSCH_Config_t *cuPdschCfg, PdschConfig *macPdschCfg)
 {
-   if(pdsch->xOverhead)
+   uint8_t timeDomIdx;
+   struct PDSCH_Config__pdsch_TimeDomainAllocationList *timeDomAlloc = NULLP;
+
+   if(cuPdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA)
    {
-      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, pdsch->xOverhead, sizeof(uint8_t));
+      if(cuPdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA->present == \
+         PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA_PR_setup)
+      {
+         if(cuPdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup)
+        {
+            macPdschCfg->dmrsDlCfgForPdschMapTypeA.addPos = \
+              *(cuPdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition);
+        }
+      }
    }
-   if(pdsch->codeBlkGrpFlushInd)
+   macPdschCfg->resourceAllocType = cuPdschCfg->resourceAllocation;
+   if(cuPdschCfg->pdsch_TimeDomainAllocationList)
    {
-      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, pdsch->codeBlkGrpFlushInd, sizeof(bool));
+      timeDomAlloc = cuPdschCfg->pdsch_TimeDomainAllocationList;
+      if(timeDomAlloc->present ==\
+         PDSCH_Config__pdsch_TimeDomainAllocationList_PR_setup)
+      {
+         if(timeDomAlloc->choice.setup)
+        {
+           macPdschCfg->numTimeDomRsrcAlloc  = timeDomAlloc->choice.setup->list.count;
+            for(timeDomIdx = 0; timeDomIdx < timeDomAlloc->choice.setup->list.count; timeDomIdx++)
+            {
+              macPdschCfg->timeDomRsrcAllociList[timeDomIdx].mappingType = \
+                 timeDomAlloc->choice.setup->list.array[timeDomIdx]->mappingType;
+              macPdschCfg->timeDomRsrcAllociList[timeDomIdx].startSymbolAndLength = \
+                 timeDomAlloc->choice.setup->list.array[timeDomIdx]->startSymbolAndLength;
+           }
+        }
+      }
    }
-   if(pdsch->maxCodeBlkGrpPerTb)
+   macPdschCfg->rbgSize = cuPdschCfg->rbg_Size;
+   if(cuPdschCfg->maxNrofCodeWordsScheduledByDCI)
+      macPdschCfg->numCodeWordsSchByDci = *(cuPdschCfg->maxNrofCodeWordsScheduledByDCI);
+   if(cuPdschCfg->prb_BundlingType.present == PDSCH_Config__prb_BundlingType_PR_staticBundling)
    {
-      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, pdsch->maxCodeBlkGrpPerTb, sizeof(uint8_t));
+      macPdschCfg->bundlingType = cuPdschCfg->prb_BundlingType.present;
+      if(cuPdschCfg->prb_BundlingType.choice.staticBundling)
+      {
+         if(cuPdschCfg->prb_BundlingType.choice.staticBundling->bundleSize)
+        {
+            macPdschCfg->bundlingInfo.StaticBundling.size = \
+              *(cuPdschCfg->prb_BundlingType.choice.staticBundling->bundleSize);
+        }
+      }
    }
-   if(pdsch->maxMimoLayers)
+   else if(cuPdschCfg->prb_BundlingType.present == PDSCH_Config__prb_BundlingType_PR_dynamicBundling)
    {
-      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, pdsch->maxMimoLayers, sizeof(uint8_t));
+      macPdschCfg->bundlingType = cuPdschCfg->prb_BundlingType.present;
    }
+
 }
 
 /*******************************************************************
  *
- * @brief Free Serving cell Info
+ * @brief Fills PdschServingCellCfg received by CU
  *
  * @details
  *
- *    Function : freeMacServingCellInfo
+ *    Function : extractPdschServingCellCfg
  *
- *    Functionality: Free Serving cell Info
+ *    Functionality: Fills PdschCfg received  by CU
  *
- * @params[in] ServCellCfgInfo *srvCellCfg
- * @return void
+ * @params[in] PDSCH_ServingCellConfig_t *cuPdschSrvCellCfg,
+ *             PdschServCellCfg *macUePdschSrvCellCfg
+ * @return ROK/RFAILED
  *
  * ****************************************************************/
-void freeMacServingCellInfo(ServCellCfgInfo *srvCellCfg)
+
+uint8_t extractPdschServingCellCfg(PDSCH_ServingCellConfig_t *cuPdschSrvCellCfg, PdschServCellCfg *macUePdschSrvCellCfg)
 {
-   freeMacPdschServCellInfo(&srvCellCfg->pdschServCellCfg);
-   if(srvCellCfg->bwpInactivityTmr)
+   if(cuPdschSrvCellCfg->codeBlockGroupTransmission)
    {
-      DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, srvCellCfg->bwpInactivityTmr, sizeof(uint8_t));
+      if(cuPdschSrvCellCfg->codeBlockGroupTransmission->choice.setup)
+      {
+         if(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb)
+         {
+            *(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb)  = \
+              cuPdschSrvCellCfg->codeBlockGroupTransmission->choice.setup->maxCodeBlockGroupsPerTransportBlock;
+        }
+        else
+        {
+            DU_ALLOC_SHRABL_BUF(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb, sizeof(uint8_t));
+            if(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb)
+           {
+               *(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb)  = \
+                 cuPdschSrvCellCfg->codeBlockGroupTransmission->choice.setup->maxCodeBlockGroupsPerTransportBlock;
+           }
+           else
+           {
+              DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for maxCodeBlkGrpPerTb at extractPdschServingCellCfg()");
+              return RFAILED;
+           }
+        }
+         if(macUePdschSrvCellCfg->codeBlkGrpFlushInd)
+         {
+            *(macUePdschSrvCellCfg->codeBlkGrpFlushInd)  = \
+              cuPdschSrvCellCfg->codeBlockGroupTransmission->choice.setup->codeBlockGroupFlushIndicator;
+        }
+        else
+        {
+            DU_ALLOC_SHRABL_BUF(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb, sizeof(bool));
+            if(macUePdschSrvCellCfg->codeBlkGrpFlushInd)
+           {
+               *(macUePdschSrvCellCfg->codeBlkGrpFlushInd)  = \
+                 cuPdschSrvCellCfg->codeBlockGroupTransmission->choice.setup->codeBlockGroupFlushIndicator;
+           }
+           else
+           {
+              DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for codeBlkGrpFlushInd at extractPdschServingCellCfg()");
+              return RFAILED;
+           }
+        }
+      }
+   }
+   if(cuPdschSrvCellCfg->nrofHARQ_ProcessesForPDSCH)
+   {
+      macUePdschSrvCellCfg->numHarqProcForPdsch = *(cuPdschSrvCellCfg->nrofHARQ_ProcessesForPDSCH); 
+   }
+   if(cuPdschSrvCellCfg->ext1)
+   {
+      if(cuPdschSrvCellCfg->ext1->maxMIMO_Layers)
+      {
+        if(macUePdschSrvCellCfg->maxMimoLayers)
+       {
+           *(macUePdschSrvCellCfg->maxMimoLayers)  = *(cuPdschSrvCellCfg->ext1->maxMIMO_Layers);
+       }
+       else
+       {
+           DU_ALLOC_SHRABL_BUF(macUePdschSrvCellCfg->maxMimoLayers, sizeof(uint8_t));
+           if(macUePdschSrvCellCfg->maxMimoLayers)
+          {
+              *(macUePdschSrvCellCfg->maxMimoLayers)  = *(cuPdschSrvCellCfg->ext1->maxMIMO_Layers);
+          }
+          else
+          {
+             DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for maxMimoLayers at extractPdschServingCellCfg()");
+             return RFAILED;
+          }
+       }
+      }
+   }
+   if(cuPdschSrvCellCfg->xOverhead)
+   {
+      if(macUePdschSrvCellCfg->xOverhead)
+      {
+         *(macUePdschSrvCellCfg->xOverhead)  = *(cuPdschSrvCellCfg->xOverhead);
+      }
+      else
+      {
+         DU_ALLOC_SHRABL_BUF(macUePdschSrvCellCfg->xOverhead, sizeof(uint8_t));
+         if(macUePdschSrvCellCfg->xOverhead)
+         {
+            *(macUePdschSrvCellCfg->xOverhead)  = *(cuPdschSrvCellCfg->xOverhead);
+         }
+         else
+         {
+            DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for xOverhead at extractPdschServingCellCfg()");
+           return RFAILED;
+         }
+      }
    }
+   return ROK;
 }
 
 /*******************************************************************
  *
- * @brief Free cell Grp Cfg Info
+ * @brief Fills PuschCfg received by CU
  *
  * @details
  *
- *    Function : freeUeReCfgCellGrpInfo
+ *    Function : extractPuschCfg
  *
- *    Functionality: Free cell Grp Cfg Info
+ *    Functionality: Fills PuschCfg received  by CU
  *
- * @params[in] MacUeCfg*  duUeCfg
+ * @params[in] BWP_UplinkDedicated__pusch_Config *cuPuschCfg,
+ *             PuschCfg *macPuschCfg
  * @return void
  *
  * ****************************************************************/
 
-void freeUeReCfgCellGrpInfo(MacUeCfg *macUeCfg)
+void extractPuschCfg(struct BWP_UplinkDedicated__pusch_Config *cuPuschCfg, PuschCfg *macPuschCfg)
 {
-   freeMacServingCellInfo(&macUeCfg->spCellCfg.servCellCfg);
+   uint8_t timeDomIdx = 0;
+   DMRS_UplinkConfig_t *dmrsUlCfg = NULLP;
+   struct PUSCH_Config__pusch_TimeDomainAllocationList *timeDomAllocList = NULLP;
+
+   if(cuPuschCfg->present == BWP_UplinkDedicated__pusch_Config_PR_setup)
+   {
+      if(cuPuschCfg->choice.setup)
+      {
+         if(cuPuschCfg->choice.setup->dataScramblingIdentityPUSCH)
+        {
+             macPuschCfg->dataScramblingId = \
+               *(cuPuschCfg->choice.setup->dataScramblingIdentityPUSCH);
+        }
+        if(cuPuschCfg->choice.setup->dmrs_UplinkForPUSCH_MappingTypeA)
+        {
+           if(cuPuschCfg->choice.setup->dmrs_UplinkForPUSCH_MappingTypeA->present == PUSCH_Config__dmrs_UplinkForPUSCH_MappingTypeA_PR_setup)
+           {
+              if(cuPuschCfg->choice.setup->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup)
+              {
+                 dmrsUlCfg = (cuPuschCfg->choice.setup->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup);
+                 if(dmrsUlCfg->dmrs_AdditionalPosition)
+                 {
+                     macPuschCfg->dmrsUlCfgForPuschMapTypeA.addPos =\
+                       *(dmrsUlCfg->dmrs_AdditionalPosition);
+                 }
+                  if(dmrsUlCfg->transformPrecodingDisabled)
+                 {
+                    if(dmrsUlCfg->transformPrecodingDisabled->scramblingID0)
+                    {
+                       macPuschCfg->dmrsUlCfgForPuschMapTypeA.transPrecodDisabled.scramblingId0 = \
+                          *(dmrsUlCfg->transformPrecodingDisabled->scramblingID0);
+                     }
+                 }
+              }
+           }
+        }
+        /*Res Alloc Type for UL */
+        if(cuPuschCfg->choice.setup->resourceAllocation)
+        {
+            macPuschCfg->resourceAllocType = \
+              cuPuschCfg->choice.setup->resourceAllocation;
+        }
+        if(cuPuschCfg->choice.setup->pusch_TimeDomainAllocationList)
+        {
+           timeDomAllocList = cuPuschCfg->choice.setup->pusch_TimeDomainAllocationList;
+           if(timeDomAllocList->present == PUSCH_Config__pusch_TimeDomainAllocationList_PR_setup)
+           {
+               if(timeDomAllocList->choice.setup)
+              {
+                 macPuschCfg->numTimeDomRsrcAlloc = timeDomAllocList->choice.setup->list.count;
+                 for(timeDomIdx = 0; timeDomIdx <timeDomAllocList->choice.setup->list.count; timeDomIdx++)
+                 {
+                    macPuschCfg->timeDomRsrcAllocList[timeDomIdx].k2 = \
+                       *(timeDomAllocList->choice.setup->list.array[timeDomIdx]->k2);
+                     macPuschCfg->timeDomRsrcAllocList[timeDomIdx].mappingType = \
+                        timeDomAllocList->choice.setup->list.array[timeDomIdx]->mappingType;
+                     macPuschCfg->timeDomRsrcAllocList[timeDomIdx].startSymbolAndLength = \
+                       timeDomAllocList->choice.setup->list.array[timeDomIdx]->startSymbolAndLength;
+                  }
+              }
+           }
+        }
+        if(cuPuschCfg->choice.setup->transformPrecoder)
+            macPuschCfg->transformPrecoder = *(cuPuschCfg->choice.setup->transformPrecoder);
+      }
+   }
 }
 
 /*******************************************************************
  *
- * @brief Fills Reconfig SchReqReConfig
+ * @brief Function to fill pucch Power Control
  *
  * @details
  *
- *    Function : extractSchReqReConfig
+ *    Function : extractPucchPowerControl
  *
- *    Functionality: Fills Reconfig SchReqReConfig
+ *    Functionality: Function to fill pucch Power Control
  *
- * @params[in] SchedulingRequestConfig_t *cuSchedReq
- *             SchedReqCfg*  macSchedReq
+ * @params[in] PucchPowerControl *pwrCtrl,
+ *             struct PUCCH_PowerControl *cuPwrCtrlCfg
  * @return void
  *
  * ****************************************************************/
-void extractSchReqReConfig(SchedulingRequestConfig_t *cuSchedReq, SchedReqCfg *macSchedReq)
+
+void extractPucchPowerControl(PucchPowerControl *pwrCtrl, struct PUCCH_PowerControl *cuPwrCtrlCfg)
 {
-   uint8_t schReqIdx = 0;
-   struct SchedulingRequestConfig__schedulingRequestToAddModList *schReqListToAdd = NULLP;
-   struct SchedulingRequestConfig__schedulingRequestToReleaseList *schReqListToRel = NULLP;
+   uint8_t arrIdx;
 
-   if(cuSchedReq->schedulingRequestToAddModList)
+   if(cuPwrCtrlCfg->deltaF_PUCCH_f0)
+      pwrCtrl->deltaF_Format0 = *cuPwrCtrlCfg->deltaF_PUCCH_f0;
+   if(cuPwrCtrlCfg->deltaF_PUCCH_f1)
+      pwrCtrl->deltaF_Format1 = *cuPwrCtrlCfg->deltaF_PUCCH_f1;
+   if(cuPwrCtrlCfg->deltaF_PUCCH_f2)
+      pwrCtrl->deltaF_Format2 = *cuPwrCtrlCfg->deltaF_PUCCH_f2;
+   if(cuPwrCtrlCfg->deltaF_PUCCH_f3)
+      pwrCtrl->deltaF_Format3 = *cuPwrCtrlCfg->deltaF_PUCCH_f3;
+   if(cuPwrCtrlCfg->deltaF_PUCCH_f4)
+      pwrCtrl->deltaF_Format4 = *cuPwrCtrlCfg->deltaF_PUCCH_f4;
+   if(cuPwrCtrlCfg->p0_Set)
    {
-      schReqListToAdd = cuSchedReq->schedulingRequestToAddModList;
-      if(schReqListToAdd->list.count)
+      pwrCtrl->p0SetCount = cuPwrCtrlCfg->p0_Set->list.count;
+      for(arrIdx=0; arrIdx < pwrCtrl->p0SetCount; arrIdx++)
       {
-        macSchedReq->addModListCount = schReqListToAdd->list.count;
-        for(schReqIdx = 0; schReqIdx < schReqListToAdd->list.count; schReqIdx++)
-        {
-           macSchedReq->addModList[schReqIdx].schedReqId = \
-              schReqListToAdd->list.array[schReqIdx]->schedulingRequestId;
-           macSchedReq->addModList[schReqIdx].srProhibitTmr = \
-              *(schReqListToAdd->list.array[schReqIdx]->sr_ProhibitTimer);
-           macSchedReq->addModList[schReqIdx].srTransMax    =\
-              schReqListToAdd->list.array[schReqIdx]->sr_TransMax;
-        }
+         pwrCtrl->p0Set[arrIdx].p0PucchId =\
+           cuPwrCtrlCfg->p0_Set->list.array[arrIdx]->p0_PUCCH_Id;
+         pwrCtrl->p0Set[arrIdx].p0PucchVal =\
+           cuPwrCtrlCfg->p0_Set->list.array[arrIdx]->p0_PUCCH_Value;
       }
    }
-   /* Scheduling Req To release */
-   if(cuSchedReq->schedulingRequestToReleaseList)
+   if(cuPwrCtrlCfg->pathlossReferenceRSs)
    {
-      schReqListToRel = cuSchedReq->schedulingRequestToReleaseList;
-      if(schReqListToRel->list.count)
+      pwrCtrl->pathLossRefRSListCount = cuPwrCtrlCfg->pathlossReferenceRSs->list.count;
+      for(arrIdx = 0; arrIdx < pwrCtrl->pathLossRefRSListCount; arrIdx++)
       {
-        macSchedReq->relListCount = schReqListToRel->list.count;
-        for(schReqIdx = 0; schReqIdx < schReqListToRel->list.count; schReqIdx++)
-        {
-           macSchedReq->relList[schReqIdx] = \
-              *schReqListToRel->list.array[schReqIdx];
-        }
+         pwrCtrl->pathLossRefRSList[arrIdx].pathLossRefRSId =\
+           cuPwrCtrlCfg->pathlossReferenceRSs->list.array[arrIdx]->pucch_PathlossReferenceRS_Id;
       }
    }
 }
-
-/*******************************************************************
+ /*******************************************************************
  *
- * @brief Fills TagReconfig
+ * @brief Function to extractResrcSetToAddModList sent by CU
  *
  * @details
  *
- *    Function : extractTagReconfig
+ *    Function : extractResrcSetToAddModList
  *
- *    Functionality: Fills extractTagReconfig
+ *    Functionality: Fucntion to extractResrcSetToAddModList
  *
- * @params[in] TAG_Config_t *cuTagCfg
- *             TagCfg *macTagCfg
+ * @params[in] PucchResrcSetCfg pointer,
+ *             struct PUCCH_Config__resourceSetToAddModList pointer
  * @return void
  *
  * ****************************************************************/
 
-void extractTagReconfig(TAG_Config_t *cuTagCfg, TagCfg *macTagCfg)
+void extractResrcSetToAddModList(PucchResrcSetCfg *macRsrcSetList, struct PUCCH_Config__resourceSetToAddModList *cuRsrcSetList)
 {
-  uint8_t tagIdx = 0;
-  struct TAG_Config__tag_ToAddModList  *tagListToAddMod = NULLP;
-  struct TAG_Config__tag_ToReleaseList *tagListToRel = NULLP;
-
-  /* Tag config to AddMod */
-  if(cuTagCfg->tag_ToAddModList)
-  {
-     tagListToAddMod = cuTagCfg->tag_ToAddModList; 
-     if(tagListToAddMod->list.count)
-     {
-        macTagCfg->addModListCount = tagListToAddMod->list.count;
-        for(tagIdx = 0; tagIdx < tagListToAddMod->list.count; tagIdx++)
-       {
-           macTagCfg->addModList[tagIdx].tagId =\
-              tagListToAddMod->list.array[tagIdx]->tag_Id;     
-           macTagCfg->addModList[tagIdx].timeAlignTimer = \
+   uint8_t arrIdx, rsrcListIdx;
 
-              tagListToAddMod->list.array[tagIdx]->timeAlignmentTimer;
-       }
-     }
-  }
-  /* Tag config to release */
-  if(cuTagCfg->tag_ToReleaseList)
-  {
-     tagListToRel = cuTagCfg->tag_ToReleaseList;
-     if(tagListToRel->list.count)
-     {
-        macTagCfg->relListCount = tagListToRel->list.count;
-        for(tagIdx = 0; tagIdx < tagListToRel->list.count; tagIdx++)
-       {
-           macTagCfg->relList[tagIdx] = *tagListToRel->list.array[tagIdx];     
-       }
-     }
-  }
-}
+   macRsrcSetList->resrcSetToAddModListCount = cuRsrcSetList->list.count; 
+   for(arrIdx = 0; arrIdx < macRsrcSetList->resrcSetToAddModListCount; arrIdx++)
+   {
+      macRsrcSetList->resrcSetToAddModList[arrIdx].resrcSetId     =\
+         cuRsrcSetList->list.array[arrIdx]->pucch_ResourceSetId;
+      macRsrcSetList->resrcSetToAddModList[arrIdx].resrcListCount =\
+         cuRsrcSetList->list.array[arrIdx]->resourceList.list.count;
+      for(rsrcListIdx = 0; rsrcListIdx < macRsrcSetList->resrcSetToAddModList[arrIdx].resrcListCount; rsrcListIdx++)
+      {
+         macRsrcSetList->resrcSetToAddModList[arrIdx].resrcList[rsrcListIdx] =\
+            *cuRsrcSetList->list.array[arrIdx]->resourceList.list.array[rsrcListIdx];
+      }
+      macRsrcSetList->resrcSetToAddModList[arrIdx].maxPayLoadSize =\
+         *cuRsrcSetList->list.array[arrIdx]->maxPayloadMinus1;
+   }
+}/* End of extractResrcSetToAddModList */
 
 /*******************************************************************
  *
- * @brief Fills PdcchCfg received by CU
+ * @brief Fills extractResrcToAddModList sent by CU
  *
  * @details
  *
- *    Function : extractPdcchCfg
+ *    Function : extractResrcToAddModList
  *
- *    Functionality: Fills PdcchCfg received  by CU
+ *    Functionality: Fills extractResrcToAddModList
  *
- * @params[in] PDCCH_Config_t *cuPdcchCfg,
- *             PdcchConfig *duPdcchCfg
- * @return void
+ * @params[in] PucchResrcCfg pointer,
+ *             struct PUCCH_Config__resourceToAddModList pointer
+ * @return ROk/RFAILED
  *
  * ****************************************************************/
 
-void extractPdcchCfg(PDCCH_Config_t *cuPdcchCfg, PdcchConfig *macPdcchCfg)
+uint8_t extractResrcToAddModList(PucchResrcCfg *macResrcList, struct PUCCH_Config__resourceToAddModList *cuResrcList)
 {
-   uint8_t cRsetIdx = 0;
-   uint8_t srchSpcIdx = 0;
-
-   struct PDCCH_Config__controlResourceSetToAddModList *cRsetToAddModList = NULLP;
-   struct PDCCH_Config__controlResourceSetToReleaseList *cRsetToRelList = NULLP;
-   struct PDCCH_Config__searchSpacesToAddModList *srchSpcToAddModList = NULLP;
-   struct PDCCH_Config__searchSpacesToReleaseList *srchSpcToRelList = NULLP;
-
-
-   /* Control Resource Set To Add/Mod List */
-   if(cuPdcchCfg->controlResourceSetToAddModList)
+   uint8_t arrIdx;
+   
+   macResrcList->resrcToAddModListCount = cuResrcList->list.count;
+   for(arrIdx = 0; arrIdx < macResrcList->resrcToAddModListCount; arrIdx++)
    {
-      cRsetToAddModList = cuPdcchCfg->controlResourceSetToAddModList;
-      if(cRsetToAddModList->list.count)
+      macResrcList->resrcToAddModList[arrIdx].resrcId      =\
+        cuResrcList->list.array[arrIdx]->pucch_ResourceId; 
+      macResrcList->resrcToAddModList[arrIdx].startPrb     =\
+        cuResrcList->list.array[arrIdx]->startingPRB;
+      if(cuResrcList->list.array[arrIdx]->intraSlotFrequencyHopping)
       {
-         macPdcchCfg->numCRsetToAddMod = cRsetToAddModList->list.count;
-        for(cRsetIdx = 0; cRsetIdx < cRsetToAddModList->list.count; cRsetIdx++)
+         macResrcList->resrcToAddModList[arrIdx].intraFreqHop =\
+           *cuResrcList->list.array[arrIdx]->intraSlotFrequencyHopping;
+      }
+      if(cuResrcList->list.array[arrIdx]->secondHopPRB)
+      {
+         macResrcList->resrcToAddModList[arrIdx].secondPrbHop =\
+           *cuResrcList->list.array[arrIdx]->secondHopPRB;
+      }
+      /* PUCCH RSRC FORMAT */
+      if(cuResrcList->list.array[arrIdx]->format.present == PUCCH_Resource__format_PR_format0)
+      {
+         macResrcList->resrcToAddModList[arrIdx].pucchFormat = PUCCH_FORMAT_0;
+         if(cuResrcList->list.array[arrIdx]->format.choice.format0)
         {
-           macPdcchCfg->cRSetToAddModList[cRsetIdx].cRSetId = \
-             cRsetToAddModList->list.array[cRsetIdx]->controlResourceSetId;
-           bitStringToInt(&cRsetToAddModList->list.array[cRsetIdx]->frequencyDomainResources,\
-              macPdcchCfg->cRSetToAddModList[cRsetIdx].freqDomainRsrc);
-            macPdcchCfg->cRSetToAddModList[cRsetIdx].duration = \
-             cRsetToAddModList->list.array[cRsetIdx]->duration;
-
-           macPdcchCfg->cRSetToAddModList[cRsetIdx].cceRegMappingType = \
-             cRsetToAddModList->list.array[cRsetIdx]->cce_REG_MappingType.present;   
-            if(macPdcchCfg->cRSetToAddModList[cRsetIdx].cceRegMappingType == CCE_REG_MAPPINGTYPE_PR_INTERLEAVED)
-           {
-              //TODO: handle the case for Interleaved
-            }
-            macPdcchCfg->cRSetToAddModList[cRsetIdx].precoderGranularity = \
-             cRsetToAddModList->list.array[cRsetIdx]->precoderGranularity;
-           if(cRsetToAddModList->list.array[cRsetIdx]->pdcch_DMRS_ScramblingID)
+           DU_ALLOC_SHRABL_BUF(macResrcList->resrcToAddModList[arrIdx].PucchFormat.format0, sizeof(PucchFormat0));
+           if(macResrcList->resrcToAddModList[arrIdx].PucchFormat.format0 == NULLP)
            {
-              macPdcchCfg->cRSetToAddModList[cRsetIdx].dmrsScramblingId= \
-                 *(cRsetToAddModList->list.array[cRsetIdx]->pdcch_DMRS_ScramblingID);
+               DU_LOG("\nERROR  --> F1AP : Failed to allocate memory for Format0 in extractResrcToAddModList()");
+              return RFAILED;
            }
-         }
+           macResrcList->resrcToAddModList[arrIdx].PucchFormat.format0->initialCyclicShift =\
+               cuResrcList->list.array[arrIdx]->format.choice.format0->initialCyclicShift;
+           macResrcList->resrcToAddModList[arrIdx].PucchFormat.format0->numSymbols =\
+               cuResrcList->list.array[arrIdx]->format.choice.format0->nrofSymbols;
+           macResrcList->resrcToAddModList[arrIdx].PucchFormat.format0->startSymbolIdx =\
+               cuResrcList->list.array[arrIdx]->format.choice.format0->startingSymbolIndex;
+        }
       }
-
-   }
-   /* Control Resource Set To Release List */
-   if(cuPdcchCfg->controlResourceSetToReleaseList)
-   {
-      cRsetToRelList = cuPdcchCfg->controlResourceSetToReleaseList;
-      if(cRsetToRelList->list.count)
+      else if(cuResrcList->list.array[arrIdx]->format.present == PUCCH_Resource__format_PR_format1)
       {
-         macPdcchCfg->numCRsetToRel = cRsetToRelList->list.count;
-        for(cRsetIdx = 0; cRsetIdx < cRsetToRelList->list.count; cRsetIdx++)
+         macResrcList->resrcToAddModList[arrIdx].pucchFormat = PUCCH_FORMAT_1;
+         if(cuResrcList->list.array[arrIdx]->format.choice.format1)
         {
-            macPdcchCfg->cRSetToRelList[cRsetIdx] = *(cRsetToRelList->list.array[cRsetIdx]);
+            DU_ALLOC_SHRABL_BUF(macResrcList->resrcToAddModList[arrIdx].PucchFormat.format1, sizeof(PucchFormat1));
+           if(macResrcList->resrcToAddModList[arrIdx].PucchFormat.format1 == NULLP)
+           {
+               DU_LOG("\nERROR  --> F1AP : Failed to allocate memory for Format1 in extractResrcToAddModList()");
+              return RFAILED;
+           }
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format1->initialCyclicShift =\
+                cuResrcList->list.array[arrIdx]->format.choice.format1->initialCyclicShift;
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format1->numSymbols =\
+                cuResrcList->list.array[arrIdx]->format.choice.format1->nrofSymbols;
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format1->startSymbolIdx =\
+                cuResrcList->list.array[arrIdx]->format.choice.format1->startingSymbolIndex;
+           macResrcList->resrcToAddModList[arrIdx].PucchFormat.format1->timeDomOCC =\
+                cuResrcList->list.array[arrIdx]->format.choice.format1->timeDomainOCC;
         }
       }
-   }
-
-   /* Search space To Add/Mod List */
-   if(cuPdcchCfg->searchSpacesToAddModList)
-   {
-      srchSpcToAddModList = cuPdcchCfg->searchSpacesToAddModList;
-      if(srchSpcToAddModList->list.count)
+      else if(cuResrcList->list.array[arrIdx]->format.present == PUCCH_Resource__format_PR_format2)
       {
-         macPdcchCfg->numSearchSpcToAddMod = srchSpcToAddModList->list.count;
-        for(srchSpcIdx = 0; srchSpcIdx < srchSpcToAddModList->list.count; srchSpcIdx++)
+         macResrcList->resrcToAddModList[arrIdx].pucchFormat = PUCCH_FORMAT_2;
+         if(cuResrcList->list.array[arrIdx]->format.choice.format2)
         {
-            macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceId =\
-              srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceId;
-            macPdcchCfg->searchSpcToAddModList[srchSpcIdx].cRSetId =\
-              *(srchSpcToAddModList->list.array[srchSpcIdx]->controlResourceSetId);
-           if(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset)
-           {
-               macPdcchCfg->searchSpcToAddModList[srchSpcIdx].mSlotPeriodicityAndOffset =\
-                 srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset->present;
-            }
-            if(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSymbolsWithinSlot)
-            {
-              bitStringToInt(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSymbolsWithinSlot,\
-                 macPdcchCfg->searchSpcToAddModList[srchSpcIdx].mSymbolsWithinSlot);
-            }
-           if(srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates)
-            {
-             macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel1 = \
-                 srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel1;
-              macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel2 = \
-                 srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel2;
-              macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel4 = \
-                 srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel4;
-              
-              macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel8 = \
-                 srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel8;
-              
-              macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel16 = \
-                 srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel16;
-           }
-            if(srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType)
+           DU_ALLOC_SHRABL_BUF(macResrcList->resrcToAddModList[arrIdx].PucchFormat.format2, sizeof(PucchFormat2_3));
+           if(macResrcList->resrcToAddModList[arrIdx].PucchFormat.format2 == NULLP)
            {
-              macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceType =\
-                 srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType->present;
-              if(macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceType == SEARCHSPACETYPE_PR_UE_SPECIFIC)
-              {
-                 macPdcchCfg->searchSpcToAddModList[srchSpcIdx].ueSpecificDciFormat =\
-                    srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType->choice.ue_Specific->dci_Formats;
-              }
-         
+               DU_LOG("\nERROR  --> F1AP : Failed to allocate memory for Format2 in extractResrcToAddModList()");
+              return RFAILED;
            }
-        }
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format2->numPrbs =\
+                cuResrcList->list.array[arrIdx]->format.choice.format2->nrofPRBs;
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format2->numSymbols =\
+                cuResrcList->list.array[arrIdx]->format.choice.format2->nrofSymbols;
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format2->startSymbolIdx =\
+                cuResrcList->list.array[arrIdx]->format.choice.format2->startingSymbolIndex;
+         }
       }
-   }
-   /* Search space To Rel List */
-   if(cuPdcchCfg->searchSpacesToReleaseList)
-   {
-      srchSpcToRelList = cuPdcchCfg->searchSpacesToReleaseList;
-      if(srchSpcToRelList->list.count)
+      else if(cuResrcList->list.array[arrIdx]->format.present == PUCCH_Resource__format_PR_format3)
       {
-         macPdcchCfg->numSearchSpcToRel = srchSpcToRelList->list.count;
-        for(srchSpcIdx = 0; srchSpcIdx < srchSpcToRelList->list.count; srchSpcIdx++)
+         macResrcList->resrcToAddModList[arrIdx].pucchFormat = PUCCH_FORMAT_3;
+         if(cuResrcList->list.array[arrIdx]->format.choice.format3)
         {
-            macPdcchCfg->searchSpcToRelList[srchSpcIdx] =\
-              *(srchSpcToRelList->list.array[srchSpcIdx]);
+           DU_ALLOC_SHRABL_BUF(macResrcList->resrcToAddModList[arrIdx].PucchFormat.format3, sizeof(PucchFormat2_3));
+           if(macResrcList->resrcToAddModList[arrIdx].PucchFormat.format3 == NULLP)
+           {
+               DU_LOG("\nERROR  --> F1AP : Failed to allocate memory for Format3 in extractResrcToAddModList()");
+              return RFAILED;
+           }
+           macResrcList->resrcToAddModList[arrIdx].PucchFormat.format3->numPrbs =\
+                cuResrcList->list.array[arrIdx]->format.choice.format3->nrofPRBs;
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format3->numSymbols =\
+                cuResrcList->list.array[arrIdx]->format.choice.format3->nrofSymbols;
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format3->startSymbolIdx =\
+                cuResrcList->list.array[arrIdx]->format.choice.format3->startingSymbolIndex;
+         }
+      }
+      else if(cuResrcList->list.array[arrIdx]->format.present == PUCCH_Resource__format_PR_format4)
+      {
+         macResrcList->resrcToAddModList[arrIdx].pucchFormat = PUCCH_FORMAT_4;
+         if(cuResrcList->list.array[arrIdx]->format.choice.format4)
+         {
+           DU_ALLOC_SHRABL_BUF(macResrcList->resrcToAddModList[arrIdx].PucchFormat.format4, sizeof(PucchFormat4));
+           if(macResrcList->resrcToAddModList[arrIdx].PucchFormat.format4 == NULLP)
+           {
+               DU_LOG("\nERROR  --> F1AP : Failed to allocate memory for Format4 in extractResrcToAddModList()");
+              return RFAILED;
+           }
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format4->numSymbols =\
+                cuResrcList->list.array[arrIdx]->format.choice.format4->nrofSymbols;
+           macResrcList->resrcToAddModList[arrIdx].PucchFormat.format4->occLen =\
+                cuResrcList->list.array[arrIdx]->format.choice.format4->occ_Length;
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format4->occIdx =\
+                cuResrcList->list.array[arrIdx]->format.choice.format4->occ_Index;
+            macResrcList->resrcToAddModList[arrIdx].PucchFormat.format4->startSymbolIdx =\
+                cuResrcList->list.array[arrIdx]->format.choice.format4->startingSymbolIndex;
         }
       }
    }
-}
+   return ROK;
+
+}/* End of extractResrcToAddModList */
 
 /*******************************************************************
  *
- * @brief Fills PdschCfg received by CU
+ * @brief Fills fillPucchSchedReqPeriodAndOffset sent by CU
  *
  * @details
  *
- *    Function : extractPdschCfg
+ *    Function : fillPucchSchedReqPeriodAndOffset
  *
- *    Functionality: Fills PdschCfg received  by CU
+ *    Functionality: To fillPucchSchedReqPeriodAndOffset
  *
- * @params[in] PDSCH_Config_t *cuPdschCfg,
- *             PdschConfig *macPdschCfg
+ * @params[in] macPeriodicty,
+ *     SchedulingRequestResourceConfig__periodicityAndOffset pointer
  * @return void
  *
  * ****************************************************************/
 
-void extractPdschCfg(PDSCH_Config_t *cuPdschCfg, PdschConfig *macPdschCfg)
+void fillPucchSchedReqPeriodAndOffset(uint8_t macPeriodicty, uint16_t  macOffset,\
+   struct SchedulingRequestResourceConfig__periodicityAndOffset *cuPeriodicty)
 {
-   uint8_t timeDomIdx;
-   struct PDSCH_Config__pdsch_TimeDomainAllocationList *timeDomAlloc = NULLP;
-
-   if(cuPdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA)
+   macPeriodicty = cuPeriodicty->present;
+   switch(macPeriodicty)
    {
-      if(cuPdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA->present == \
-         PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA_PR_setup)
-      {
-         if(cuPdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup)
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sym2:
         {
-            macPdschCfg->dmrsDlCfgForPdschMapTypeA.addPos = \
-              *(cuPdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition);
+           macOffset     = cuPeriodicty->choice.sym2;
+           break;
         }
-      }
-   }
-   macPdschCfg->resourceAllocType = cuPdschCfg->resourceAllocation;
-   if(cuPdschCfg->pdsch_TimeDomainAllocationList)
-   {
-      timeDomAlloc = cuPdschCfg->pdsch_TimeDomainAllocationList;
-      if(timeDomAlloc->present ==\
-         PDSCH_Config__pdsch_TimeDomainAllocationList_PR_setup)
-      {
-         if(timeDomAlloc->choice.setup)
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sym6or7:
         {
-           macPdschCfg->numTimeDomRsrcAlloc  = timeDomAlloc->choice.setup->list.count;
-            for(timeDomIdx = 0; timeDomIdx < timeDomAlloc->choice.setup->list.count; timeDomIdx++)
-            {
-              macPdschCfg->timeDomRsrcAllociList[timeDomIdx].mappingType = \
-                 timeDomAlloc->choice.setup->list.array[timeDomIdx]->mappingType;
-              macPdschCfg->timeDomRsrcAllociList[timeDomIdx].startSymbolAndLength = \
-                 timeDomAlloc->choice.setup->list.array[timeDomIdx]->startSymbolAndLength;
-           }
+           macOffset     = cuPeriodicty->choice.sym6or7;
+           break;
         }
-      }
-   }
-   macPdschCfg->rbgSize = cuPdschCfg->rbg_Size;
-   if(cuPdschCfg->maxNrofCodeWordsScheduledByDCI)
-      macPdschCfg->numCodeWordsSchByDci = *(cuPdschCfg->maxNrofCodeWordsScheduledByDCI);
-   if(cuPdschCfg->prb_BundlingType.present == PDSCH_Config__prb_BundlingType_PR_staticBundling)
-   {
-      macPdschCfg->bundlingType = cuPdschCfg->prb_BundlingType.present;
-      if(cuPdschCfg->prb_BundlingType.choice.staticBundling)
-      {
-         if(cuPdschCfg->prb_BundlingType.choice.staticBundling->bundleSize)
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl1:
         {
-            macPdschCfg->bundlingInfo.StaticBundling.size = \
-              *(cuPdschCfg->prb_BundlingType.choice.staticBundling->bundleSize);
+           macOffset     = cuPeriodicty->choice.sl1;
+           break;
         }
-      }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl2:
+        {
+           macOffset = cuPeriodicty->choice.sl2;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl4:
+        {
+           macOffset = cuPeriodicty->choice.sl4;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl5:
+        {
+           macOffset = cuPeriodicty->choice.sl5;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl8:
+        {
+           macOffset = cuPeriodicty->choice.sl8;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10:
+        {
+           macOffset = cuPeriodicty->choice.sl10;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl16:
+        {
+           macOffset = cuPeriodicty->choice.sl16;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl20:
+        {
+           macOffset = cuPeriodicty->choice.sl20;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl40:
+        {
+           macOffset = cuPeriodicty->choice.sl40;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl80:
+        {
+           macOffset = cuPeriodicty->choice.sl80;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl160:
+        {
+           macOffset = cuPeriodicty->choice.sl160;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl320:
+        {
+           macOffset = cuPeriodicty->choice.sl320;
+           break;
+        }
+      case SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl640:
+        {
+           macOffset = cuPeriodicty->choice.sl640;
+           break;
+        }
+      default :
+         DU_LOG("\nERROR  -->  F1AP : Invalid periodicity %d", macPeriodicty);
    }
-   else if(cuPdschCfg->prb_BundlingType.present == PDSCH_Config__prb_BundlingType_PR_dynamicBundling)
+}
+
+/*******************************************************************
+ *
+ * @brief Function to extractPucchFormatCfg sent by CU
+ *
+ * @details
+ *
+ *    Function : extractPucchFormatCfg
+ *
+ *    Functionality: Function to extractPucchFormatCfg
+ *
+ * @params[in] PucchFormatCfg pointer,
+ *             PUCCH_FormatConfig_t pointer
+ * @return void
+ *
+ * ****************************************************************/
+
+void extractPucchFormatCfg(PucchFormatCfg *macFormatCfg, PUCCH_FormatConfig_t *cuFormatCfg)
+ {
+    if(cuFormatCfg->interslotFrequencyHopping)
+       macFormatCfg->interSlotFreqHop = *cuFormatCfg->interslotFrequencyHopping;
+    if(cuFormatCfg->additionalDMRS)  
+       macFormatCfg->addDmrs = *cuFormatCfg->additionalDMRS;
+    if(cuFormatCfg->maxCodeRate)
+       macFormatCfg->maxCodeRate = *cuFormatCfg->maxCodeRate;
+    if(cuFormatCfg->nrofSlots)  
+       macFormatCfg->numSlots = *cuFormatCfg->nrofSlots;
+    if(cuFormatCfg->pi2BPSK)  
+       macFormatCfg->pi2BPSK = *cuFormatCfg->pi2BPSK;
+    if(cuFormatCfg->simultaneousHARQ_ACK_CSI)  
+       macFormatCfg->harqAckCSI = *cuFormatCfg->simultaneousHARQ_ACK_CSI;
+ }/* End of extractPucchFormatCfg */
+
+/*******************************************************************
+ *
+ * @brief Function to extractSchedReqCfgToAddMod sent by CU
+ *
+ * @details
+ *
+ *    Function : extractSchedReqCfgToAddMod
+ *
+ *    Functionality: Function to extractSchedReqCfgToAddMod
+ *
+ * @params[in] PucchSchedReqCfg pointer,
+ *      PUCCH_Config__schedulingRequestResourceToAddModList pointer
+ * @return void
+ *
+ * ****************************************************************/
+
+void extractSchedReqCfgToAddMod(PucchSchedReqCfg *macSchedReqCfg, struct PUCCH_Config__schedulingRequestResourceToAddModList *cuSchedReqList)
+{
+   uint8_t arrIdx;
+
+   macSchedReqCfg->schedAddModListCount = cuSchedReqList->list.count;
+   for(arrIdx = 0; arrIdx <  macSchedReqCfg->schedAddModListCount; arrIdx++)
    {
-      macPdschCfg->bundlingType = cuPdschCfg->prb_BundlingType.present;
+      macSchedReqCfg->schedAddModList[arrIdx].resrcId =\
+         cuSchedReqList->list.array[arrIdx]->schedulingRequestResourceId;
+      macSchedReqCfg->schedAddModList[arrIdx].requestId =\
+         cuSchedReqList->list.array[arrIdx]->schedulingRequestID;
+      if(cuSchedReqList->list.array[arrIdx]->periodicityAndOffset)
+      {
+         fillPucchSchedReqPeriodAndOffset(macSchedReqCfg->schedAddModList[arrIdx].periodicity,\
+           macSchedReqCfg->schedAddModList[arrIdx].offset, cuSchedReqList->list.array[arrIdx]->periodicityAndOffset);
+      }
+      if(cuSchedReqList->list.array[arrIdx]->resource)
+      {
+         macSchedReqCfg->schedAddModList[arrIdx].resrc =\
+           *cuSchedReqList->list.array[arrIdx]->resource;
+      }
    }
 
-}
+}/* End of extractSchedReqCfgToAddMod */
 
-/*******************************************************************
+ /*******************************************************************
  *
- * @brief Fills PdschServingCellCfg received by CU
+ * @brief Fills PucchCfg received by CU
  *
  * @details
  *
- *    Function : extractPdschServingCellCfg
+ *    Function : extractPucchCfg
  *
- *    Functionality: Fills PdschCfg received  by CU
+ *    Functionality: Fills PucchCfg received  by CU
  *
- * @params[in] PDSCH_ServingCellConfig_t *cuPdschSrvCellCfg,
- *             PdschServCellCfg *macUePdschSrvCellCfg
+ * @params[in] BWP_UplinkDedicated__pucch_Config *cuPucchCfg,
+ *             PucchCfg *macPucchCfg
  * @return ROK/RFAILED
  *
  * ****************************************************************/
 
-uint8_t extractPdschServingCellCfg(PDSCH_ServingCellConfig_t *cuPdschSrvCellCfg, PdschServCellCfg *macUePdschSrvCellCfg)
+uint8_t extractPucchCfg(struct BWP_UplinkDedicated__pucch_Config *cuPucchCfg, PucchCfg *macPucchCfg)         
 {
-   if(cuPdschSrvCellCfg->codeBlockGroupTransmission)
+   uint8_t arrIdx;
+
+   if(cuPucchCfg->present == BWP_UplinkDedicated__pucch_Config_PR_setup)
    {
-      if(cuPdschSrvCellCfg->codeBlockGroupTransmission->choice.setup)
+      if(cuPucchCfg->choice.setup)
       {
-         if(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb)
-         {
-            *(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb)  = \
-              cuPdschSrvCellCfg->codeBlockGroupTransmission->choice.setup->maxCodeBlockGroupsPerTransportBlock;
-        }
-        else
+         /* Resource Set Cfg */ 
+        if(cuPucchCfg->choice.setup->resourceSetToAddModList)
         {
-            DU_ALLOC_SHRABL_BUF(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb, sizeof(uint8_t));
-            if(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb)
+           DU_ALLOC_SHRABL_BUF(macPucchCfg->resrcSet, sizeof(PucchResrcSetCfg));
+           if(macPucchCfg->resrcSet == NULLP)
            {
-               *(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb)  = \
-                 cuPdschSrvCellCfg->codeBlockGroupTransmission->choice.setup->maxCodeBlockGroupsPerTransportBlock;
+              DU_LOG("\nERROR --> F1AP : Failed to extract Resrc set List in extractPucchCfg()");
+              return RFAILED;
            }
-           else
+           memset(macPucchCfg->resrcSet, 0, sizeof(PucchResrcSetCfg));
+            extractResrcSetToAddModList(macPucchCfg->resrcSet, cuPucchCfg->choice.setup->resourceSetToAddModList);
+        }
+         
+        /* Resource Cfg */ 
+        if(cuPucchCfg->choice.setup->resourceToAddModList)
+        {
+            DU_ALLOC_SHRABL_BUF(macPucchCfg->resrc, sizeof(PucchResrcCfg));
+           if(macPucchCfg->resrc == NULLP)
            {
-              DU_LOG("\nDUAPP: Memory allocation failed for maxCodeBlkGrpPerTb at extractPdschServingCellCfg()");
+              DU_LOG("\nERROR --> F1AP : Failed to extract Resrc List in extractPucchCfg()");
               return RFAILED;
            }
+           memset(macPucchCfg->resrc, 0, sizeof(PucchResrcCfg));
+            extractResrcToAddModList(macPucchCfg->resrc, cuPucchCfg->choice.setup->resourceToAddModList);
         }
-         if(macUePdschSrvCellCfg->codeBlkGrpFlushInd)
-         {
-            *(macUePdschSrvCellCfg->codeBlkGrpFlushInd)  = \
-              cuPdschSrvCellCfg->codeBlockGroupTransmission->choice.setup->codeBlockGroupFlushIndicator;
-        }
-        else
+         
+        /* Format 1 Cfg */ 
+        if(cuPucchCfg->choice.setup->format1)
         {
-            DU_ALLOC_SHRABL_BUF(macUePdschSrvCellCfg->maxCodeBlkGrpPerTb, sizeof(bool));
-            if(macUePdschSrvCellCfg->codeBlkGrpFlushInd)
+           DU_ALLOC_SHRABL_BUF(macPucchCfg->format1, sizeof(PucchFormatCfg));
+           if(macPucchCfg->format1 == NULLP)
            {
-               *(macUePdschSrvCellCfg->codeBlkGrpFlushInd)  = \
-                 cuPdschSrvCellCfg->codeBlockGroupTransmission->choice.setup->codeBlockGroupFlushIndicator;
+              DU_LOG("\nERROR --> F1AP : Failed to extract format 1 Cfg in  extractPucchCfg()");
+              return RFAILED;
            }
-           else
+           memset(macPucchCfg->format1, 0, sizeof(PucchFormatCfg));
+            extractPucchFormatCfg(macPucchCfg->format1,\
+              cuPucchCfg->choice.setup->format1->choice.setup);
+        }
+         
+        /* Format 2 Cfg */
+         if(cuPucchCfg->choice.setup->format2)
+        {
+           DU_ALLOC_SHRABL_BUF(macPucchCfg->format2, sizeof(PucchFormatCfg));
+           if(macPucchCfg->format2 == NULLP)
            {
-              DU_LOG("\nDUAPP: Memory allocation failed for codeBlkGrpFlushInd at extractPdschServingCellCfg()");
+              DU_LOG("\nERROR --> F1AP : Failed to extract format 2 Cfg in  extractPucchCfg()");
               return RFAILED;
            }
+           memset(macPucchCfg->format2, 0, sizeof(PucchFormatCfg));
+            extractPucchFormatCfg(macPucchCfg->format2,\
+              cuPucchCfg->choice.setup->format2->choice.setup);
+        }
+         
+        /* Format 3 Cfg */
+         if(cuPucchCfg->choice.setup->format3)
+        {
+           DU_ALLOC_SHRABL_BUF(macPucchCfg->format3, sizeof(PucchFormatCfg));
+           if(macPucchCfg->format3 == NULLP)
+           {
+              DU_LOG("\nERROR --> F1AP : Failed to extract format 3 Cfg in  extractPucchCfg()");
+              return RFAILED;
+           }
+           memset(macPucchCfg->format3, 0, sizeof(PucchFormatCfg));
+            extractPucchFormatCfg(macPucchCfg->format3,\
+              cuPucchCfg->choice.setup->format3->choice.setup);
         }
-      }
-   }
-   if(cuPdschSrvCellCfg->nrofHARQ_ProcessesForPDSCH)
-   {
-      macUePdschSrvCellCfg->numHarqProcForPdsch = *(cuPdschSrvCellCfg->nrofHARQ_ProcessesForPDSCH); 
-   }
-   if(cuPdschSrvCellCfg->ext1)
-   {
-      if(cuPdschSrvCellCfg->ext1->maxMIMO_Layers)
-      {
-        if(macUePdschSrvCellCfg->maxMimoLayers)
-       {
-           *(macUePdschSrvCellCfg->maxMimoLayers)  = *(cuPdschSrvCellCfg->ext1->maxMIMO_Layers);
-       }
-       else
-       {
-           DU_ALLOC_SHRABL_BUF(macUePdschSrvCellCfg->maxMimoLayers, sizeof(uint8_t));
-           if(macUePdschSrvCellCfg->maxMimoLayers)
-          {
-              *(macUePdschSrvCellCfg->maxMimoLayers)  = *(cuPdschSrvCellCfg->ext1->maxMIMO_Layers);
-          }
-          else
-          {
-             DU_LOG("\nDUAPP: Memory allocation failed for maxMimoLayers at extractPdschServingCellCfg()");
-             return RFAILED;
-          }
-       }
-      }
-   }
-   if(cuPdschSrvCellCfg->xOverhead)
-   {
-      if(macUePdschSrvCellCfg->xOverhead)
-      {
-         *(macUePdschSrvCellCfg->xOverhead)  = *(cuPdschSrvCellCfg->xOverhead);
-      }
-      else
-      {
-         DU_ALLOC_SHRABL_BUF(macUePdschSrvCellCfg->xOverhead, sizeof(uint8_t));
-         if(macUePdschSrvCellCfg->xOverhead)
-         {
-            *(macUePdschSrvCellCfg->xOverhead)  = *(cuPdschSrvCellCfg->xOverhead);
-         }
-         else
-         {
-            DU_LOG("\nDUAPP: Memory allocation failed for xOverhead at extractPdschServingCellCfg()");
-           return RFAILED;
-         }
-      }
-   }
-   return ROK;
-}
-
-/*******************************************************************
- *
- * @brief Fills PuschCfg received by CU
- *
- * @details
- *
- *    Function : extractPuschCfg
- *
- *    Functionality: Fills PuschCfg received  by CU
- *
- * @params[in] BWP_UplinkDedicated__pusch_Config *cuPuschCfg,
- *             PuschCfg *macPuschCfg
- * @return void
- *
- * ****************************************************************/
 
-void extractPuschCfg(struct BWP_UplinkDedicated__pusch_Config *cuPuschCfg, PuschCfg *macPuschCfg)
-{
-   uint8_t timeDomIdx = 0;
-   DMRS_UplinkConfig_t *dmrsUlCfg = NULLP;
-   struct PUSCH_Config__pusch_TimeDomainAllocationList *timeDomAllocList = NULLP;
+         /* Format 4 Cfg */
+         if(cuPucchCfg->choice.setup->format4)
+        {
+           DU_ALLOC_SHRABL_BUF(macPucchCfg->format4, sizeof(PucchFormatCfg));
+           if(macPucchCfg->format4 == NULLP)
+           {
+              DU_LOG("\nERROR --> F1AP : Failed to extract format 4 Cfg in  extractPucchCfg()");
+              return RFAILED;
+           }
+           memset(macPucchCfg->format4, 0, sizeof(PucchFormatCfg));
+            extractPucchFormatCfg(macPucchCfg->format4,\
+              cuPucchCfg->choice.setup->format4->choice.setup);
+        }
 
-   if(cuPuschCfg->present == BWP_UplinkDedicated__pusch_Config_PR_setup)
-   {
-      if(cuPuschCfg->choice.setup)
-      {
-         if(cuPuschCfg->choice.setup->dataScramblingIdentityPUSCH)
+         /* Sched Req List */
+         if(cuPucchCfg->choice.setup->schedulingRequestResourceToAddModList)
         {
-             macPuschCfg->dataScramblingId = \
-               *(cuPuschCfg->choice.setup->dataScramblingIdentityPUSCH);
+           DU_ALLOC_SHRABL_BUF(macPucchCfg->schedReq, sizeof(PucchSchedReqCfg));
+           if(macPucchCfg->schedReq == NULLP)
+           {
+              DU_LOG("\nERROR --> F1AP : Failed to extract schedReqCfg in  extractPucchCfg()");
+              return RFAILED;
+           }
+           memset(macPucchCfg->schedReq, 0, sizeof(PucchSchedReqCfg));
+            extractSchedReqCfgToAddMod(macPucchCfg->schedReq,\
+           cuPucchCfg->choice.setup->schedulingRequestResourceToAddModList);
         }
-        if(cuPuschCfg->choice.setup->dmrs_UplinkForPUSCH_MappingTypeA)
+
+         /*TODO: Add support for  Spatial Info */
+
+        /* MultiCsiCfg */
+         if(cuPucchCfg->choice.setup->multi_CSI_PUCCH_ResourceList)
         {
-           if(cuPuschCfg->choice.setup->dmrs_UplinkForPUSCH_MappingTypeA->present == PUSCH_Config__dmrs_UplinkForPUSCH_MappingTypeA_PR_setup)
+           DU_ALLOC_SHRABL_BUF(macPucchCfg->multiCsiCfg, sizeof(PucchMultiCsiCfg));
+           if(macPucchCfg->multiCsiCfg == NULLP)
            {
-              if(cuPuschCfg->choice.setup->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup)
-              {
-                 dmrsUlCfg = (cuPuschCfg->choice.setup->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup);
-                 if(dmrsUlCfg->dmrs_AdditionalPosition)
-                 {
-                     macPuschCfg->dmrsUlCfgForPuschMapTypeA.addPos =\
-                       *(dmrsUlCfg->dmrs_AdditionalPosition);
-                 }
-                  if(dmrsUlCfg->transformPrecodingDisabled)
-                 {
-                    if(dmrsUlCfg->transformPrecodingDisabled->scramblingID0)
-                    {
-                       macPuschCfg->dmrsUlCfgForPuschMapTypeA.transPrecodDisabled.scramblingId0 = \
-                          *(dmrsUlCfg->transformPrecodingDisabled->scramblingID0);
-                     }
-                 }
-              }
+              DU_LOG("\nERROR --> F1AP : Failed to extract multiCsiCfg in  extractPucchCfg()");
+              return RFAILED;
+           }
+           memset(macPucchCfg->multiCsiCfg, 0, sizeof(PucchMultiCsiCfg));
+            macPucchCfg->multiCsiCfg->multiCsiResrcListCount = cuPucchCfg->choice.setup->multi_CSI_PUCCH_ResourceList->list.count;
+           for(arrIdx =0; arrIdx < macPucchCfg->multiCsiCfg->multiCsiResrcListCount; arrIdx++)
+           {
+              macPucchCfg->multiCsiCfg->multiCsiResrcList[arrIdx] =\
+                *cuPucchCfg->choice.setup->multi_CSI_PUCCH_ResourceList->list.array[arrIdx];
            }
         }
-        /*Res Alloc Type for UL */
-        if(cuPuschCfg->choice.setup->resourceAllocation)
+
+         /* Dl_DataToUL_ACK */ 
+        if(cuPucchCfg->choice.setup->dl_DataToUL_ACK)
         {
-            macPuschCfg->resourceAllocType = \
-              cuPuschCfg->choice.setup->resourceAllocation;
+            DU_ALLOC_SHRABL_BUF(macPucchCfg->dlDataToUlAck, sizeof(PucchDlDataToUlAck));
+           if(macPucchCfg->dlDataToUlAck == NULLP)
+           {
+              DU_LOG("\nERROR --> F1AP : Failed to extract Dl_DataToUL_ACK in extractPucchCfg()");
+              return RFAILED;
+           }
+           memset(macPucchCfg->dlDataToUlAck, 0, sizeof(PucchDlDataToUlAck));
+            macPucchCfg->dlDataToUlAck->dlDataToUlAckListCount = cuPucchCfg->choice.setup->dl_DataToUL_ACK->list.count;
+           for(arrIdx = 0; arrIdx < macPucchCfg->dlDataToUlAck->dlDataToUlAckListCount; arrIdx++)
+            {
+               macPucchCfg->dlDataToUlAck->dlDataToUlAckList[arrIdx] =\
+                  *cuPucchCfg->choice.setup->dl_DataToUL_ACK->list.array[arrIdx];
+           }
         }
-        if(cuPuschCfg->choice.setup->pusch_TimeDomainAllocationList)
+
+        /* Power Control */
+         if(cuPucchCfg->choice.setup->pucch_PowerControl)
         {
-           timeDomAllocList = cuPuschCfg->choice.setup->pusch_TimeDomainAllocationList;
-           if(timeDomAllocList->present == PUSCH_Config__pusch_TimeDomainAllocationList_PR_setup)
+            DU_ALLOC_SHRABL_BUF(macPucchCfg->powerControl, sizeof(PucchPowerControl));
+           if(macPucchCfg->powerControl == NULLP)
            {
-               if(timeDomAllocList->choice.setup)
-              {
-                 macPuschCfg->numTimeDomRsrcAlloc = timeDomAllocList->choice.setup->list.count;
-                 for(timeDomIdx = 0; timeDomIdx <timeDomAllocList->choice.setup->list.count; timeDomIdx++)
-                 {
-                    macPuschCfg->timeDomRsrcAllocList[timeDomIdx].k2 = \
-                       *(timeDomAllocList->choice.setup->list.array[timeDomIdx]->k2);
-                     macPuschCfg->timeDomRsrcAllocList[timeDomIdx].mappingType = \
-                        timeDomAllocList->choice.setup->list.array[timeDomIdx]->mappingType;
-                     macPuschCfg->timeDomRsrcAllocList[timeDomIdx].startSymbolAndLength = \
-                       timeDomAllocList->choice.setup->list.array[timeDomIdx]->startSymbolAndLength;
-                  }
-              }
+              DU_LOG("\nERROR --> F1AP : Failed to extract power control in extractPucchCfg()");
+              return RFAILED;
            }
+            extractPucchPowerControl(macPucchCfg->powerControl,\
+              cuPucchCfg->choice.setup->pucch_PowerControl);
         }
-        if(cuPuschCfg->choice.setup->transformPrecoder)
-            macPuschCfg->transformPrecoder = *(cuPuschCfg->choice.setup->transformPrecoder);
       }
    }
+   return ROK;
 }
+
 /*******************************************************************
  *
  * @brief Fills ServingCellReconfig received by CU
  *
  * @details
  *
- *    Function : extractServingCellReconfig
+ *    Function : extractSpCellDedicatedCfg
  *
  *    Functionality: Fills ServingCellReconfig received  by CU
  *
@@ -6799,7 +8018,7 @@ void extractPuschCfg(struct BWP_UplinkDedicated__pusch_Config *cuPuschCfg, Pusch
  * @return ROK/RFAILD
  *
  * ****************************************************************/
-uint8_t extractServingCellReconfig(ServingCellConfig_t *cuSrvCellCfg, ServCellCfgInfo *macSrvCellCfg)
+uint8_t extractSpCellDedicatedCfg(ServingCellConfig_t *cuSrvCellCfg, ServCellCfgInfo *macSrvCellCfg)
 {
    uint8_t ret = ROK;
    BWP_DownlinkDedicated_t *dlBwp = NULLP;
@@ -6845,7 +8064,7 @@ uint8_t extractServingCellReconfig(ServingCellConfig_t *cuSrvCellCfg, ServCellCf
         }
         else
         {
-           DU_LOG("\nMemory Alloc failed for bwpInactivityTmr at extractServingCellReconfig()");
+           DU_LOG("\nERROR  --> F1AP : Memory Alloc failed for bwpInactivityTmr at extractSpCellDedicatedCfg()");
            return RFAILED;
         }
       }
@@ -6857,7 +8076,7 @@ uint8_t extractServingCellReconfig(ServingCellConfig_t *cuSrvCellCfg, ServCellCf
          ret = extractPdschServingCellCfg(cuSrvCellCfg->pdsch_ServingCellConfig->choice.setup, &macSrvCellCfg->pdschServCellCfg);
          if(ret == RFAILED)
         {
-           DU_LOG("\nFailed at extractPdschServingCellCfg()");
+           DU_LOG("\nERROR --> F1AP : Failed at extractPdschServingCellCfg()");
            return RFAILED;
         }
       }
@@ -6875,12 +8094,12 @@ uint8_t extractServingCellReconfig(ServingCellConfig_t *cuSrvCellCfg, ServCellCf
        if(ulBwp->pucch_Config)
        {
           macSrvCellCfg->initUlBwp.pucchPresent = true;
-           //extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg); 
+          memset(&macSrvCellCfg->initUlBwp.pucchCfg, 0, sizeof(PucchCfg));
+           extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg); 
        }
      }
      if(cuSrvCellCfg->uplinkConfig->firstActiveUplinkBWP_Id)
         macSrvCellCfg->firstActvUlBwpId = *(cuSrvCellCfg->uplinkConfig->firstActiveUplinkBWP_Id);
-
    }
    return ret;
 }
@@ -6954,44 +8173,397 @@ uint8_t extractUeReCfgCellInfo(CellGroupConfigRrc_t *cellGrp, MacUeCfg *macUeCfg
                   macCellGroup->phr_Config->choice.setup->phr_ModeOtherCG;
               }
            }
+        }
+      }
+      /* Fill Physical Cell Group Reconfig */
+      if(cellGrp->physicalCellGroupConfig)
+      {
+         phyCellGrpCfg = ((PhysicalCellGroupConfig_t *)(cellGrp->physicalCellGroupConfig));
+         if(phyCellGrpCfg->p_NR_FR1)
+        {
+           if(*(phyCellGrpCfg->p_NR_FR1) != macUeCfg->phyCellGrpCfg.pNrFr1)
+               macUeCfg->phyCellGrpCfg.pNrFr1 = *(phyCellGrpCfg->p_NR_FR1);
+        }
+         macUeCfg->phyCellGrpCfg.pdschHarqAckCodebook = phyCellGrpCfg->pdsch_HARQ_ACK_Codebook;
+      }
+      /* Fill SpCell Reconfig */
+      if(cellGrp->spCellConfig)
+      {
+         spcellCfg = ((SpCellConfig_t *)(cellGrp->spCellConfig));  
+         if(spcellCfg->servCellIndex)
+        {
+            macUeCfg->spCellCfg.servCellIdx = *(spcellCfg->servCellIndex);
+        }
+         /* Fill Serving cell Reconfig info */
+        if(cellGrp->spCellConfig->spCellConfigDedicated)
+        {
+           servCellCfg = ((ServingCellConfig_t *)(cellGrp->spCellConfig->spCellConfigDedicated));
+            ret = extractSpCellDedicatedCfg(servCellCfg, &macUeCfg->spCellCfg.servCellCfg);
+           if(ret == RFAILED)
+           {
+              DU_LOG("\nERROR --> F1AP : Failed at extractSpCellDedicatedCfg()");
+           }
+        }
+      }
+   }
+   return ret;
+}
+/*******************************************************************
+*
+* @brief free the memory allocated by decoder
+*
+* @details
+*
+*    Function : freeAperDecodeNrcgi 
+*
+*    Functionality: Free Nrcgi values
+*
+* @params[in] NRCGI_t *nrcgi
+* @return void
+*
+* ****************************************************************/
+
+
+void freeAperDecodeNrcgi(NRCGI_t *nrcgi)
+{
+    if(nrcgi->pLMN_Identity.buf != NULLP)
+    {
+       free(nrcgi->pLMN_Identity.buf);
+    }
+    if(nrcgi->nRCellIdentity.buf != NULLP)
+    {
+       free(nrcgi->nRCellIdentity.buf);
+    }
+}
+/*******************************************************************
+*
+* @brief free the memory allocated by decoder
+*
+* @details
+*
+*    Function : freeAperDecodeCuToDuInfo 
+*
+*    Functionality:  Free Cu To Du Information
+*
+* @params[in] CUtoDURRCInformation_t *rrcMsg
+* @return void
+*
+* ****************************************************************/
+
+
+void freeAperDecodeCuToDuInfo(CUtoDURRCInformation_t *rrcMsg)
+{
+   uint8_t ieIdx =0;
+   uint8_t arrIdx =0;
+
+   if(rrcMsg->uE_CapabilityRAT_ContainerList)
+   {
+      if(rrcMsg->uE_CapabilityRAT_ContainerList->buf)
+         free(rrcMsg->uE_CapabilityRAT_ContainerList->buf);
+      free(rrcMsg->uE_CapabilityRAT_ContainerList);
+   }
+
+   if(rrcMsg->iE_Extensions)
+   {
+      if(rrcMsg->iE_Extensions->list.array)
+      {
+        for(ieIdx= 0; ieIdx < rrcMsg->iE_Extensions->list.count; ieIdx++)
+        {
+           if(rrcMsg->iE_Extensions->list.array[ieIdx])
+           {
+              switch(rrcMsg->iE_Extensions->list.array[ieIdx]->id)
+              {
+                 case ProtocolIE_ID_id_CellGroupConfig:
+                    if(rrcMsg->iE_Extensions->list.array[ieIdx]->extensionValue.choice.CellGroupConfig.buf != NULLP)
+                    {
+                       free(rrcMsg->iE_Extensions->list.array[ieIdx]->extensionValue.choice.CellGroupConfig.buf);
+                    }
+                    break;
+                 default:
+                    DU_LOG("\nERROR  -->  F1AP : Invalid Event type %ld at FreeCuToDuInfo()", \
+                          rrcMsg->iE_Extensions->list.array[ieIdx]->id);
+                    break;
+              }
+           }
+        }
+        for(arrIdx = 0; arrIdx < ieIdx; arrIdx++)
+        {
+           free(rrcMsg->iE_Extensions->list.array[arrIdx]);
+        }
+        free(rrcMsg->iE_Extensions->list.array);
+
+      }
+
+      free(rrcMsg->iE_Extensions);
+   }
+}
+/*******************************************************************
+*
+* @brief free the memory allocated by decoder
+*
+* @details 
+*
+*    Function : freeAperDecodeSplCellList
+*
+*    Functionality: Free Spl Cell List 
+                    where memory allocated by aper_decoder
+*
+* @params[in]  SCell_ToBeSetup_List_t *spCellLst
+* @return void
+*
+* ****************************************************************/
+
+
+void freeAperDecodeSplCellList(SCell_ToBeSetup_List_t *spCellLst)
+{
+    uint8_t  cellIdx =0;
+
+    if(spCellLst->list.array != NULLP)
+    {
+       for(cellIdx=0; cellIdx<spCellLst->list.count; cellIdx++)
+       {
+          if(cellIdx==0&&spCellLst->list.array[cellIdx]!=NULLP)
+          {
+             freeAperDecodeNrcgi(&spCellLst->list.array[cellIdx]->value.choice.SCell_ToBeSetup_Item.sCell_ID);
+          }
+          if(spCellLst->list.array[cellIdx]!=NULLP)
+          {
+             free(spCellLst->list.array[cellIdx]);
+          }
+       }
+       free(spCellLst->list.array);
+    }
+}
+/*******************************************************************
+*
+* @brief free the memory allocated by decoder
+*
+* @details
+*
+*    Function : freeAperDecodeSRBSetup 
+*
+*    Functionality: added free part for the memory allocated by aper_decoder
+*
+* @params[in] SRBs_ToBeSetup_List_t *srbSet
+* @return void
+*
+****************************************************************/
+
+
+void freeAperDecodeSRBSetup(SRBs_ToBeSetup_List_t *srbSet)
+{
+    uint8_t srbIdx =0;
+    if(srbSet->list.array != NULLP)
+    {
+       for(srbIdx=0; srbIdx<srbSet->list.count; srbIdx++)
+       {
+          if(srbSet->list.array[srbIdx]!=NULLP)
+          {
+             free(srbSet->list.array[srbIdx]);
+          }
+       }
+       free(srbSet->list.array);
+    }
+}
+
+/*******************************************************************
+*
+* @brief free the memory allocated by decoder
+*
+* @details
+*
+*    Function : freeAperDecodeULTnlInfo
+*
+*    Functionality: added free part for the memory allocated by aper_decoder
+*
+* @params[in] ULUPTNLInformation_ToBeSetup_List_t *ulInfo
+* @return void
+*
+* ****************************************************************/
+
+
+void freeAperDecodeULTnlInfo(ULUPTNLInformation_ToBeSetup_List_t *ulInfo)
+{
+   uint8_t ulIdx=0;
+   if(ulInfo->list.array != NULLP)
+   {
+      for(ulIdx=0; ulIdx<ulInfo->list.count; ulIdx++)
+      {
+        if(ulIdx==0&&ulInfo->list.array[ulIdx]!=NULLP)
+        {
+           if(ulInfo->list.array[ulIdx]->uLUPTNLInformation.choice.gTPTunnel!=NULLP)
+           {
+              if(ulInfo->list.array[ulIdx]->uLUPTNLInformation.choice.gTPTunnel->\
+                    transportLayerAddress.buf != NULLP)
+              {
+                 if(ulInfo->list.array[ulIdx]->uLUPTNLInformation.choice.gTPTunnel->gTP_TEID.buf\
+                       !=NULLP)
+                 {
+                    free(ulInfo->list.array[ulIdx]->uLUPTNLInformation.choice.gTPTunnel->gTP_TEID.buf);
+                 }
+                 free(ulInfo->list.array[ulIdx]->uLUPTNLInformation.choice.gTPTunnel->\
+                       transportLayerAddress.buf);
+              }
+              free(ulInfo->list.array[ulIdx]->uLUPTNLInformation.choice.gTPTunnel);
+           }
+        }
+        if(ulInfo->list.array[ulIdx]!=NULLP)
+        {
+           free(ulInfo->list.array[ulIdx]);
+        }
+      }
+      free(ulInfo->list.array);
+   }
+}
+/*******************************************************************
+*
+* @brief free the memory allocated by decoder
+*
+* @details
+*
+*    Function : freeAperDecodeDRBSetup  
+*
+*    Functionality: free DRBSetup which is allocated by decoder
+*
+* @params[in]  DRBs_ToBeSetup_List_t *drbSet
+* @return void
+*
+* ****************************************************************/
+
+void freeAperDecodeDRBSetup(DRBs_ToBeSetup_List_t *drbSet)
+{
+   DRBs_ToBeSetup_Item_t *drbSetItem = NULLP;
+   uint8_t  flowIdx =0;
+   uint8_t  drbIdx =0;
+   
+   if(drbSet->list.array != NULLP)
+   {
+      for(drbIdx=0; drbIdx<drbSet->list.count; drbIdx++)
+      {
+        if(drbIdx==0&&drbSet->list.array[drbIdx] != NULLP)
+        {
+           drbSetItem =&drbSet->list.array[drbIdx]->value.choice.DRBs_ToBeSetup_Item;
+           if(drbSetItem->qoSInformation.choice.choice_extension != NULLP)
+           {
+              if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+                    qoS_Characteristics.choice.non_Dynamic_5QI !=NULLP)
+              {
+                 if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+                       qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow!=NULLP)
+                 {
+                    if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+                          qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume!=NULLP)
+                    {
+
+                       if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sST.buf!=NULLP)
+                       {
+
+                          if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sD!=NULLP)
+                          {
+
+                             if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sD->\
+                             buf!=NULLP)
+                             {
+
+                                if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.\
+                                      flows_Mapped_To_DRB_List.list.array != NULLP)
+                                {
+
+                                   for(flowIdx=0;flowIdx<drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                   DRB_Information.flows_Mapped_To_DRB_List.list.count; flowIdx++)
+                                   {
+
+                                      if(flowIdx==0&&drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                            DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]!=NULLP)
+                                      {
+                                         if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                               DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+                                               qoSFlowLevelQoSParameters.\
+                                               qoS_Characteristics.choice.non_Dynamic_5QI!=NULLP)
+                                         {
+                                            if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                                  DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+                                                  qoSFlowLevelQoSParameters.\
+                                                  qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow!=NULLP)
+                                            {
+
+                                               if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                                     DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+                                                     qoSFlowLevelQoSParameters.\
+                                                     qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume!=NULLP)
+                                               {
+                                                  freeAperDecodeULTnlInfo(&drbSetItem->uLUPTNLInformation_ToBeSetup_List);
+                                                  free(drbSetItem->uLConfiguration);
 
 
+                                                  free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                                        DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+                                                        qoSFlowLevelQoSParameters.\
+                                                        qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume);
+                                               }
+
+                                               free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                                     DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+                                                     qoSFlowLevelQoSParameters.\
+                                                     qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow);
+                                            }
+
+                                            free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+
+                                                  DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]->\
+                                                  qoSFlowLevelQoSParameters.\
+                                                  qoS_Characteristics.choice.non_Dynamic_5QI);
+                                         }
+                                      }
+                                      if(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                            DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]!=NULLP)
+                                      {
+
+                                         free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                               DRB_Information.flows_Mapped_To_DRB_List.list.array[flowIdx]);
+                                      }
+                                   }
+
+                                   free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                         DRB_Information.flows_Mapped_To_DRB_List.list.array);
+                                }
+
+                                free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.\
+                                DRB_Information.sNSSAI.sD->buf);
+                             }
+
+                             free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sD);
+                          }
+
+                          free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.sNSSAI.sST.buf);
+
+                       }
+
+                       free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+
+                             qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume);
+                    }
+
+                    free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+                          qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow);
+                 }
+
+                 free(drbSetItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS.\
+                       qoS_Characteristics.choice.non_Dynamic_5QI);
+              }
+              free(drbSetItem->qoSInformation.choice.choice_extension);
+           }
         }
-      }
-      /* Fill Physical Cell Group Reconfig */
-      if(cellGrp->physicalCellGroupConfig)
-      {
-         phyCellGrpCfg = ((PhysicalCellGroupConfig_t *)(cellGrp->physicalCellGroupConfig));
-         if(phyCellGrpCfg->p_NR_FR1)
-        {
-           if(*(phyCellGrpCfg->p_NR_FR1) != macUeCfg->phyCellGrpCfg.pNrFr1)
-               macUeCfg->phyCellGrpCfg.pNrFr1 = *(phyCellGrpCfg->p_NR_FR1);
-        }
-         macUeCfg->phyCellGrpCfg.pdschHarqAckCodebook = phyCellGrpCfg->pdsch_HARQ_ACK_Codebook;
-      }
-      /* Fill SpCell Reconfig */
-      if(cellGrp->spCellConfig)
-      {
-         spcellCfg = ((SpCellConfig_t *)(cellGrp->spCellConfig));  
-         if(spcellCfg->servCellIndex)
-        {
-            macUeCfg->spCellCfg.servCellIdx = *(spcellCfg->servCellIndex);
-        }
-         /* Fill Serving cell Reconfig info */
-        if(cellGrp->spCellConfig->spCellConfigDedicated)
+        if(drbSet->list.array[drbIdx]!=NULLP)
         {
-           servCellCfg = ((ServingCellConfig_t *)(cellGrp->spCellConfig->spCellConfigDedicated));
-            ret = extractServingCellReconfig(servCellCfg, &macUeCfg->spCellCfg.servCellCfg);
-           if(ret == RFAILED)
-           {
-              DU_LOG("\n Failed at extractServingCellReconfig()");
-           }
+           free(drbSet->list.array[drbIdx]);
         }
       }
+      free(drbSet->list.array);
    }
-   return ret;
 }
 
+
 /*******************************************************************
  *
  * @brief builds Mac Cell Cfg
@@ -7018,7 +8590,7 @@ uint8_t procUeReCfgCellInfo(MacUeCfg *macUeCfg, void *cellInfo)
       cellGrp = (CellGroupConfigRrc_t *)cellInfo;
       ret = extractUeReCfgCellInfo(cellGrp, macUeCfg);
       if(ret == RFAILED)
-         DU_LOG("\nF1AP: Failed at procUeReCfgCellInfo()");
+         DU_LOG("\nERROR  -->  F1AP : Failed at procUeReCfgCellInfo()");
    }
    if(ret == RFAILED)
    {
@@ -7082,7 +8654,7 @@ void duFillModulationDetails(MacUeCfg *ueCfg, MacUeCfg *oldUeCfg, void *ueCap)
            }
         default:
            {
-              DU_LOG("\nDU APP: Incorrect downlink modulation order received. Reatining old modulation configuration");
+              DU_LOG("\nERROR  -->  DU APP: Incorrect downlink modulation order received. Reatining old modulation configuration");
               memcpy(&ueCfg->dlModInfo, &oldUeCfg->dlModInfo, sizeof(ModulationInfo));
               break;
            }
@@ -7124,7 +8696,7 @@ void duFillModulationDetails(MacUeCfg *ueCfg, MacUeCfg *oldUeCfg, void *ueCap)
            }
         default:
            {
-              DU_LOG("\nDU APP: Incorrect uplink modulation order received. Reatining old modulation configuration");
+              DU_LOG("\nERROR  -->  DU APP: Incorrect uplink modulation order received. Reatining old modulation configuration");
               memcpy(&ueCfg->ulModInfo, &oldUeCfg->ulModInfo, sizeof(ModulationInfo));
               break;
            }
@@ -7156,9 +8728,9 @@ void duFillModulationDetails(MacUeCfg *ueCfg, MacUeCfg *oldUeCfg, void *ueCap)
 CellGroupConfigRrc_t *extractCellGrpInfo(ProtocolExtensionContainer_4624P16_t *protocolIeExtn,\
    DuUeCfg *ueCfgDb)
 {
-   uint8_t idx2;
-   uint16_t id;
-   uint16_t recvBufLen;
+   uint8_t idx2 =0;
+   uint16_t id =0;
+   uint16_t recvBufLen =0;
    CellGroupConfigRrc_t *cellGrpCfg = NULLP;
    CUtoDURRCInformation_ExtIEs_t *extIeInfo = NULLP;
    asn_dec_rval_t rval; /* Decoder return value */
@@ -7184,7 +8756,7 @@ CellGroupConfigRrc_t *extractCellGrpInfo(ProtocolExtensionContainer_4624P16_t *p
                     extIeInfo->extensionValue.choice.CellGroupConfig.buf, recvBufLen, 0, 0);
                   if(rval.code == RC_FAIL || rval.code == RC_WMORE)
                   {
-                     DU_LOG("\nF1AP : ASN decode failed at decodeCellGrpCfg()");
+                     DU_LOG("\nERROR  -->  F1AP : ASN decode failed at decodeCellGrpCfg()");
                      return NULLP;
                   }
                   xer_fprint(stdout, &asn_DEF_CellGroupConfigRrc, cellGrpCfg);
@@ -7194,7 +8766,7 @@ CellGroupConfigRrc_t *extractCellGrpInfo(ProtocolExtensionContainer_4624P16_t *p
               break;
             }
             default:
-               DU_LOG("\nF1AP : Invalid IE received CUtoDURRCInformation:%d at decodeCellGrpCfg()", id);
+               DU_LOG("\nERROR  -->  F1AP : Invalid IE received CUtoDURRCInformation:%d at decodeCellGrpCfg()", id);
               break;
          }
       }
@@ -7229,7 +8801,7 @@ uint8_t procSrbListToSetup(SRBs_ToBeSetup_Item_t * srbItem, LcCfg *macLcToAdd, R
    ret = procMacLcCfg(srbItem->sRBID, RB_TYPE_SRB, CONFIG_ADD, NULL, NULL, macLcToAdd);
    if(ret == RFAILED)
    { 
-      DU_LOG("\nF1AP:Failed at MAC LC Cfg in procSrbListToSetup()");
+      DU_LOG("\nERROR  -->  F1AP : Failed at MAC LC Cfg in procSrbListToSetup()");
       return ret;
    }
    return ret;
@@ -7266,13 +8838,13 @@ uint8_t extractSrbListToSetup(SRBs_ToBeSetup_List_t *srbCfg, DuUeCfg *ueCfgDb)
          srbItem = &srbCfg->list.array[srbIdx]->value.choice.SRBs_ToBeSetup_Item;
          if(ueCfgDb->numMacLcs > MAX_NUM_LC)
         { 
-            DU_LOG("\nF1AP:  MAX LC Reached in MAC");
+            DU_LOG("\nERROR   -->  F1AP:  MAX LC Reached in MAC");
            ret = RFAILED;
            break;
         }
          if(ueCfgDb->numRlcLcs > MAX_NUM_LC)
         {
-            DU_LOG("\nF1AP:  MAX LC Reached in RLC");
+            DU_LOG("\nERROR   -->  F1AP:  MAX LC Reached in RLC");
            ret = RFAILED;
            break;
         }
@@ -7284,7 +8856,7 @@ uint8_t extractSrbListToSetup(SRBs_ToBeSetup_List_t *srbCfg, DuUeCfg *ueCfgDb)
         ueCfgDb->numMacLcs++;
         if(ret == RFAILED)
         {
-            DU_LOG("\nF1AP:  Failed at extractSrbListToSetup()");
+            DU_LOG("\nERROR  -->  F1AP:  Failed at extractSrbListToSetup()");
            break;
         }
       }
@@ -7324,7 +8896,7 @@ uint8_t procDrbListToSetup(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbItem, LcCfg *
    ret = procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_ADD, drbItem, NULL, macLcToAdd);
    if(ret == RFAILED)
    { 
-      DU_LOG("\nF1AP:Failed at RLC LC Cfg in extractDrbListToSetup()");
+      DU_LOG("\nERROR  -->  F1AP : Failed at RLC LC Cfg in extractDrbListToSetup()");
       return ret;
    }
 
@@ -7361,13 +8933,13 @@ uint8_t extractDrbListToSetup(uint8_t lcId, DRBs_ToBeSetup_List_t *drbCfg, DuUeC
          drbItem = &drbCfg->list.array[drbIdx]->value.choice.DRBs_ToBeSetup_Item;
         if(ueCfgDb->numMacLcs > MAX_NUM_LC)
         { 
-            DU_LOG("\nF1AP:  MAX LC Reached in MAC ");
+            DU_LOG("\nERROR   -->  F1AP:  MAX LC Reached in MAC ");
            ret = RFAILED;
            break;
         }
         if(ueCfgDb->numRlcLcs > MAX_NUM_LC)
         {
-            DU_LOG("\nF1AP:  MAX LC Reached in RLC");
+            DU_LOG("\nERROR   -->  F1AP:  MAX LC Reached in RLC");
            ret = RFAILED;
            break;
         }
@@ -7379,7 +8951,7 @@ uint8_t extractDrbListToSetup(uint8_t lcId, DRBs_ToBeSetup_List_t *drbCfg, DuUeC
         ueCfgDb->numMacLcs++;
         if(ret == RFAILED)
         {
-            DU_LOG("\nF1AP:  Failed at extractDrbListToSetup()");
+            DU_LOG("\nERROR  -->  F1AP :  Failed at extractDrbListToSetup()");
            break;
         }
       }
@@ -7416,7 +8988,7 @@ uint8_t extractDlRrcMsg(uint32_t gnbDuUeF1apId, uint32_t gnbCuUeF1apId, \
       DU_ALLOC_SHRABL_BUF(dlRrcMsg->rrcMsgPdu, dlRrcMsg->rrcMsgSize);
       if(!dlRrcMsg->rrcMsgPdu)
       {
-         DU_LOG("\nDU APP : Memory allocation failed for RRC Msg in procUeCtxtSetupReq");
+         DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for RRC Msg in procUeCtxtSetupReq");
          ret = RFAILED;
       }
       else
@@ -7458,8 +9030,8 @@ UE_NR_Capability_t *extractUeCapability(UE_CapabilityRAT_ContainerList_t *ueCapa
    DU_ALLOC(ueCapRatContList, sizeof(UE_CapabilityRAT_ContainerListRRC_t));
    if(!ueCapRatContList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in extractUeCapability");
-      return RFAILED;
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in extractUeCapability");
+      return NULLP;
    }
    memset(ueCapRatContList, 0, sizeof(UE_CapabilityRAT_ContainerListRRC_t));
    memset(&rval, 0, sizeof(asn_dec_rval_t));
@@ -7467,13 +9039,12 @@ UE_NR_Capability_t *extractUeCapability(UE_CapabilityRAT_ContainerList_t *ueCapa
           ueCapablityListBuf->buf, recvBufLen, 0, 0);
    if(rval.code == RC_FAIL || rval.code == RC_WMORE)
    {
-      DU_LOG("\nF1AP : ASN decode failed at decodeCellGrpCfg()");
+      DU_LOG("\nERROR  -->  F1AP : ASN decode failed at decodeCellGrpCfg()");
       return NULLP;
    }
    xer_fprint(stdout, &asn_DEF_UE_CapabilityRAT_ContainerListRRC, ueCapRatContList);
 
    /* Free encoded buffer after decoding */
-   free(ueCapablityListBuf->buf);
 
    for(idx = 0; idx < ueCapRatContList->list.count; idx++)
    {
@@ -7484,9 +9055,9 @@ UE_NR_Capability_t *extractUeCapability(UE_CapabilityRAT_ContainerList_t *ueCapa
           DU_ALLOC(ueNrCap, sizeof(UE_NR_Capability_t));
           if(!ueNrCap)
           {
-             DU_LOG("\nF1AP : Memory allocation failed in extractUeCapability");
+             DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in extractUeCapability");
              DU_FREE(ueCapRatContList, sizeof(UE_CapabilityRAT_ContainerListRRC_t));
-             return RFAILED;
+             return NULLP;
           } 
           memset(ueNrCap, 0, sizeof(UE_NR_Capability_t));
           memset(&rval, 0, sizeof(asn_dec_rval_t));
@@ -7494,7 +9065,7 @@ UE_NR_Capability_t *extractUeCapability(UE_CapabilityRAT_ContainerList_t *ueCapa
                  ueCapRatContList->list.array[idx]->ue_CapabilityRAT_Container.buf, recvBufLen, 0, 0);
           if(rval.code == RC_FAIL || rval.code == RC_WMORE)
           {
-             DU_LOG("\nF1AP : ASN decode failed at decodeCellGrpCfg()");
+             DU_LOG("\nERROR  -->  F1AP : ASN decode failed at decodeCellGrpCfg()");
              return NULLP;
           }
           xer_fprint(stdout, &asn_DEF_UE_NR_Capability, ueNrCap);
@@ -7510,7 +9081,90 @@ UE_NR_Capability_t *extractUeCapability(UE_CapabilityRAT_ContainerList_t *ueCapa
    DU_FREE(ueCapRatContList, sizeof(UE_CapabilityRAT_ContainerListRRC_t));
    return ueNrCap;
 }
+/*******************************************************************
+*
+* @brief free UE context setup request from CU
+*
+* @details
+*
+*    Function : freeAperDecodeF1UeContextSetupReq
+*
+*    Functionality: freeing part for the memory allocated by aper_decoder
+*
+* @params[in] F1AP message
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+void freeAperDecodeF1UeContextSetupReq(UEContextSetupRequest_t   *ueSetReq)
+{
+   uint8_t ieIdx = 0;
+
+   if(ueSetReq->protocolIEs.list.array != NULLP)
+   {
+      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:
+
+                 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:
+
+                 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:
+                 {
+
+                    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);
+   }
+}
 /*******************************************************************
  *
  * @brief Process UE context setup request from CU
@@ -7528,7 +9182,7 @@ UE_NR_Capability_t *extractUeCapability(UE_CapabilityRAT_ContainerList_t *ueCapa
  * ****************************************************************/
 uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
 {
-   uint8_t    ret, ieIdx, ueIdx, lcId, cellIdx;
+   uint8_t  ret, ieIdx, ueIdx, lcId, cellIdx;
    bool ueCbFound = false;
    uint32_t gnbCuUeF1apId, gnbDuUeF1apId, bitRateSize;
    DuUeCb   *duUeCb = NULLP;
@@ -7570,7 +9224,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
                     }
                     else
                     {
-                        DU_LOG("\nF1AP: Memory Alloc Failed at procF1UeContextSetupReq()");
+                        DU_LOG("\nERROR  -->  F1AP: Memory Alloc Failed at procF1UeContextSetupReq()");
                         ret = RFAILED;
                     }
                  }
@@ -7580,7 +9234,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
               }
               if(!ueCbFound)
               {
-                  DU_LOG("\nF1AP: DuUeCb is not found at procF1UeContextSetupReq()");
+                  DU_LOG("\nERROR  -->  F1AP: DuUeCb is not found at procF1UeContextSetupReq()");
                   ret = RFAILED;
               }
               break;
@@ -7603,7 +9257,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
                     value.choice.CUtoDURRCInformation.iE_Extensions, &duUeCb->f1UeDb->duUeCfg);
                  if(!duUeCb->f1UeDb->duUeCfg.cellGrpCfg)
                  {
-                    DU_LOG("\n F1AP: Failed to extract cell Grp Info");
+                    DU_LOG("\nERROR  -->  F1AP: Failed to extract cell Grp Info");
                     //TODO: Update the failure cause in ue context Setup Response
                     ret = RFAILED;
                  }
@@ -7612,8 +9266,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
             } 
          case ProtocolIE_ID_id_SCell_ToBeSetup_List:
            {
-              DU_LOG("\nDU_APP: Received SCell to be added");
-              DU_LOG("\nDU_APP: Not processing the SCell_ToBeSetup_List");
+              DU_LOG("\nINFO   -->  DU_APP: Received SCell_ToBeSetup_List but  Not processing the list");
            break;
            }
          case ProtocolIE_ID_id_SRBs_ToBeSetup_List:
@@ -7621,7 +9274,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
               if(extractSrbListToSetup(&ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.SRBs_ToBeSetup_List,\
                  &duUeCb->f1UeDb->duUeCfg))
               {
-                 DU_LOG("\nDU_APP: Failed at extractSrbListToSetup()");
+                 DU_LOG("\nERROR  -->  DU APP : Failed at extractSrbListToSetup()");
                  //TODO: Update the failure cause in ue context Setup Response
                  ret = RFAILED;
               }
@@ -7635,7 +9288,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
                   if(extractDrbListToSetup(lcId, &ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRBs_ToBeSetup_List,\
                     &duUeCb->f1UeDb->duUeCfg))
                  {
-                    DU_LOG("\nDU_APP: Failed at extractDrbListToSetup()");
+                    DU_LOG("\nERROR  -->  DU APP : Failed at extractDrbListToSetup()");
                     //TODO: Update the failure cause in ue context Setup Response
                     ret = RFAILED;
                  }
@@ -7650,7 +9303,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
               DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->dlRrcMsg, sizeof(F1DlRrcMsg));
               if(!duUeCb->f1UeDb->dlRrcMsg)
               {
-                 DU_LOG("\nDU APP : Memory allocation failed for DL RRC Msg in procUeCtxtSetupReq()");
+                 DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for DL RRC Msg in procUeCtxtSetupReq()");
                  ret = RFAILED;
               }
               else
@@ -7669,11 +9322,12 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
               }
               else
               {
-                 DU_LOG("\nIgnoring delivery report, since rrcContainer is not present");
+                 DU_LOG("\nERROR  -->  Ignoring delivery report, since rrcContainer is not present");
               }
               break;
            }
-        case ProtocolIE_ID_id_GNB_DU_UE_AMBR_UL:            {
+        case ProtocolIE_ID_id_GNB_DU_UE_AMBR_UL:
+            {
                /* MaximumBitRate Uplink */
               bitRateSize = ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.BitRate.size;
               if(bitRateSize > 0)
@@ -7681,7 +9335,7 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
                   DU_ALLOC_SHRABL_BUF(duUeCb->f1UeDb->duUeCfg.ambrCfg, bitRateSize);
                  if(!duUeCb->f1UeDb->duUeCfg.ambrCfg)
                  {
-                    DU_LOG("\nDU APP : Memory allocation failed for bitRate in procUeCtxtSetupReq");
+                    DU_LOG("\nERROR  -->  DU APP : Memory allocation failed for bitRate in procUeCtxtSetupReq");
                     ret = RFAILED;
                  }
                  else
@@ -7706,11 +9360,12 @@ uint8_t procF1UeContextSetupReq(F1AP_PDU_t *f1apMsg)
    {
       /*TODO : Negative case*/
       // BuildAndSendUeContextSetupRsp(ueIdx, cellId);
-      DU_LOG("F1AP: Failed to process UE CNTXT SETUP REQ at procF1UeContextSetupReq()"); 
+      DU_LOG("\nERROR  -->  F1AP: Failed to process UE CNTXT SETUP REQ at procF1UeContextSetupReq()"); 
    }
    else
       ret = duProcUeContextSetupRequest(duUeCb);
-
+   
+   freeAperDecodeF1UeContextSetupReq(ueSetReq); 
    return ret;
 
 }
@@ -7766,7 +9421,8 @@ void FreeUeContextSetupRsp(F1AP_PDU_t *f1apMsg)
                           break;
                        }
                     default:
-                       DU_LOG("\nDUAPP: Invalid Id %ld at FreeUeContextSetupRsp()", ueSetRsp->protocolIEs.list.array[idx]->id);
+                       DU_LOG("\nERROR  -->  DUAPP: Invalid Id %ld at FreeUeContextSetupRsp()",\
+                       ueSetRsp->protocolIEs.list.array[idx]->id);
                        break;
                  }
                  DU_FREE(ueSetRsp->protocolIEs.list.array[idx],\
@@ -7810,13 +9466,13 @@ uint8_t EncodeUeCntxtDuToCuInfo(CellGroupConfig_t *duToCuCellGrp, CellGroupConfi
    /* Encode results */
    if(encRetVal.encoded == ENCODE_FAIL)
    {
-      DU_LOG( "\n F1AP : Could not encode UeCntxtDuToCuInfo (at %s)\n",\
+      DU_LOG( "\nERROR  -->  F1AP : Could not encode UeCntxtDuToCuInfo (at %s)\n",\
            encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
       return RFAILED;
    }
    else
    {
-      DU_LOG("\n F1AP : Created APER encoded buffer for UeCntxtDuToCuInfo\n");
+      DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for UeCntxtDuToCuInfo\n");
       for(int i=0; i< encBufSize; i++)
       {
         printf("%x",encBuf[i]);
@@ -7826,7 +9482,7 @@ uint8_t EncodeUeCntxtDuToCuInfo(CellGroupConfig_t *duToCuCellGrp, CellGroupConfi
    DU_ALLOC(duToCuCellGrp->buf, duToCuCellGrp->size);
    if(!duToCuCellGrp->buf)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in UeCntxtDuToCuInfo");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in UeCntxtDuToCuInfo");
    }
    memcpy(duToCuCellGrp->buf, encBuf, duToCuCellGrp->size);
    return ROK;
@@ -7860,14 +9516,14 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId)
    CellGroupConfigRrc_t     *cellGrpCfg = NULLP;
    DuUeCb                   *ueCb = NULLP;
 
-   DU_LOG("\n F1AP : Building UE Context Setup Response for cellId %d, ueIdx %d\n", cellId, ueIdx);
+   DU_LOG("\n INFO   -->  F1AP : Building UE Context Setup Response for cellId %d, ueIdx %d\n", cellId, ueIdx);
 
    while(true)
    {
       DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         ret = RFAILED;
         break;
       }
@@ -7877,7 +9533,7 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId)
            sizeof(SuccessfulOutcome_t));
       if(f1apMsg->choice.successfulOutcome == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for  F1AP-PDU failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for      F1AP-PDU failed");
         ret = RFAILED;
         break;
       }
@@ -7900,7 +9556,7 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId)
            ueSetRsp->protocolIEs.list.size);
       if(ueSetRsp->protocolIEs.list.array == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for UE Setup Response failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for UE Setup Response failed");
         ret = RFAILED;
         break;
       }
@@ -7911,7 +9567,7 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId)
               sizeof(UEContextSetupResponseIEs_t));
         if(ueSetRsp->protocolIEs.list.array[idx] == NULLP)
         {
-           DU_LOG(" F1AP : Memory allocation for UE Setup Response failed");
+           DU_LOG(" ERROR  -->  F1AP : Memory allocation for UE Setup Response failed");
            ret = RFAILED;
            break;
         }
@@ -7962,7 +9618,7 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId)
       }
       else
       {
-         DU_LOG("\nF1AP: Failed to form DUtoCU RRCInfo at BuildAndSendUeContextSetupRsp()");
+         DU_LOG("\nERROR  -->  F1AP: Failed to form DUtoCU RRCInfo at BuildAndSendUeContextSetupRsp()");
          ret = RFAILED;
       }
       if(ret == RFAILED)
@@ -7978,14 +9634,14 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId)
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG( "\n F1AP : Could not encode UE Context Setup Request structure (at %s)\n",\
+        DU_LOG( "\nERROR  -->  F1AP : Could not encode UE Context Setup Request structure (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         ret = RFAILED;
         break;
       }
       else
       {
-        DU_LOG("\n F1AP : Created APER encoded buffer for UE Context Setup Request\n");
+        DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for UE Context Setup Request\n");
         for(int i=0; i< encBufSize; i++)
         {
            printf("%x",encBuf[i]);
@@ -7995,7 +9651,7 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId)
       /* Sending  msg  */
       if(SendF1APMsg(DU_APP_MEM_REGION,DU_POOL)        != ROK)
       {
-        DU_LOG("\n F1AP : Sending UE Context Setup Request Failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending UE Context Setup Request Failed");
         ret = RFAILED;
         break;
       }
@@ -8004,8 +9660,21 @@ uint8_t BuildAndSendUeContextSetupRsp(uint8_t ueIdx, uint8_t cellId)
    FreeUeContextSetupRsp(f1apMsg);
    return ret;
 }/* End of BuildAndSendUeContextSetupRsp */
+/*******************************************************************
+*
+* @brief  Build And Send Ue Context Rsp 
+*
+* @details
+*
+*    Function : BuildAndSendUeCtxtRsp 
+*
+*    Functionality : Build And Send Ue Context Rsp
 
-
+* @params[in]
+* @return sucess = ROK
+*         failure = RFAILED
+*
+* ****************************************************************/
 uint8_t BuildAndSendUeCtxtRsp(uint8_t ueIdx, uint8_t cellId)
 {
    uint8_t cellIdx = 0, actionType = 0; 
@@ -8022,7 +9691,7 @@ uint8_t BuildAndSendUeCtxtRsp(uint8_t ueIdx, uint8_t cellId)
          //TODO: Build Ue context Modification Rsp
          break;
       default:
-         DU_LOG("F1AP: Invalid Action Type %d at BuildAndSendUeCtxtRsp()", actionType);
+         DU_LOG("ERROR  -->  F1AP: Invalid Action Type %d at BuildAndSendUeCtxtRsp()", actionType);
          break;
 
    }
@@ -8096,7 +9765,7 @@ uint8_t BuildAndSendF1ResetReq()
    Reset_t          *f1ResetMsg = NULLP;
    F1AP_PDU_t       *f1apMsg = NULLP;
    asn_enc_rval_t   encRetVal;
-   DU_LOG("\nF1AP : Building F1 Reset request \n");
+   DU_LOG("\nINFO   -->  F1AP : Building F1 Reset request \n");
    do
    {
       DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
@@ -8169,13 +9838,13 @@ uint8_t BuildAndSendF1ResetReq()
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG("\nF1AP : Could not encode F1Reset structure (at %s)\n",\
+        DU_LOG("\nERROR  -->  F1AP : Could not encode F1Reset structure (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\nF1AP : Created APER encoded buffer for F1Reset\n");
+        DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for F1Reset\n");
         for(idx=0; idx< encBufSize; idx++)
         {
            printf("%x",encBuf[idx]);
@@ -8184,7 +9853,7 @@ uint8_t BuildAndSendF1ResetReq()
 
       if(SendF1APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK)
       {
-        DU_LOG("\nF1AP : Sending F1 Reset request failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending F1 Reset request failed");
         break;
       }
 
@@ -8262,14 +9931,14 @@ uint8_t BuildAndSendF1ResetAck()
    F1AP_PDU_t             *f1apMsg = NULL;
    ResetAcknowledge_t     *f1ResetAck = NULLP;
    asn_enc_rval_t         encRetVal;
-   DU_LOG("\nF1AP : Building F1 Reset Acknowledgment \n");
+   DU_LOG("\nINFO   -->  F1AP : Building F1 Reset Acknowledgment \n");
 
    do{
       /* Allocate the memory for F1ResetRequest_t */
       DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         break;
       }
 
@@ -8278,7 +9947,7 @@ uint8_t BuildAndSendF1ResetAck()
       DU_ALLOC(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       if(f1apMsg->choice.successfulOutcome == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         break;
       }
       f1apMsg->choice.successfulOutcome->criticality   = Criticality_reject;
@@ -8293,7 +9962,7 @@ uint8_t BuildAndSendF1ResetAck()
       DU_ALLOC(f1ResetAck->protocolIEs.list.array, f1ResetAck->protocolIEs.list.size );
       if(f1ResetAck->protocolIEs.list.array == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for F1ResetAckIEs failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1ResetAckIEs failed");
         break;
       }
 
@@ -8322,13 +9991,13 @@ uint8_t BuildAndSendF1ResetAck()
       /* Check encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG("\nF1AP : Could not encode F1ResetAck structure (at %s)\n",\
+        DU_LOG("\nERROR  -->  F1AP : Could not encode F1ResetAck structure (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\nF1AP : Created APER encoded buffer for F1ResetAck\n");
+        DU_LOG("\nDUBUG   -->  F1AP : Created APER encoded buffer for F1ResetAck\n");
         for(int i=0; i< encBufSize; i++)
         {
            printf("%x",encBuf[i]);
@@ -8337,7 +10006,7 @@ uint8_t BuildAndSendF1ResetAck()
       /* Sending msg */
       if(SendF1APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK)
       {
-        DU_LOG("\nF1AP : Sending F1 Reset Acknowledgement failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending F1 Reset Acknowledgement failed");
         break;
       }
 
@@ -8348,6 +10017,36 @@ uint8_t BuildAndSendF1ResetAck()
    FreeF1ResetAck(f1apMsg);
    return ret;
 }
+/******************************************************************
+*
+* @brief free F1 reset msg allocated by aper_decoder 
+*
+* @details
+*
+*    Function : freeAperDecodeF1ResetMsg 
+*
+*    Functionality: free F1 reset msg allocated by aper_decoder 
+*
+* @params[in] Reset_t *f1ResetMsg 
+* @return void 
+*
+* ****************************************************************/
+
+void freeAperDecodeF1ResetMsg(Reset_t *f1ResetMsg)
+{
+   uint8_t ieIdx =0;
+   if(f1ResetMsg->protocolIEs.list.array)
+   {
+      for(ieIdx=0 ;ieIdx < f1ResetMsg->protocolIEs.list.count ; ieIdx++)
+      {
+        if(f1ResetMsg->protocolIEs.list.array[ieIdx])
+        {
+           free(f1ResetMsg->protocolIEs.list.array[ieIdx]);
+        }
+      }
+      free(f1ResetMsg->protocolIEs.list.array);
+   }
+}
 
 /******************************************************************
  *
@@ -8367,16 +10066,16 @@ uint8_t BuildAndSendF1ResetAck()
 uint8_t procF1ResetReq(F1AP_PDU_t *f1apMsg)
 {
    /* we are currently not supporting Ue release. right now we are supporting only init case of fireset */
-   uint8_t       idx = 0;
+   uint8_t       ieIdx = 0;
    uint8_t        ret = ROK;
    Reset_t       *f1ResetMsg = NULLP;
 
-   DU_LOG("\nProcessing F1 reset request");
+   DU_LOG("\nINFO   -->  Processing F1 reset request");
    f1ResetMsg = &f1apMsg->choice.initiatingMessage->value.choice.Reset;
 
-   for(idx=0; idx<f1ResetMsg->protocolIEs.list.count; idx++)
+   for(ieIdx=0; ieIdx<f1ResetMsg->protocolIEs.list.count; ieIdx++)
    {
-      switch(f1ResetMsg->protocolIEs.list.array[idx]->id)
+      switch(f1ResetMsg->protocolIEs.list.array[ieIdx]->id)
       {
         case ProtocolIE_ID_id_TransactionID:
            break;
@@ -8386,7 +10085,6 @@ uint8_t procF1ResetReq(F1AP_PDU_t *f1apMsg)
 
         case ProtocolIE_ID_id_ResetType:
            {
-              DU_LOG("\nReceived F1 Reset request");
               break;
            }
 
@@ -8395,7 +10093,10 @@ uint8_t procF1ResetReq(F1AP_PDU_t *f1apMsg)
       }
    }
    ret = BuildAndSendF1ResetAck();
-   DU_LOG("\nUE release is not supported for now");
+   DU_LOG("\nINFO   -->  UE release is not supported for now");
+
+   freeAperDecodeF1ResetMsg(f1ResetMsg);
+
    return ret;
 }
 
@@ -8474,18 +10175,18 @@ uint8_t BuildAndSendRrcDeliveryReport(uint32_t gnbCuUeF1apId, \
 
    do{
 
-      DU_LOG("\nF1AP : Building RRC delivery Message Transfer Message\n");
+      DU_LOG("\nINFO   -->  F1AP : Building RRC delivery Message Transfer Message\n");
       DU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         break;
       }
       f1apMsg->present = F1AP_PDU_PR_initiatingMessage;
       DU_ALLOC(f1apMsg->choice.initiatingMessage,sizeof(InitiatingMessage_t));
       if(f1apMsg->choice.initiatingMessage == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for  F1AP-PDU  failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for  F1AP-PDU  failed");
         break;
       }
       f1apMsg->choice.initiatingMessage->procedureCode = ProcedureCode_id_RRCDeliveryReport;
@@ -8501,7 +10202,7 @@ uint8_t BuildAndSendRrcDeliveryReport(uint32_t gnbCuUeF1apId, \
       DU_ALLOC(rrcDeliveryReport->protocolIEs.list.array, rrcDeliveryReport->protocolIEs.list.size);
       if(rrcDeliveryReport->protocolIEs.list.array == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for RRC Delivery  failed");
+        DU_LOG(" ERROR  -->  F1AP : Memory allocation for RRC Delivery  failed");
         break;
       }
       for(idx =0 ;idx <elementCnt; idx++)
@@ -8556,13 +10257,13 @@ uint8_t BuildAndSendRrcDeliveryReport(uint32_t gnbCuUeF1apId, \
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG("\nF1AP : Could not encode RRC Delivery Msg structure (at %s)\n",\
+        DU_LOG("\nERROR  -->  F1AP : Could not encode RRC Delivery Msg structure (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\nF1AP : Created APER encoded buffer for RRC Delivery Msg \n");
+        DU_LOG("\nDEBUG   -->  F1AP : Created APER encoded buffer for RRC Delivery Msg \n");
         for(idx=0; idx< encBufSize; idx++)
         {
            printf("%x",encBuf[idx]);
@@ -8572,7 +10273,7 @@ uint8_t BuildAndSendRrcDeliveryReport(uint32_t gnbCuUeF1apId, \
       /* Sending msg */
       if(SendF1APMsg(DU_APP_MEM_REGION, DU_POOL) != ROK)
       {
-        DU_LOG("\nF1AP : Sending RRC delivery  msg request failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending RRC delivery  msg request failed");
         break;
       }
       ret = ROK;
@@ -8621,7 +10322,116 @@ uint8_t extractCellsToBeActivated(Cells_to_be_Activated_List_t cellsToActivate)
    }
    return ret;
 }
+/******************************************************************
+*
+* @brief Processes F1 Setup Response allocated by aper_decoder 
+*
+* @details
+*
+*    Function : freeF1SetupRsp 
+*
+*    Functionality: free F1 Setup Response allocated by aper_decoder 
+*
+* @params[in] F1SetupResponse_t *f1SetRspMsg 
+* @return void 
+*
+* ****************************************************************/
+
+void freeAperDecodeF1SetupRsp(F1SetupResponse_t *f1SetRspMsg)
+{
+   uint8_t ieIdx =0;
+   uint8_t arrIdx =0;
+   Cells_to_be_Activated_List_t *cellToActivate =NULLP;
+   RRC_Version_t      *rrcVer =NULLP;
+
+   if(f1SetRspMsg->protocolIEs.list.array)
+   {
+      for(ieIdx=0; ieIdx<f1SetRspMsg->protocolIEs.list.count; ieIdx++)
+      {
+        if(f1SetRspMsg->protocolIEs.list.array[ieIdx])
+        {
+           switch(f1SetRspMsg->protocolIEs.list.array[ieIdx]->id)
+           {
+              case ProtocolIE_ID_id_Cells_to_be_Activated_List:
+                 {
+                    cellToActivate =
+                       &f1SetRspMsg->protocolIEs.list.array[ieIdx]->value.choice.Cells_to_be_Activated_List;
+                    if(cellToActivate->list.array)
+                    {
+                       for(arrIdx=0; arrIdx<cellToActivate->list.count ; arrIdx++)
+                       {
+                          if(cellToActivate->list.array[arrIdx])
+                          {
+
+                             if(cellToActivate->list.array[0]->value.choice.Cells_to_be_Activated_List_Item.nRCGI.\
+                             pLMN_Identity.buf)
+                             {
+                                if(cellToActivate->list.array[0]->value.choice.\
+                                      Cells_to_be_Activated_List_Item.nRCGI.nRCellIdentity.buf)
+                                {
+                                   free(cellToActivate->list.array[0]->value.choice.\
+                                         Cells_to_be_Activated_List_Item.nRCGI.nRCellIdentity.buf);
+                                }
+
+                                free(cellToActivate->list.array[0]->value.choice.Cells_to_be_Activated_List_Item.\
+                                      nRCGI.pLMN_Identity.buf);
+                             }
+                             free(cellToActivate->list.array[arrIdx]);
+                          }
+                       }
+                       free(cellToActivate->list.array);
+                    }
+                    break;
+                 }
+              case ProtocolIE_ID_id_TransactionID:
+                 {
+                    break;
+                 }
+              case ProtocolIE_ID_id_gNB_CU_Name:
+                 {
+                    free(f1SetRspMsg->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_Name.buf);
+                    break;
+                 }
+              case ProtocolIE_ID_id_GNB_CU_RRC_Version:
+                 {
+                    rrcVer = &f1SetRspMsg->protocolIEs.list.array[ieIdx]->value.choice.RRC_Version;
+                    if(rrcVer->latest_RRC_Version.buf)
+                    {
+                       if(rrcVer->iE_Extensions)
+                       {
+                          if(rrcVer->iE_Extensions->list.array)
+                          {
+                             if(rrcVer->iE_Extensions->list.array[0])
+                             {
+                                if(rrcVer->iE_Extensions->list.\
+                                      array[0]->extensionValue.choice.Latest_RRC_Version_Enhanced.buf)
+                                {
+                                   free(rrcVer->iE_Extensions->list.\
+                                         array[0]->extensionValue.choice.Latest_RRC_Version_Enhanced.buf);
+                                }
+                                free(rrcVer->iE_Extensions->list.array[0]);
+                             }
+                             free(rrcVer->iE_Extensions->list.array);
+                          }
+                          free(rrcVer->iE_Extensions);
+                       }
+                       free(rrcVer->latest_RRC_Version.buf);
+                    }
+                    break;
 
+                 }
+              default:
+                 {
+                    DU_LOG("\nERROR  -->  DU_APP : Invalid IE received in F1SetupRsp:%ld",
+                          f1SetRspMsg->protocolIEs.list.array[ieIdx]->id);
+                 }
+           }
+           free(f1SetRspMsg->protocolIEs.list.array[ieIdx]);
+        }
+      }
+      free(f1SetRspMsg->protocolIEs.list.array);
+   }
+}
 /******************************************************************
  *
  * @brief Processes F1 Setup Response sent by CU
@@ -8640,14 +10450,15 @@ uint8_t extractCellsToBeActivated(Cells_to_be_Activated_List_t cellsToActivate)
 uint8_t procF1SetupRsp(F1AP_PDU_t *f1apMsg)
 {
    uint8_t ret = ROK;
-   uint16_t idx;
+   uint16_t idx =0;
    F1SetupResponse_t *f1SetRspMsg = NULLP;
    GNB_CU_Name_t     *cuName = NULLP;
-   RRC_Version_t     *rrc_Ver = NULLP;
    F1SetupRsp  f1SetRspDb;
+   RRC_Version_t      *rrcVer =NULLP;
+   
    memset(&f1SetRspDb, 0, sizeof(F1SetupRsp));
 
-   DU_LOG("\nF1AP : F1 Setup Response received");
+   DU_LOG("\nINFO   -->  F1AP : F1 Setup Response received");
    f1SetRspMsg = &f1apMsg->choice.successfulOutcome->value.choice.F1SetupResponse;
 
    for(idx=0; idx<f1SetRspMsg->protocolIEs.list.count; idx++)
@@ -8675,41 +10486,74 @@ uint8_t procF1SetupRsp(F1AP_PDU_t *f1apMsg)
            }
         case ProtocolIE_ID_id_GNB_CU_RRC_Version:
            {
-              rrc_Ver = &f1SetRspMsg->protocolIEs.list.array[idx]->\
-                        value.choice.RRC_Version;
+              rrcVer = &f1SetRspMsg->protocolIEs.list.array[idx]->value.choice.RRC_Version;
               strcpy(f1SetRspDb.rrcVersion.rrcVer,
-                    (const char*)rrc_Ver->latest_RRC_Version.buf);
+                    (const char*)rrcVer->latest_RRC_Version.buf);
               break;
            }
         default:
-           DU_LOG("\nDU_APP : Invalid IE received in F1SetupRsp:%ld",
+           DU_LOG("\nERROR  -->  DU_APP : Invalid IE received in F1SetupRsp:%ld",
                  f1SetRspMsg->protocolIEs.list.array[idx]->id);
       }
       duProcF1SetupRsp();
    }
+   
+   freeAperDecodeF1SetupRsp(f1SetRspMsg);
    return ret;
 }
+/*******************************************************************
+*
+* @brief free GNB DU config update ack
+*
+* @details
+*
+*    Function : freeAperDecodeGnbDuAck 
+*
+*    Functionality: Processes GNB DU config update ack And
+*                     added free part for the memory allocated by aper_decoder
+*
+* @params[in] F1AP_PDU_t ASN decoded F1AP message
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+void freeAperDecodeGnbDuAck(GNBDUConfigurationUpdateAcknowledge_t *gnbDuAck)
+{
+   uint8_t ieIdx = 0;
 
+   if(gnbDuAck->protocolIEs.list.array)
+   {
+      for(ieIdx=0; ieIdx < gnbDuAck->protocolIEs.list.count; ieIdx++)
+      {
+        if(gnbDuAck->protocolIEs.list.array[ieIdx])
+        {
+           free(gnbDuAck->protocolIEs.list.array[ieIdx]);
+        }
+      }
+      free(gnbDuAck->protocolIEs.list.array);
+   }
+}
 /*******************************************************************
- *
- * @brief Processes GNB DU config update ack
- *
- * @details
- *
- *    Function : procF1GNBDUCfgUpdAck
- *
- *    Functionality: Processes GNB DU config update ack
- *
- * @params[in] F1AP_PDU_t ASN decoded F1AP message
- * @return ROK     - success
- *         RFAILED - failure
- *
- * ****************************************************************/
+*
+* @brief Processes GNB DU config update ack
+*
+* @details
+*
+*    Function : procF1GNBDUCfgUpdAck
+*
+*    Functionality: added free part for the memory allocated by aper_decoder
+*
+* @params[in] F1AP_PDU_t *f1apMsg 
+* @return void 
+*
+* ****************************************************************/
 uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg)
 {
-   uint8_t ieIdx, transId;
+   uint8_t ieIdx;
    GNBDUConfigurationUpdateAcknowledge_t *gnbDuAck = NULLP;
-
+   
+   DU_LOG("\nINFO   -->  F1AP : GNB-DU config update acknowledgment");
    gnbDuAck = &f1apMsg->choice.successfulOutcome->value.choice.GNBDUConfigurationUpdateAcknowledge;
    
    for(ieIdx=0; ieIdx < gnbDuAck->protocolIEs.list.count; ieIdx++)
@@ -8717,14 +10561,11 @@ uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg)
       switch(gnbDuAck->protocolIEs.list.array[ieIdx]->id)
       {
          case ProtocolIE_ID_id_TransactionID:
-           transId = gnbDuAck->protocolIEs.list.array[ieIdx]->\
-              value.choice.TransactionID;
-            DU_LOG("\nF1AP : GNB-DU config update acknowledgment received for transId %d", transId);
            break;
          case ProtocolIE_ID_id_Cells_to_be_Activated_List:
            break;
          default :
-            DU_LOG("\nF1AP: Invalid IE Received: %ld, at procF1GNBDUCfgUpdAck()", \
+            DU_LOG("\nERROR  -->  F1AP: Invalid IE Received: %ld, at procF1GNBDUCfgUpdAck()", \
            gnbDuAck->protocolIEs.list.array[ieIdx]->id);
            break;
       }
@@ -8736,9 +10577,62 @@ uint8_t procF1GNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg)
       return RFAILED;
    }
 #endif
+
+   freeAperDecodeGnbDuAck(gnbDuAck);
    return ROK;
 }
+/******************************************************************
+*
+* @brief free DL RRC Message Transfer allocated by aper_decoder 
+*
+* @details
+*
+*    Function : freeAperDecodef1DlRrcMsg 
+*
+*    Functionality: free DL RRC Message Transfer allocated by aper_decoder 
+*
+* @params[in] DLRRCMessageTransfer_t *f1DlRrcMsg 
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
 
+void freeAperDecodef1DlRrcMsg(DLRRCMessageTransfer_t *f1DlRrcMsg)
+{
+   uint8_t ieIdx =0;
+   RRCContainer_t *rrcContainer = NULLP;
+
+   if(f1DlRrcMsg->protocolIEs.list.array)
+   {
+      for(ieIdx=0; ieIdx<f1DlRrcMsg->protocolIEs.list.count; ieIdx++)
+      {
+        if(f1DlRrcMsg->protocolIEs.list.array[ieIdx])
+        {
+           switch(f1DlRrcMsg->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_SRBID:
+                 break;
+              case ProtocolIE_ID_id_RRCContainer:
+                 {
+                    rrcContainer =&f1DlRrcMsg->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer;
+                    free(rrcContainer->buf);
+                 }
+              case ProtocolIE_ID_id_ExecuteDuplication:
+                 break;
+              case ProtocolIE_ID_id_RRCDeliveryStatusRequest:
+                 break;
+                 break;
+           }
+           free(f1DlRrcMsg->protocolIEs.list.array[ieIdx]);
+        }
+      }
+      free(f1DlRrcMsg->protocolIEs.list.array);
+   }
+}
 /******************************************************************
  *
  * @brief Processes DL RRC Message Transfer  sent by CU
@@ -8761,7 +10655,7 @@ uint8_t procF1DlRrcMsgTrans(F1AP_PDU_t *f1apMsg)
    F1DlRrcMsg dlMsg;
    memset(&dlMsg, 0, sizeof(F1DlRrcMsg));
 
-   DU_LOG("\nDU_APP : DL RRC message transfer Recevied");
+   DU_LOG("\nINFO   -->  DU_APP : DL RRC message transfer Recevied");
    f1DlRrcMsg = &f1apMsg->choice.initiatingMessage->value.choice.DLRRCMessageTransfer;
 
    ret = ROK;
@@ -8802,13 +10696,13 @@ uint8_t procF1DlRrcMsgTrans(F1AP_PDU_t *f1apMsg)
                  }
                  else
                  {
-                    DU_LOG("\nDU_APP : Memory alloc Failed at RRC Container at procF1DlRrcMsgTrans()");
+                    DU_LOG("\nERROR  -->  DU APP : Memory alloc Failed at RRC Container at procF1DlRrcMsgTrans()");
                      return RFAILED;
                  }
               }
               else
               {
-                 DU_LOG("\nDU_APP : RRC Container Size is invalid:%ld",\
+                 DU_LOG("\nERROR  -->  DU_APP : RRC Container Size is invalid:%ld",\
                  f1DlRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.size);
                  return RFAILED;
               }
@@ -8820,12 +10714,14 @@ uint8_t procF1DlRrcMsgTrans(F1AP_PDU_t *f1apMsg)
               break;
            }
         default:
-           DU_LOG("\nDU_APP : Invalid IE received in DL RRC Msg Transfer:%ld",
+           DU_LOG("\nERROR  -->  DU_APP : Invalid IE received in DL RRC Msg Transfer:%ld",
                  f1DlRrcMsg->protocolIEs.list.array[idx]->id);
       }
    }
 
    ret = duProcDlRrcMsg(&dlMsg);
+
+   freeAperDecodef1DlRrcMsg(f1DlRrcMsg);
    return ret;
 }
 
@@ -8848,15 +10744,14 @@ uint8_t procF1DlRrcMsgTrans(F1AP_PDU_t *f1apMsg)
  * ****************************************************************/
 void F1APMsgHdlr(Buffer *mBuf)
 {
-   int i;
-   char *recvBuf;
-   MsgLen copyCnt;
-   MsgLen recvBufLen;
-   F1AP_PDU_t *f1apMsg;
+   int i =0;
+   char *recvBuf =NULLP;
+   MsgLen copyCnt =0;
+   MsgLen recvBufLen =0;
+   F1AP_PDU_t *f1apMsg =NULLP;
    asn_dec_rval_t rval; /* Decoder return value */
    F1AP_PDU_t f1apasnmsg ;
-
-   DU_LOG("\nF1AP : Received F1AP message buffer");
+   DU_LOG("\nINFO  -->  F1AP : Received F1AP message buffer");
    ODU_PRINT_MSG(mBuf, 0,0);
 
    /* Copy mBuf into char array to decode it */
@@ -8865,16 +10760,16 @@ void F1APMsgHdlr(Buffer *mBuf)
 
    if(recvBuf == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed");
       return;
    }
    if(ODU_COPY_MSG_TO_FIX_BUF(mBuf, 0, recvBufLen, (Data *)recvBuf, &copyCnt) != ROK)
    {
-      DU_LOG("\nF1AP : Failed while copying %d", copyCnt);
+      DU_LOG("\nERROR   -->  F1AP : Failed while copying %d", copyCnt);
       return;
    }
 
-   printf("\nF1AP : Received flat buffer to be decoded : ");
+   printf("\nDEBUG   -->  F1AP : Received flat buffer to be decoded : ");
    for(i=0; i< recvBufLen; i++)
    {
       printf("%x",recvBuf[i]);
@@ -8889,7 +10784,7 @@ void F1APMsgHdlr(Buffer *mBuf)
 
    if(rval.code == RC_FAIL || rval.code == RC_WMORE)
    {
-      DU_LOG("\nF1AP : ASN decode failed");
+      DU_LOG("\nERROR  -->  F1AP : ASN decode failed");
       return;
    }
    printf("\n");
@@ -8903,7 +10798,7 @@ void F1APMsgHdlr(Buffer *mBuf)
            {
               case SuccessfulOutcome__value_PR_ResetAcknowledge:
                  {
-                    DU_LOG("\nF1AP : F1ResetAcknowledge is received successfully ");
+                    DU_LOG("\nINFO   -->  F1AP : F1ResetAcknowledge is received successfully ");
                     break;
                  }
               case SuccessfulOutcome__value_PR_F1SetupResponse:
@@ -8922,10 +10817,12 @@ void F1APMsgHdlr(Buffer *mBuf)
 
               default:
                  {
-                    DU_LOG("\nF1AP : Invalid type of successful outcome [%d]", f1apMsg->choice.successfulOutcome->value.present);
+                    DU_LOG("\nERROR  -->  F1AP : Invalid type of SuccessfulOutcome__value_PR_ResetAcknowledge [%d]",\
+                    f1apMsg->choice.successfulOutcome->value.present);
                     return;
                  }
            }/* End of switch(successfulOutcome) */
+           free(f1apMsg->choice.successfulOutcome);
            break;
         }
       case F1AP_PDU_PR_initiatingMessage:
@@ -8934,7 +10831,6 @@ void F1APMsgHdlr(Buffer *mBuf)
            {
               case InitiatingMessage__value_PR_Reset:
                  {
-                    DU_LOG("\nF1AP : F1 reset request received");
                     procF1ResetReq(f1apMsg);
                     break;
                  }
@@ -8948,22 +10844,23 @@ void F1APMsgHdlr(Buffer *mBuf)
                     procF1UeContextSetupReq(f1apMsg);
                     break;
                  }
-
               default:
                  {
-                    DU_LOG("\nF1AP : Invalid type of initiating message[%d]",
+                    DU_LOG("\nERROR  -->  F1AP : Invalid type of F1AP_PDU_PR_initiatingMessage [%d]",
                           f1apMsg->choice.initiatingMessage->value.present);
                     return;
                  }
            }/* End of switch(initiatingMessage) */
+           free(f1apMsg->choice.initiatingMessage);
            break;
         }
 
       default:
         {
-           DU_LOG("\nF1AP : Invalid type of f1apMsg->present [%d]",f1apMsg->present);
+           DU_LOG("\nERROR  -->  F1AP : Invalid type of f1apMsg->present [%d]",f1apMsg->present);
            return;
         }
+        free(f1apMsg);
 
    }/* End of switch(f1apMsg->present) */