diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h
index 11286b8cfb8261308f0cdca58a3439d882fd688a..82b40f57e8dd05985ffa62a85957396cee881964 100755
--- a/openair2/COMMON/platform_types.h
+++ b/openair2/COMMON/platform_types.h
@@ -182,4 +182,10 @@ typedef struct protocol_ctxt_s {
     frame_t     frame;         /*!< \brief  LTE Frame number.*/
     eNB_flag_t  enb_flag;      /*!< \brief  Flag to indicate eNB (1) or UE (0) */
 } protocol_ctxt_t;
+#define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02u/%02u]"
+#define PROTOCOL_CTXT_ARGS(CTXT_Pp) \
+        CTXT_Pp->frame, \
+        (CTXT_Pp->enb_flag == ENB_FLAG_YES) ? "eNB":" UE", \
+        CTXT_Pp->enb_module_id, \
+        CTXT_Pp->ue_module_id
 #endif
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
index 572ee4f64d8e5954ce8b279327ffc56f0d18a386..38bc2abde7d3ea0bb2df6cabe1dbd1e1d61235ab 100755
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
@@ -70,7 +70,10 @@ rlc_am_get_buffer_occupancy_in_bytes (
       if (rlc_pP->t_status_prohibit.running == 0) {
 #ifdef TRACE_RLC_AM_BO
           if (((15  +  rlc_pP->num_nack_sn*(10+1)  +  rlc_pP->num_nack_so*(15+15+1) + 7) >> 3) > 0) {
-              LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : CONTROL PDU %d bytes \n", ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, ((15  +  rlc_pP->num_nack_sn*(10+1)  +  rlc_pP->num_nack_so*(15+15+1) + 7) >> 3));
+              LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" BO : CONTROL PDU %d bytes \n",
+                    PROTOCOL_CTXT_ARGS(ctxt_pP),
+                    RB_AM_ARGS(rlc_pP),
+                    ((15  +  rlc_pP->num_nack_sn*(10+1)  +  rlc_pP->num_nack_so*(15+15+1) + 7) >> 3));
           }
 #endif
           return ((15  +  rlc_pP->num_nack_sn*(10+1)  +  rlc_pP->num_nack_so*(15+15+1) + 7) >> 3);
@@ -92,9 +95,15 @@ rlc_am_get_buffer_occupancy_in_bytes (
 
 #ifdef TRACE_RLC_AM_BO
   if ((rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead) > 0) {
-    LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : STATUS  BUFFER %d bytes \n", ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->status_buffer_occupancy);
-    LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : RETRANS BUFFER %d bytes \n", ctxt_pP->frame, rlc_pP->module_id,rlc_pP->rb_id, rlc_pP->retransmission_buffer_occupancy);
-    LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : SDU     BUFFER %d bytes + li_overhead %d bytes header_overhead %d bytes (nb sdu not segmented %d)\n", ctxt_pP->frame, rlc_pP->module_id,rlc_pP->rb_id, rlc_pP->sdu_buffer_occupancy, max_li_overhead, header_overhead, rlc_pP->nb_sdu_no_segmented);
+    LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" BO : STATUS  BUFFER %d bytes \n", PROTOCOL_CTXT_ARGS(ctxt_pP), RB_AM_ARGS(rlc_pP), rlc_pP->status_buffer_occupancy);
+    LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" BO : RETRANS BUFFER %d bytes \n", PROTOCOL_CTXT_ARGS(ctxt_pP), RB_AM_ARGS(rlc_pP), rlc_pP->retransmission_buffer_occupancy);
+    LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" BO : SDU     BUFFER %d bytes + li_overhead %d bytes header_overhead %d bytes (nb sdu not segmented %d)\n",
+          PROTOCOL_CTXT_ARGS(ctxt_pP),
+          RB_AM_ARGS(rlc_pP),
+          rlc_pP->sdu_buffer_occupancy,
+          max_li_overhead,
+          header_overhead,
+          rlc_pP->nb_sdu_no_segmented);
   }
 #endif
   return rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead;
