From 3c169e6be121a97788a9df5e3423614328f748e1 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 26 Nov 2020 17:28:20 +0100 Subject: [PATCH] rlc_am: increment retx counter for segments we've only incremented the retx when retransmitting a full PDU, but not when only retransmitting segments. This might lead to many more retx than allowed. --- lib/src/upper/rlc_am_lte.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index 333b29134..4bf881d94 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -755,6 +755,11 @@ int rlc_am_lte::rlc_am_lte_tx::build_segment(uint8_t* payload, uint32_t nof_byte retx_queue.front().so_start = retx.so_end; } + // increment counter for retx of first segment + if (retx.so_start == 0) { + tx_window[retx.sn].retx_count++; + } + // Write header and pdu uint8_t* ptr = payload; rlc_am_write_data_pdu_header(&new_header, &ptr); @@ -776,12 +781,13 @@ int rlc_am_lte::rlc_am_lte_tx::build_segment(uint8_t* payload, uint32_t nof_byte log->info_hex(payload, pdu_len, - "%s Retx PDU segment of SN=%d (%d B), SO: %d, N_li: %d\n", + "%s Retx PDU segment SN=%d [so=%d] (%d B) (attempt %d/%d)\n", RB_NAME, retx.sn, - pdu_len, retx.so_start, - new_header.N_li); + pdu_len, + tx_window[retx.sn].retx_count + 1, + cfg.max_retx_thresh); return pdu_len; }