From 15f49ff2a1792ee1fb128308fb8fd00fa593b499 Mon Sep 17 00:00:00 2001 From: Lionel Gauthier Date: Wed, 26 Nov 2014 15:52:27 +0000 Subject: [PATCH] git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6110 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- openair2/LAYER2/RLC/rlc.c | 12 ++++++++---- openair2/LAYER2/RLC/rlc_mac.c | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c index 307fe7e37d..58d92e5adb 100644 --- a/openair2/LAYER2/RLC/rlc.c +++ b/openair2/LAYER2/RLC/rlc.c @@ -54,10 +54,11 @@ extern boolean_t pdcp_data_ind( const sdu_size_t sdu_buffer_sizeP, mem_block_t* const sdu_buffer_pP); -#define DEBUG_RLC_PDCP_INTERFACE - +#define DEBUG_RLC_PDCP_INTERFACE 1 +//#define DEBUG_RLC_PAYLOAD 1 #define DEBUG_RLC_DATA_REQ 1 +#if defined(DEBUG_RLC_PAYLOAD) //----------------------------------------------------------------------------- void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char* dataP, const signed long sizeP) //----------------------------------------------------------------------------- @@ -98,7 +99,7 @@ void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char* dataP, con LOG_T(componentP, " "); LOG_T(componentP, " |\n"); } - +#endif //----------------------------------------------------------------------------- rlc_op_status_t rlc_stat_req ( const module_id_t enb_module_idP, @@ -441,7 +442,9 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP, enb_module_idP, ue_module_idP, rb_idP); +#if defined(DEBUG_RLC_PAYLOAD) rlc_util_print_hex_octets(RLC, (unsigned char*)sdu_pP->data, sdu_sizeP); +#endif #ifdef DEBUG_RLC_DATA_REQ LOG_D(RLC,"RLC_TYPE : %d ",rlc_mode); @@ -649,6 +652,7 @@ void rlc_data_ind ( //----------------------------------------------------------------------------- +#if defined(DEBUG_RLC_PAYLOAD) LOG_D(RLC, "[FRAME %5u][%s][RLC][INST %u/%u][%s %u] Display of rlc_data_ind: size %u\n", frameP, (enb_flagP) ? "eNB" : "UE", @@ -659,7 +663,7 @@ void rlc_data_ind ( sdu_sizeP); rlc_util_print_hex_octets(RLC, (unsigned char*)sdu_pP->data, sdu_sizeP); - +#endif LOG_D(RLC, "[FRAME %5u][%s][RLC][INST %u/%u][%s %u][--- RLC_DATA_IND/%d Bytes --->][PDCP][INST %u/%u][%s %u]\n", frameP, (enb_flagP) ? "eNB" : "UE", diff --git a/openair2/LAYER2/RLC/rlc_mac.c b/openair2/LAYER2/RLC/rlc_mac.c index 52d679674a..f6592263a2 100644 --- a/openair2/LAYER2/RLC/rlc_mac.c +++ b/openair2/LAYER2/RLC/rlc_mac.c @@ -76,8 +76,10 @@ struct mac_data_ind mac_rlc_deserialize_tb ( memcpy(((struct mac_tb_ind *) (tb_p->data))->data_ptr, &buffer_pP[tbs_size], tb_sizeP); #ifdef DEBUG_MAC_INTERFACE +#if defined(DEBUG_RLC_PAYLOAD) LOG_T(RLC, "[MAC-RLC] DUMP RX PDU(%d bytes):\n", tb_sizeP); rlc_util_print_hex_octets(RLC, ((struct mac_tb_ind *) (tb_p->data))->data_ptr, tb_sizeP); +#endif #endif nb_tb_read = nb_tb_read + 1; tbs_size = tbs_size + tb_sizeP; @@ -103,8 +105,10 @@ tbs_size_t mac_rlc_serialize_tb (char* buffer_pP, list_t transport_blocksP) { if (tb_p != NULL) { tb_size = ((struct mac_tb_req *) (tb_p->data))->tb_size; #ifdef DEBUG_MAC_INTERFACE +#if defined(DEBUG_RLC_PAYLOAD) LOG_T(RLC, "[MAC-RLC] DUMP TX PDU(%d bytes):\n", tb_size); rlc_util_print_hex_octets(RLC, ((struct mac_tb_req *) (tb_p->data))->data_ptr, tb_size); +#endif #endif memcpy(&buffer_pP[tbs_size], &((struct mac_tb_req *) (tb_p->data))->data_ptr[0], tb_size); tbs_size = tbs_size + tb_size;