@@ -128,20 +137,15 @@ config_req_rlc_am (
     if (h_rc == HASH_TABLE_OK) {
         l_rlc_p = &rlc_union_p->rlc.am;
         LOG_D(RLC,
-            "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u]\n",
-            ctxt_pP->frame,
-            ( ctxt_pP->enb_flag > 0) ? "eNB":"UE",
-            ctxt_pP->enb_module_id,
-            ctxt_pP->ue_module_id,
-            config_am_pP->max_retx_threshold,
-            config_am_pP->poll_pdu,
-            config_am_pP->poll_byte,
-            config_am_pP->t_poll_retransmit,
-            config_am_pP->t_reordering,
-            config_am_pP->t_status_prohibit,
-            ctxt_pP->enb_module_id,
-            ctxt_pP->ue_module_id,
-            rb_idP);
+              PROTOCOL_CTXT_FMT RB_AM_FMT" CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d)\n",
+              PROTOCOL_CTXT_ARGS(ctxt_pP),
+              RB_AM_ARGS(l_rlc_p),
+              config_am_pP->max_retx_threshold,
+              config_am_pP->poll_pdu,
+              config_am_pP->poll_byte,
+              config_am_pP->t_poll_retransmit,
+              config_am_pP->t_reordering,
+              config_am_pP->t_status_prohibit);
         rlc_am_init(ctxt_pP, l_rlc_p);
         rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP);
         rlc_am_configure(ctxt_pP, l_rlc_p,
@@ -152,14 +156,9 @@ config_req_rlc_am (
                config_am_pP->t_reordering,
                config_am_pP->t_status_prohibit);
     } else {
-        LOG_E(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ  --->][RLC_AM][MOD %u/%u][RB %u] RLC NOT FOUND\n",
-            ctxt_pP->frame,
-            (ctxt_pP->enb_flag) ? "eNB" : "UE",
-            ctxt_pP->enb_module_id,
-            ctxt_pP->ue_module_id,
-            ctxt_pP->enb_module_id,
-            ctxt_pP->ue_module_id,
-            rb_idP);
+        LOG_E(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" CONFIG_REQ RLC NOT FOUND\n",
+              PROTOCOL_CTXT_ARGS(ctxt_pP),
+              RB_AM_ARGS(l_rlc_p));
     }
 }
 uint32_t pollPDU_tab[PollPDU_pInfinity+1]={4,8,16,32,64,128,256,1024};  // What is PollPDU_pInfinity??? 1024 for now
@@ -192,20 +191,15 @@ void config_req_rlc_am_asn1 (
           (config_am_pP->dl_AM_RLC.t_Reordering<T_Reordering_spare1) &&
           (config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare8) ){
 
-          LOG_D(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u]\n",
-              ctxt_pP->frame,
-              (ctxt_pP->enb_flag) ? "eNB" : "UE",
-              ctxt_pP->enb_module_id,
-              ctxt_pP->ue_module_id,
+          LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d)\n",
+                PROTOCOL_CTXT_ARGS(ctxt_pP),
+                RB_AM_ARGS(l_rlc_p),
               maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold],
               pollPDU_tab[config_am_pP->ul_AM_RLC.pollPDU],
               pollByte_tab[config_am_pP->ul_AM_RLC.pollByte],
               PollRetransmit_tab[config_am_pP->ul_AM_RLC.t_PollRetransmit],
               am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
-              t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit],
-              ctxt_pP->enb_module_id,
-              ctxt_pP->ue_module_id,
-              rb_idP);
+              t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
 
           rlc_am_init(ctxt_pP, l_rlc_p);
           rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP);
