Commit 062d13a1 authored by gauthier's avatar gauthier

debug traces for uplink problem (missing packets with dongle bandluxe)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6102 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 22cd070e
......@@ -169,11 +169,12 @@ rlc_um_get_pdus (void *argP, frame_t frameP)
break;
default:
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_DATA_REQ UNKNOWN PROTOCOL STATE %02X hex\n",
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_DATA_REQ UNKNOWN PROTOCOL STATE %02X hex\n",
frameP,
(rlc_p->is_enb) ? "eNB" : "UE",
rlc_p->enb_module_id,
rlc_p->ue_module_id,
(rlc_p->is_data_plane) ? "DRB" : "SRB",
rlc_p->rb_id,
rlc_p->protocol_state);
}
......@@ -256,11 +257,12 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
#ifdef TRACE_RLC_UM_PDU
if (data_indP.data.nb_elements > 0) {
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_DATA_IND %d TBs\n",
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_DATA_IND %d TBs\n",
frameP,
(l_rlc_p->is_enb) ? "eNB" : "UE",
l_rlc_p->enb_module_id,
l_rlc_p->ue_module_id,
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
l_rlc_p->rb_id,
data_indP.data.nb_elements);
......@@ -351,11 +353,12 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
// - stays in the LOCAL_SUSPEND state;
// - modifies only the protocol parameters and timers as indicated by
// upper layers.
LOG_N(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] RLC_LOCAL_SUSPEND_STATE\n",
LOG_N(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] RLC_LOCAL_SUSPEND_STATE\n",
frameP,
(l_rlc_p->is_enb) ? "eNB" : "UE",
l_rlc_p->enb_module_id,
l_rlc_p->ue_module_id,
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
l_rlc_p->rb_id);
/*if (data_indP.data.nb_elements > 0) {
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_DATA_IND %d TBs\n", l_rlc_p->module_id, l_rlc_p->rb_id, frameP, data_indP.data.nb_elements);
......@@ -386,11 +389,12 @@ rlc_um_rx (void *argP, frame_t frameP, eNB_flag_t eNB_flagP, struct mac_data_ind
break;
default:
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] TX UNKNOWN PROTOCOL STATE %02X hex\n",
LOG_E(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] TX UNKNOWN PROTOCOL STATE %02X hex\n",
frameP,
(l_rlc_p->is_enb) ? "eNB" : "UE",
l_rlc_p->enb_module_id,
l_rlc_p->ue_module_id,
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
l_rlc_p->rb_id,
l_rlc_p->protocol_state);
}
......@@ -449,30 +453,33 @@ rlc_um_mac_status_indication (void *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP
status_resp.rlc_info.rlc_protocol_state = ((rlc_um_entity_t *) rlc_pP)->protocol_state;
#ifdef DEBUG_RLC_UM_TX_STATUS
if ((((rlc_um_entity_t *) rlc_pP)->rb_id > 0) && (status_resp.buffer_occupancy_in_bytes > 0)) {
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_STATUS_INDICATION (DATA) %d bytes requested -> %d bytes available\n",
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_STATUS_INDICATION (DATA) %d bytes requested -> %d bytes available\n",
frameP,
(rlc_p->is_enb) ? "eNB" : "UE",
rlc_p->enb_module_id,
rlc_p->ue_module_id,
(rlc_p->is_data_plane) ? "DRB" : "SRB",
rlc_p->rb_id,
tbs_sizeP,
status_resp.buffer_occupancy_in_bytes);
if ((tx_statusP.tx_status == MAC_TX_STATUS_SUCCESSFUL) && (tx_statusP.no_pdu)) {
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_STATUS_INDICATION TX STATUS SUCCESSFUL %d PDUs\n",
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_STATUS_INDICATION TX STATUS SUCCESSFUL %d PDUs\n",
frameP,
(rlc_p->is_enb) ? "eNB" : "UE",
rlc_p->enb_module_id,
rlc_p->ue_module_id,
(rlc_p->is_data_plane) ? "DRB" : "SRB",
rlc_p->rb_id,
tx_statusP.no_pdu);
}
if ((tx_statusP.tx_status == MAC_TX_STATUS_UNSUCCESSFUL) && (tx_statusP.no_pdu)) {
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_STATUS_INDICATION TX STATUS UNSUCCESSFUL %d PDUs\n",
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_STATUS_INDICATION TX STATUS UNSUCCESSFUL %d PDUs\n",
frameP,
(rlc_p->is_enb) ? "eNB" : "UE",
rlc_p->enb_module_id,
rlc_p->ue_module_id,
(rlc_p->is_data_plane) ? "DRB" : "SRB",
rlc_p->rb_id,
tx_statusP.no_pdu);
}
......@@ -518,11 +525,12 @@ rlc_um_mac_data_request (void *rlc_pP,frame_t frameP)
while (tb_p != NULL) {
tb_size_in_bytes = ((struct mac_tb_req *) (tb_p->data))->tb_size;
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] MAC_DATA_REQUEST TB SIZE %u\n",
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] MAC_DATA_REQUEST TB SIZE %u\n",
frameP,
(l_rlc_p->is_enb) ? "eNB" : "UE",
l_rlc_p->enb_module_id,
l_rlc_p->ue_module_id,
(l_rlc_p->is_data_plane) ? "DRB" : "SRB",
l_rlc_p->rb_id,
((struct mac_tb_req *) (tb_p->data))->tb_size);
l_rlc_p->stat_tx_data_pdu += 1;
......@@ -625,11 +633,12 @@ rlc_um_data_req (void *rlc_pP, frame_t frameP, mem_block_t *sdu_pP)
uint16_t data_size;
#endif
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][RB %02d] RLC_UM_DATA_REQ size %d Bytes, BO %d , NB SDU %d\n",
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %02u/%02u][%s %02d] RLC_UM_DATA_REQ size %d Bytes, BO %d , NB SDU %d\n",
frameP,
(rlc_p->is_enb) ? "eNB" : "UE",
rlc_p->enb_module_id,
rlc_p->ue_module_id,
(rlc_p->is_data_plane) ? "DRB" : "SRB",
rlc_p->rb_id,
((struct rlc_um_data_req *) (sdu_pP->data))->data_size,
rlc_p->buffer_occupancy,
......
This diff is collapsed.
......@@ -61,11 +61,12 @@ rlc_um_reassembly (uint8_t * src_pP, int32_t lengthP, rlc_um_entity_t *rlc_pP, f
//-----------------------------------------------------------------------------
sdu_size_t sdu_max_size;
LOG_D(RLC, "[FRAME %5u][%s][RLC_UM][MOD %u/%u][RB %u][REASSEMBLY] reassembly() %d bytes %d bytes already reassemblied\n",
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY] reassembly() %d bytes %d bytes already reassemblied\n",
frameP,
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
rlc_pP->rb_id,
lengthP,
rlc_pP->output_sdu_size_to_write);
......@@ -93,46 +94,51 @@ rlc_um_reassembly (uint8_t * src_pP, int32_t lengthP, rlc_um_entity_t *rlc_pP, f
rlc_pP->output_sdu_size_to_write += lengthP;
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
LOG_T(RLC, "[FRAME %5u][%s][RLC_UM][MOD %u/%u][RB %u][REASSEMBLY] DATA :",
LOG_T(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY] DATA :",
frameP
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
rlc_pP->rb_id);
rlc_util_print_hex_octets(RLC, (unsigned char*)rlc_pP->output_sdu_in_construction->data, rlc_pP->output_sdu_size_to_write);
#endif
} else {
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
AssertFatal(0, "[FRAME %5u][%s][RLC_UM][MOD %u/%u][RB %u] RLC_UM_DATA_IND, SDU TOO BIG, DROPPED\n",
AssertFatal(0, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] RLC_UM_DATA_IND, SDU TOO BIG, DROPPED\n",
frameP,
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
rlc_pP->rb_id);
#endif
LOG_E(RLC, "[FRAME %5u][%s][RLC_UM][MOD %u/%u][RB %u][REASSEMBLY] [max_sdu size %d] ERROR SDU SIZE OVERFLOW SDU GARBAGED\n",
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY] [max_sdu size %d] ERROR SDU SIZE OVERFLOW SDU GARBAGED\n",
frameP,
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
rlc_pP->rb_id,
sdu_max_size);
// erase SDU
rlc_pP->output_sdu_size_to_write = 0;
}
} else {
LOG_E(RLC, "[FRAME %5u][%s][RLC_UM][MOD %u/%u][RB %u][REASSEMBLY]ERROR OUTPUT SDU IS NULL\n",
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][REASSEMBLY]ERROR OUTPUT SDU IS NULL\n",
frameP,
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
rlc_pP->rb_id);
#if defined(STOP_ON_IP_TRAFFIC_OVERLOAD)
AssertFatal(0, "[FRAME %5u][%s][RLC_UM][MOD %u/%u][RB %u] RLC_UM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
AssertFatal(0, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] RLC_UM_DATA_IND, SDU DROPPED, OUT OF MEMORY\n",
frameP,
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
rlc_pP->rb_id);
#endif
}
......@@ -145,11 +151,12 @@ rlc_um_send_sdu (rlc_um_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_flagP)
//-----------------------------------------------------------------------------
if ((rlc_pP->output_sdu_in_construction)) {
LOG_D(RLC, "[FRAME %5u][%s][RLC_UM][MOD %u/%u][RB %u] SEND_SDU to upper layers %d bytes sdu %p\n",
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] SEND_SDU to upper layers %d bytes sdu %p\n",
frameP,
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
rlc_pP->rb_id,
rlc_pP->output_sdu_size_to_write,
rlc_pP->output_sdu_in_construction);
......@@ -160,11 +167,12 @@ rlc_um_send_sdu (rlc_um_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_flagP)
#ifdef TEST_RLC_UM
#ifdef TRACE_RLC_UM_DISPLAY_ASCII_DATA
rlc_pP->output_sdu_in_construction->data[rlc_pP->output_sdu_size_to_write] = 0;
LOG_T(RLC, "[FRAME %5u][%s][RLC_UM][MOD %u/%u][RB %u][SEND_SDU] DATA :",
LOG_T(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][SEND_SDU] DATA :",
frameP,
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
rlc_pP->rb_id);
rlc_util_print_hex_octets(RLC, rlc_pP->output_sdu_in_construction->data, rlc_pP->output_sdu_size_to_write);
#endif
......@@ -184,11 +192,12 @@ rlc_um_send_sdu (rlc_um_entity_t *rlc_pP,frame_t frameP, eNB_flag_t eNB_flagP)
#endif
rlc_pP->output_sdu_in_construction = NULL;
} else {
LOG_E(RLC, "[FRAME %5u][%s][RLC_UM][MOD %u/%u][RB %u][SEND_SDU] ERROR SIZE <= 0 ... DO NOTHING, SET SDU SIZE TO 0\n",
LOG_E(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u][SEND_SDU] ERROR SIZE <= 0 ... DO NOTHING, SET SDU SIZE TO 0\n",
frameP,
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
rlc_pP->rb_id);
}
rlc_pP->output_sdu_size_to_write = 0;
......
......@@ -39,38 +39,12 @@
#include "MAC_INTERFACE/extern.h"
#include "UTIL/LOG/log.h"
#define DEBUG_RLC_UM_DISPLAY_TB_DATA
#define DEBUG_RLC_UM_RX
//#define DEBUG_RLC_UM_RX 1
//-----------------------------------------------------------------------------
void rlc_um_display_rx_window(rlc_um_entity_t *rlc_pP)
//-----------------------------------------------------------------------------
{
/*
*
* #define RLC_FG_COLOR_BLACK "\e[0;30m30:"
#define RLC_FG_COLOR_RED "\e[0;31m31:"
#define RLC_FG_COLOR_GREEN "\e[0;32m32:"
#define RLC_FG_COLOR_ORANGE "\e[0;33m33:"
#define RLC_FG_COLOR_BLUE "\e[0;34m34:"
#define RLC_FG_COLOR_MAGENTA "\e[0;35m35:"
#define RLC_FG_COLOR_CYAN "\e[0;36m36:"
#define RLC_FG_COLOR_GRAY_BLACK "\e[0;37m37:"
#define RLC_FG_COLOR_DEFAULT "\e[0;39m39:"
#define RLC_FG_BRIGHT_COLOR_DARK_GRAY "\e[1;30m30:"
#define RLC_FG_BRIGHT_COLOR_RED "\e[1;31m31:"
#define RLC_FG_BRIGHT_COLOR_GREEN "\e[1;32m32:"
#define RLC_FG_BRIGHT_COLOR_YELLOW "\e[1;33m33:"
#define RLC_FG_BRIGHT_COLOR_BLUE "\e[1;34m34:"
#define RLC_FG_BRIGHT_COLOR_MAGENTA "\e[1;35m35:"
#define RLC_FG_BRIGHT_COLOR_CYAN "\e[1;36m36:"
#define RLC_FG_BRIGHT_COLOR_WHITE "\e[1;37m37:"
#define RLC_FG_BRIGHT_COLOR_DEFAULT "\e[0;39m39:"
#define RLC_REVERSE_VIDEO "\e[7m"
#define RLC_NORMAL_VIDEO "\e[27m]"
*
*/
unsigned long sn = 0;
unsigned long end_sn = 0;
char str[4];
......@@ -163,16 +137,19 @@ rlc_um_receive (rlc_um_entity_t *rlc_pP, frame_t frameP, eNB_flag_t eNB_flagP, s
if (tb_size_in_bytes > 0) {
rlc_um_receive_process_dar (rlc_pP, frameP, eNB_flagP, tb_p, (rlc_um_pdu_sn_10_t *)first_byte_p, tb_size_in_bytes);
LOG_D(RLC, "[FRAME %05d][%s][RLC_UM][MOD %u/%u][RB %u] VR(UR)=%03d VR(UX)=%03d VR(UH)=%03d\n",
#if defined(DEBUG_RLC_UM_RX)
LOG_D(RLC, "[FRAME %05u][%s][RLC_UM][MOD %u/%u][%s %u] VR(UR)=%03d VR(UX)=%03d VR(UH)=%03d\n",
frameP,
(rlc_pP->is_enb) ? "eNB" : "UE",
rlc_pP->enb_module_id,
rlc_pP->ue_module_id,
(rlc_pP->is_data_plane) ? "DRB" : "SRB",
rlc_pP->rb_id,
rlc_pP->vr_ur,
rlc_pP->vr_ux,
rlc_pP->vr_uh);
rlc_um_display_rx_window(rlc_pP);
//rlc_um_display_rx_window(rlc_pP); comented because bad display
#endif
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment