From bebf062feefb891259d41d7e07c846cd5249d129 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 7 Feb 2018 16:32:15 +0100 Subject: [PATCH] rlc_am: count poll_pdu and poll_byte during retransmission (and segements) --- lib/src/upper/rlc_am.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/src/upper/rlc_am.cc b/lib/src/upper/rlc_am.cc index faa9600f4..2ecb862d5 100644 --- a/lib/src/upper/rlc_am.cc +++ b/lib/src/upper/rlc_am.cc @@ -514,6 +514,12 @@ int rlc_am::build_retx_pdu(uint8_t *payload, uint32_t nof_bytes) // Update & write header rlc_amd_pdu_header_t new_header = tx_window[retx.sn].header; new_header.p = 0; + + // Set poll bit + pdu_without_poll++; + byte_without_poll += (tx_window[retx.sn].buf->N_bytes + rlc_am_packed_length(&new_header)); + log->info("%s pdu_without_poll: %d\n", rrc->get_rb_name(lcid).c_str(), pdu_without_poll); + log->info("%s byte_without_poll: %d\n", rrc->get_rb_name(lcid).c_str(), byte_without_poll); if(poll_required()) { new_header.p = 1; @@ -553,6 +559,11 @@ int rlc_am::build_segment(uint8_t *payload, uint32_t nof_bytes, rlc_amd_retx_t r rlc_amd_pdu_header_t new_header; rlc_amd_pdu_header_t old_header = tx_window[retx.sn].header; + pdu_without_poll++; + byte_without_poll += (tx_window[retx.sn].buf->N_bytes + rlc_am_packed_length(&new_header)); + log->info("%s pdu_without_poll: %d\n", rrc->get_rb_name(lcid).c_str(), pdu_without_poll); + log->info("%s byte_without_poll: %d\n", rrc->get_rb_name(lcid).c_str(), byte_without_poll); + new_header.dc = RLC_DC_FIELD_DATA_PDU; new_header.rf = 1; new_header.fi = RLC_FI_FIELD_NOT_START_OR_END_ALIGNED;