@@ -218,30 +212,20 @@ void config_req_rlc_am_asn1 (
               t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
       } else {
           LOG_D(RLC,
-              "[FRAME %5u][%s][RRC][MOD %u/%u][][--- ILLEGAL CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u], RLC-AM NOT CONFIGURED\n",
-              ctxt_pP->frame,
-              (ctxt_pP->enb_flag) ? "eNB" : "UE",
-              ctxt_pP->enb_module_id,
-              ctxt_pP->ue_module_id,
-              config_am_pP->ul_AM_RLC.maxRetxThreshold,
-              config_am_pP->ul_AM_RLC.pollPDU,
-              config_am_pP->ul_AM_RLC.pollByte,
-              config_am_pP->ul_AM_RLC.t_PollRetransmit,
-              config_am_pP->dl_AM_RLC.t_Reordering,
-              config_am_pP->dl_AM_RLC.t_StatusProhibit,
-              ctxt_pP->enb_module_id,
-              ctxt_pP->ue_module_id,
-              rb_idP);
+                PROTOCOL_CTXT_FMT RB_AM_FMT "ILLEGAL CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d), RLC-AM NOT CONFIGURED\n",
+                PROTOCOL_CTXT_ARGS(ctxt_pP),
+                RB_AM_ARGS(l_rlc_p),
+                config_am_pP->ul_AM_RLC.maxRetxThreshold,
+                config_am_pP->ul_AM_RLC.pollPDU,
+                config_am_pP->ul_AM_RLC.pollByte,
+                config_am_pP->ul_AM_RLC.t_PollRetransmit,
+                config_am_pP->dl_AM_RLC.t_Reordering,
+                config_am_pP->dl_AM_RLC.t_StatusProhibit);
       }
   } else {
-      LOG_E(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ  --->][RLC_AM][MOD %u/%u][RB %u] RLC NOT FOUND\n",
-          ctxt_pP->frame,
-          (ctxt_pP->enb_flag) ? "eNB" : "UE",
-          ctxt_pP->enb_module_id,
-          ctxt_pP->ue_module_id,
-          ctxt_pP->enb_module_id,
-          ctxt_pP->ue_module_id,
-          rb_idP);
+      LOG_E(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT "CONFIG_REQ RLC NOT FOUND\n",
+            PROTOCOL_CTXT_ARGS(ctxt_pP),
+            RB_AM_ARGS(l_rlc_p));
   }
 }
 
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h
index eb141fe59af6e50868e0f5cf6e1ebc3c74d15202..07adee66690de5b108f49bb0c088b9672a5be8b2 100755
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h
@@ -86,6 +86,11 @@
 
 
 
+#define RB_AM_FMT "[%s %02u]"
+#define RB_AM_ARGS(RLC_Pp) \
+        (RLC_Pp->is_data_plane == TRUE) ? "DRB AM":"SRB AM", \
+        RLC_Pp->rb_id
+
 /*! \fn void     rlc_am_release (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP)
 * \brief    Empty function, TO DO.
 * \param[in]  ctxt_pP          Running context.
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c
index 3e9c95df1c9c833ad9b648182abf486159e797d5..0e45f52eb4796241e06a9e329445eb401d0ef630 100755
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c
@@ -43,9 +43,11 @@ rlc_am_init(
 //-----------------------------------------------------------------------------
 {
     if (rlc_pP->initialized == TRUE) {
-        LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n", ctxt_pP->frame);
+        LOG_D(RLC, PROTOCOL_CTXT_FMT"[AM INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n",
+              PROTOCOL_CTXT_ARGS(ctxt_pP));
     } else {
-        LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] INITIALIZATION: STATE VARIABLES, BUFFERS, LISTS\n", ctxt_pP->frame);
+        LOG_D(RLC, PROTOCOL_CTXT_FMT"[AM INIT] INITIALIZATION: STATE VARIABLES, BUFFERS, LISTS\n",
+              PROTOCOL_CTXT_ARGS(ctxt_pP));
         memset(rlc_pP, 0, sizeof(rlc_am_entity_t));
 
         list2_init(&rlc_pP->receiver_buffer,      "RX BUFFER");
@@ -59,8 +61,14 @@ rlc_am_init(
 #warning "cast the rlc retrans buffer to uint32"
 	//        rlc_pP->pdu_retrans_buffer       = calloc(1, (uint16_t)((unsigned int)RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE*(unsigned int)sizeof(rlc_am_tx_data_pdu_management_t)));
         rlc_pP->pdu_retrans_buffer       = calloc(1, (uint32_t)((unsigned int)RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE*(unsigned int)sizeof(rlc_am_tx_data_pdu_management_t)));
-        LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] input_sdus[] = %p  element size=%d\n", ctxt_pP->frame, rlc_pP->input_sdus,sizeof(rlc_am_tx_sdu_management_t));
-        LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] pdu_retrans_buffer[] = %p element size=%d\n", ctxt_pP->frame, rlc_pP->pdu_retrans_buffer,sizeof(rlc_am_tx_data_pdu_management_t));
+        LOG_D(RLC, PROTOCOL_CTXT_FMT"[AM INIT] input_sdus[] = %p  element size=%d\n",
+              PROTOCOL_CTXT_ARGS(ctxt_pP),
+              rlc_pP->input_sdus,
+              sizeof(rlc_am_tx_sdu_management_t));
+        LOG_D(RLC, PROTOCOL_CTXT_FMT"[AM INIT] pdu_retrans_buffer[] = %p element size=%d\n",
+              PROTOCOL_CTXT_ARGS(ctxt_pP),
+              rlc_pP->pdu_retrans_buffer,
+              sizeof(rlc_am_tx_data_pdu_management_t));
 
         // TX state variables
         //rlc_pP->vt_a    = 0;
@@ -104,7 +112,8 @@ rlc_am_reestablish(
      *    - stop and reset all timers;
      *    - reset all state variables to their initial values.
      */
-    LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][REESTABLISH] RE-INIT STATE VARIABLES, BUFFERS, LISTS\n", ctxt_pP->frame);
+    LOG_D(RLC, PROTOCOL_CTXT_FMT"[AM REESTABLISH] RE-INIT STATE VARIABLES, BUFFERS, LISTS\n",
+          PROTOCOL_CTXT_ARGS(ctxt_pP));
 
 #warning TODO when possible reassemble RLC SDUs from any byte segments of AMD PDUs with SN inf VR(MR)
     list2_free(&rlc_pP->receiver_buffer);
@@ -141,15 +150,13 @@ rlc_am_reestablish(
 //-----------------------------------------------------------------------------
 void
 rlc_am_cleanup(
-                const protocol_ctxt_t* const  ctxt_pP,
-                rlc_am_entity_t* const        rlc_pP)
+                rlc_am_entity_t* const        rlc_pP
+                )
 //-----------------------------------------------------------------------------
 {
-    LOG_I(RLC, "[FRAME ?????][%s][RLC_AM][MOD %u/%u][RB %u][CLEANUP]\n",
-          (ctxt_pP->enb_flag) ? "eNB" : "UE",
-          ctxt_pP->enb_module_id,
-          ctxt_pP->ue_module_id,
-          rlc_pP->rb_id);
+    LOG_I(RLC, RB_AM_FMT"[CLEANUP %p]\n",
+          RB_AM_ARGS(rlc_pP),
+          rlc_pP);
 
     list2_free(&rlc_pP->receiver_buffer);
     list_free(&rlc_pP->pdus_to_mac_layer);
@@ -199,11 +206,8 @@ rlc_am_configure(
 //-----------------------------------------------------------------------------
 {
   if (rlc_pP->configured == TRUE) {
-      LOG_I(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
-          ctxt_pP->frame,
-          (ctxt_pP->enb_flag) ? "eNB" : "UE",
-          ctxt_pP->enb_module_id,
-          ctxt_pP->ue_module_id,
+      LOG_I(RLC, PROTOCOL_CTXT_FMT"[RB AM %u][RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
+          PROTOCOL_CTXT_ARGS(ctxt_pP),
           rlc_pP->rb_id,
           max_retx_thresholdP,
           poll_pduP,
@@ -221,18 +225,15 @@ rlc_am_configure(
       rlc_pP->t_reordering.time_out        = t_reorderingP;
       rlc_pP->t_status_prohibit.time_out   = t_status_prohibitP;
   } else {
-      LOG_I(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][CONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
-          ctxt_pP->frame,
-          (ctxt_pP->enb_flag) ? "eNB" : "UE",
-          ctxt_pP->enb_module_id,
-          ctxt_pP->ue_module_id,
-          rlc_pP->rb_id,
-          max_retx_thresholdP,
-          poll_pduP,
-          poll_byteP,
-          t_poll_retransmitP,
-          t_reorderingP,
-          t_status_prohibitP);
+      LOG_I(RLC, PROTOCOL_CTXT_FMT"[RB AM %u][CONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
+            PROTOCOL_CTXT_ARGS(ctxt_pP),
+            rlc_pP->rb_id,
+            max_retx_thresholdP,
+            poll_pduP,
+            poll_byteP,
+            t_poll_retransmitP,
+            t_reorderingP,
+            t_status_prohibitP);
 
       rlc_pP->max_retx_threshold = max_retx_thresholdP;
       rlc_pP->poll_pdu           = poll_pduP;
@@ -257,17 +258,6 @@ rlc_am_set_debug_infos(
                 const rb_id_t                 rb_idP)
 //-----------------------------------------------------------------------------
 {
-    LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SET DEBUG INFOS] module_id %d rb_id %d is SRB %d\n",
-          ctxt_pP->frame,
-          (ctxt_pP->enb_flag) ? "eNB" : "UE",
-          ctxt_pP->enb_module_id,
-          ctxt_pP->ue_module_id,
-          rb_idP,
-          ctxt_pP->enb_module_id,
-          ctxt_pP->ue_module_id,
-          rb_idP,
-          (srb_flagP) ? "TRUE" : "FALSE");
-
 
     rlc_pP->rb_id         = rb_idP;
     if (srb_flagP) {
@@ -275,4 +265,8 @@ rlc_am_set_debug_infos(
     } else {
       rlc_pP->is_data_plane = 1;
     }
+    LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT "[SET DEBUG INFOS]\n",
+          PROTOCOL_CTXT_ARGS(ctxt_pP),
+          RB_AM_ARGS(rlc_pP));
+
 }
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h
index 464a3db97582b2d312225785d1c7f6688a4d1a18..b72f286e15d8fd6beede9a68eb6e43db23c58147 100755
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h
@@ -85,12 +85,11 @@ typedef volatile struct {
 */
 public_rlc_am_init( void rlc_am_init   (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t* rlc_pP);)
 
-/*! \fn void rlc_am_cleanup(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t *const rlc_pP)
+/*! \fn void rlc_am_cleanup(rlc_am_entity_t *const rlc_pP)
 * \brief    Free all memory resources allocated and kept by this RLC AM instance.
-* \param[in]  ctxtP                     Running context.
 * \param[in]  rlc_pP                    RLC AM protocol instance pointer.
 */
-public_rlc_am_init( void rlc_am_cleanup(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t* rlc_pP);)
+public_rlc_am_init( void rlc_am_cleanup(rlc_am_entity_t* rlc_pP);)
 
 /*! \fn void rlc_am_configure(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP,  uint16_t max_retx_thresholdP, uint16_t poll_pduP, uint16_t poll_byteP, uint32_t t_poll_retransmitP, uint32_t t_reorderingP, uint32_t t_status_prohibitP)
 * \brief    Set RLC AM protocol parameters.
diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c
index c6e762273c7b1f7c0d7659cb93a5918955651cc3..d311efa07373591918e95c97bc1b533966189809 100755
--- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c
+++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c
@@ -122,7 +122,6 @@ rlc_tm_reset_state_variables (
 //-----------------------------------------------------------------------------
 void
 rlc_tm_cleanup (
-                const protocol_ctxt_t* const  ctxt_pP,
                 rlc_tm_entity_t * const rlcP
                 )
 {
diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h
index 729968162f64ef16658f8b23f602cd73ba0fd6c8..282297464d19a8abebb5044b760d48995bd8ce1b 100755
--- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h
+++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h
@@ -104,12 +104,11 @@ protected_rlc_tm_init(void rlc_tm_reset_state_variables (
                 const protocol_ctxt_t* const  ctxt_pP,
                 rlc_tm_entity_t * const rlcP);)
 
-/*! \fn void rlc_tm_cleanup(const protocol_ctxt_t* const  ctxt_pP,rlc_tm_entity_t * const rlcP)
+/*! \fn void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP)
 * \brief    Free all allocated memory (lists and buffers) previously allocated by this RLC TM instance.
 * \param[in]  rlcP                      RLC TM protocol instance pointer.
 */
 public_rlc_tm_init(   void rlc_tm_cleanup(
-                const protocol_ctxt_t* const  ctxt_pP,
                 rlc_tm_entity_t * const rlcP);)
 
 /*! \fn void rlc_tm_configure(const protocol_ctxt_t* const  ctxt_pP,rlc_tm_entity_t * const rlcP, const boolean_t is_uplink_downlinkP)
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
index 20d5c79acba7483fb519dcfdc1c49e522ba27320..e8dbf59ccbc8ef99ff8a8445a7f52695fb4cb261 100755
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
@@ -286,7 +286,6 @@ rlc_um_reset_state_variables (
 //-----------------------------------------------------------------------------
 void
 rlc_um_cleanup (
-                const protocol_ctxt_t* const ctxt_pP,
                 rlc_um_entity_t * const rlc_pP)
 {
   //-----------------------------------------------------------------------------
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h
index e9c691114b7c5d5f7db6431fa5b81b73d237e885..ae5bd62093f6f342d9c7eca2ba4eef7d0ccaf57d 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h
@@ -138,13 +138,11 @@ protected_rlc_um_control_primitives(void rlc_um_reset_state_variables (
                 const protocol_ctxt_t* const ctxt_pP,
                 rlc_um_entity_t * const rlc_pP);)
 
-/*! \fn void rlc_um_cleanup(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
+/*! \fn void rlc_um_cleanup(rlc_um_entity_t * const rlc_pP)
 * \brief    Free all allocated memory (lists and buffers) previously allocated by this RLC UM instance.
-* \param[in]  ctxtP                     Running context.
 * \param[in]  rlc_pP                    RLC UM protocol instance pointer.
 */
 public_rlc_um_control_primitives(   void rlc_um_cleanup(
-                const protocol_ctxt_t* const ctxt_pP,
                 rlc_um_entity_t * const rlc_pP);)
 
 /*! \fn void rlc_um_configure(
diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c
index 320849bda8314cb7bfeffc4e4f5f880c03b541a0..510a2cccbab5ed219e4af4dcef638027a550b0d7 100644
--- a/openair2/LAYER2/RLC/rlc.c
+++ b/openair2/LAYER2/RLC/rlc.c
@@ -524,11 +524,11 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t* const ctxtP,
                   rlc_um_data_req(ctxtP, &rlc_union_p->rlc.um, new_sdu_p);
 
                   //free_mem_block(new_sdu);
-		  vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
+                  vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
                   return RLC_OP_STATUS_OK;
               } else {
-		vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
-		return RLC_OP_STATUS_INTERNAL_ERROR;
+                  vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
+                  return RLC_OP_STATUS_INTERNAL_ERROR;
               }
               break;
 
@@ -559,18 +559,18 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t* const ctxtP,
                                  rb_idP);
                   LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
                   rlc_tm_data_req(ctxtP, &rlc_union_p->rlc.tm, new_sdu_p);
-		  vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
+                  vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
                   return RLC_OP_STATUS_OK;
               } else {
                   //handle_event(ERROR,"FILE %s FONCTION rlc_data_req() LINE %s : out of memory\n", __FILE__, __LINE__);
-		vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
-		return RLC_OP_STATUS_INTERNAL_ERROR;
+                  vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
+                  return RLC_OP_STATUS_INTERNAL_ERROR;
               }
               break;
 
           default:
               free_mem_block(sdu_pP);
-	      vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
+              vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
               return RLC_OP_STATUS_INTERNAL_ERROR;
 
       }
@@ -605,18 +605,18 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t* const ctxtP,
                       rlc_um_data_req(ctxtP, &rlc_union_p->rlc.um, new_sdu_p);
 
                       //free_mem_block(new_sdu);
-		      vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
+                      vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
                       return RLC_OP_STATUS_OK;
                   } else {
-		    vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
+                      vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
                       return RLC_OP_STATUS_BAD_PARAMETER;
                   }
               } else {
-		vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
+                  vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
                   return RLC_OP_STATUS_BAD_PARAMETER;
               }
           } else {
-	    vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
+              vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
               return RLC_OP_STATUS_BAD_PARAMETER;
           }
   }
diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h
index aefef53707fbb825e8c3b2b385adc2e2674bec48..493e054065cb7cc09891e42cdd9ea9b5b35003b1 100755
--- a/openair2/LAYER2/RLC/rlc.h
+++ b/openair2/LAYER2/RLC/rlc.h
@@ -335,11 +335,10 @@ public_rlc_rrc( rlc_op_status_t rrc_rlc_config_asn1_req (
 /*! \fn void rb_free_rlc_union (void *rlcu_pP)
  * \brief  Free the rlc memory contained in the RLC embedded in the rlc_union_t
  *  struct pointed by of the rlcu_pP parameter. Free the rlc_union_t struct also.
- * \param[in]  ctxtP              Running context.
  * \param[in]  rlcu_pP          Pointer on the rlc_union_t struct.
  */
 public_rlc_rrc(void
-    rb_free_rlc_union (const protocol_ctxt_t* const ctxt_pP, void *rlcu_pP);)
+    rb_free_rlc_union (void *rlcu_pP);)
 
 
 /*! \fn rlc_op_status_t rrc_rlc_remove_ue   (const protocol_ctxt_t* const ctxtP)
diff --git a/openair2/LAYER2/RLC/rlc_rrc.c b/openair2/LAYER2/RLC/rlc_rrc.c
index ed9d611fa35014d20c78c8c80125db2f3b93513e..23e770851ac081da45157a47a7ae47cf1a65bdc0 100644
--- a/openair2/LAYER2/RLC/rlc_rrc.c
+++ b/openair2/LAYER2/RLC/rlc_rrc.c
@@ -407,22 +407,22 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP
 //-----------------------------------------------------------------------------
 void
 rb_free_rlc_union (
-                const protocol_ctxt_t* const ctxt_pP,
                 void *rlcu_pP)
 {
 //-----------------------------------------------------------------------------
   rlc_union_t * rlcu_p;
     if (rlcu_pP) {
         rlcu_p = (rlc_union_t *)(rlcu_pP);
+        LOG_D(RLC,"%s %p \n",__FUNCTION__,rlcu_pP);
         switch (rlcu_p->mode) {
           case RLC_MODE_AM:
-              rlc_am_cleanup(ctxt_pP, &rlcu_p->rlc.am);
+              rlc_am_cleanup(&rlcu_p->rlc.am);
               break;
           case RLC_MODE_UM:
-              rlc_um_cleanup(ctxt_pP, &rlcu_p->rlc.um);
+              rlc_um_cleanup(&rlcu_p->rlc.um);
               break;
           case RLC_MODE_TM:
-              rlc_tm_cleanup(ctxt_pP, &rlcu_p->rlc.tm);
+              rlc_tm_cleanup(&rlcu_p->rlc.tm);
               break;
           default:
             LOG_W(RLC,
@@ -431,11 +431,6 @@ rb_free_rlc_union (
                 rlcu_pP);
             break;
         }
-        LOG_D(RLC,
-            "%s %p \n",
-            __FUNCTION__,
-            rlcu_pP);
-        free(rlcu_p);
     }
 }
 
@@ -529,7 +524,7 @@ rlc_op_status_t rrc_rlc_remove_rlc   (
 
     h_rc = hashtable_get(rlc_coll_p, key, &rlc_union_p);
     if (h_rc == HASH_TABLE_OK) {
-        switch (rlc_union_p->mode) {
+        /*switch (rlc_union_p->mode) {
             case RLC_MODE_AM:
                 rlc_am_cleanup(ctxt_pP, &rlc_union_p->rlc.am);
                 break;
@@ -542,6 +537,8 @@ rlc_op_status_t rrc_rlc_remove_rlc   (
             default:
 	      break;
         }
+        cleanup is done in free() callback function configured in hashtable
+        */
         h_rc = hashtable_remove(rlc_coll_p, key);
         LOG_D(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] RELEASED %s\n",
             ctxt_pP->frame,