rlc_am: count poll_pdu and poll_byte during retransmission (and segements)

This commit is contained in:
Andre Puschmann 2018-02-07 16:32:15 +01:00
parent 9c3418d010
commit bebf062fee
1 changed files with 11 additions and 0 deletions

View File

@ -514,6 +514,12 @@ int rlc_am::build_retx_pdu(uint8_t *payload, uint32_t nof_bytes)
// Update & write header // Update & write header
rlc_amd_pdu_header_t new_header = tx_window[retx.sn].header; rlc_amd_pdu_header_t new_header = tx_window[retx.sn].header;
new_header.p = 0; 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()) if(poll_required())
{ {
new_header.p = 1; 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 new_header;
rlc_amd_pdu_header_t old_header = tx_window[retx.sn].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.dc = RLC_DC_FIELD_DATA_PDU;
new_header.rf = 1; new_header.rf = 1;
new_header.fi = RLC_FI_FIELD_NOT_START_OR_END_ALIGNED; new_header.fi = RLC_FI_FIELD_NOT_START_OR_END_ALIGNED;