Commit 684ca32e authored by fnabet's avatar fnabet
Browse files

RLC AM Add Log points

parent 52006fc6
...@@ -335,8 +335,8 @@ rlc_am_receive_process_data_pdu ( ...@@ -335,8 +335,8 @@ rlc_am_receive_process_data_pdu (
if (pdu_status != RLC_AM_DATA_PDU_STATUS_OK) { if (pdu_status != RLC_AM_DATA_PDU_STATUS_OK) {
rlc_pP->stat_rx_data_pdu_dropped += 1; rlc_pP->stat_rx_data_pdu_dropped += 1;
rlc_pP->stat_rx_data_bytes_dropped += tb_size_in_bytesP; rlc_pP->stat_rx_data_bytes_dropped += tb_size_in_bytesP;
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] PDU DISCARDED, STATUS REQUESTED:\n", LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] PDU DISCARDED CAUSE=%d SN=%d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP)); PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),pdu_status,pdu_info_p->sn);
#if RLC_STOP_ON_LOST_PDU #if RLC_STOP_ON_LOST_PDU
AssertFatal( 0 == 1, AssertFatal( 0 == 1,
PROTOCOL_RLC_AM_CTXT_FMT" LOST PDU DETECTED\n", PROTOCOL_RLC_AM_CTXT_FMT" LOST PDU DETECTED\n",
...@@ -443,8 +443,8 @@ rlc_am_receive_process_data_pdu ( ...@@ -443,8 +443,8 @@ rlc_am_receive_process_data_pdu (
rlc_pP->stat_rx_data_pdu_out_of_window += 1; rlc_pP->stat_rx_data_pdu_out_of_window += 1;
rlc_pP->stat_rx_data_bytes_out_of_window += tb_size_in_bytesP; rlc_pP->stat_rx_data_bytes_out_of_window += tb_size_in_bytesP;
pdu_status = RLC_AM_DATA_PDU_STATUS_SN_OUTSIDE_WINDOW; pdu_status = RLC_AM_DATA_PDU_STATUS_SN_OUTSIDE_WINDOW;
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] PDU OUT OF RX WINDOW, DISCARDED, STATUS REQUESTED:\n", LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] PDU OUT OF RX WINDOW, DISCARDED, SN=%d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP)); PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),pdu_info_p->sn);
} }
/* 3) Check for triggering a Tx Status PDU if a poll is received or if a pending status was delayed */ /* 3) Check for triggering a Tx Status PDU if a poll is received or if a pending status was delayed */
...@@ -495,6 +495,8 @@ rlc_am_receive_process_data_pdu ( ...@@ -495,6 +495,8 @@ rlc_am_receive_process_data_pdu (
} else { } else {
pdu_status = RLC_AM_DATA_PDU_STATUS_HEADER_ERROR; pdu_status = RLC_AM_DATA_PDU_STATUS_HEADER_ERROR;
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] PDU DISCARDED BAD HEADER FORMAT SN=%d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),pdu_info_p->sn);
} }
if (pdu_status != RLC_AM_DATA_PDU_STATUS_OK) { if (pdu_status != RLC_AM_DATA_PDU_STATUS_OK) {
......
...@@ -320,6 +320,8 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment( ...@@ -320,6 +320,8 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment(
// First case : cursor_p is NULL or its SN is different from the received one, it means the SN is received for the first time // First case : cursor_p is NULL or its SN is different from the received one, it means the SN is received for the first time
// Insert PDU after previous_cursor_p // Insert PDU after previous_cursor_p
if ((cursor_p == NULL) || (pdu_info_cursor_p->sn != pdu_rx_info_p->sn)) { if ((cursor_p == NULL) || (pdu_info_cursor_p->sn != pdu_rx_info_p->sn)) {
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU SEGMENT] STORE FIRST PDU SEGMENT FOR SN=%d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),pdu_rx_info_p->sn);
list2_insert_after_element(tb_pP, previous_cursor_p, &rlc_pP->receiver_buffer); list2_insert_after_element(tb_pP, previous_cursor_p, &rlc_pP->receiver_buffer);
return RLC_AM_DATA_PDU_STATUS_OK; return RLC_AM_DATA_PDU_STATUS_OK;
} }
...@@ -389,6 +391,8 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment( ...@@ -389,6 +391,8 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment(
/* Now discard the PDU segment if it is within so_start so_end */ /* Now discard the PDU segment if it is within so_start so_end */
if ((so_start <= so_start_segment) && (so_end_segment <= so_end)) { if ((so_start <= so_start_segment) && (so_end_segment <= so_end)) {
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU SEGMENT] DISCARD : DUPLICATE SEGMENT SN=%d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),pdu_rx_info_p->sn);
return RLC_AM_DATA_PDU_STATUS_AM_SEGMENT_DUPLICATE; return RLC_AM_DATA_PDU_STATUS_AM_SEGMENT_DUPLICATE;
} }
} }
...@@ -444,6 +448,9 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment( ...@@ -444,6 +448,9 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu_segment(
mem_block_t* trunc_segment = create_new_segment_from_pdu(tb_pP,so_start_segment - pdu_rx_info_p->so,so_end_segment - so_start_segment + 1); mem_block_t* trunc_segment = create_new_segment_from_pdu(tb_pP,so_start_segment - pdu_rx_info_p->so,so_end_segment - so_start_segment + 1);
if (trunc_segment != NULL) { if (trunc_segment != NULL) {
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU SEGMENT] CREATE SEGMENT FROM SEGMENT OFFSET=%d DATA LENGTH=%d SN=%d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),so_start_segment - pdu_rx_info_p->so,so_end_segment - so_start_segment + 1,pdu_rx_info_p->sn);
list2_insert_after_element(trunc_segment, previous_cursor_p, &rlc_pP->receiver_buffer); list2_insert_after_element(trunc_segment, previous_cursor_p, &rlc_pP->receiver_buffer);
/* Free original PDU Segment */ /* Free original PDU Segment */
free_mem_block(tb_pP, __func__); free_mem_block(tb_pP, __func__);
...@@ -528,6 +535,9 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu( ...@@ -528,6 +535,9 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu(
} }
} }
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] PDU REPLACES STORED PDU SEGMENTS SN=%d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),pdu_rx_info_p->sn);
list2_insert_after_element(tb_pP, previous_cursor_p, &rlc_pP->receiver_buffer); list2_insert_after_element(tb_pP, previous_cursor_p, &rlc_pP->receiver_buffer);
return pdu_status; return pdu_status;
} // End SN != vrR or SO != 0 } // End SN != vrR or SO != 0
...@@ -554,6 +564,9 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu( ...@@ -554,6 +564,9 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_handle_pdu(
/* Insert PDU Segment */ /* Insert PDU Segment */
list2_insert_after_element(trunc_pdu, previous_cursor_p, &rlc_pP->receiver_buffer); list2_insert_after_element(trunc_pdu, previous_cursor_p, &rlc_pP->receiver_buffer);
LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[PROCESS RX PDU] CREATE PDU SEGMENT FROM PDU OFFSET =%d SN=%d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),next_waited_so,pdu_rx_info_p->sn);
/* clean previous stored segments in duplicate */ /* clean previous stored segments in duplicate */
if ((cursor_p != NULL) && (pdu_info_cursor_p->sn == pdu_rx_info_p->sn)) { if ((cursor_p != NULL) && (pdu_info_cursor_p->sn == pdu_rx_info_p->sn)) {
mem_block_t* cursor_next_p = cursor_p; mem_block_t* cursor_next_p = cursor_p;
......
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