rlc_am: fix potential stalling in RLC transmitter

it turned out that a certain order of events can lead to
a RLC transmitter stalling because even though unacknowledged PDUs
are queued, none of them was actually considered for retx.

This can happen if a pollRetxTimer expires for a SN that, meanwhile,
has already been acknowledged. The positive lead to the deletion of
the SN from the Tx window.

The fix makes sure that when a retx for a unexisting SN is requested,
the sender will consider the next unacknowledged SN instead.
master
Andre Puschmann 3 years ago
parent 9612bb0e14
commit f22f4b4fbd

@ -701,8 +701,15 @@ int rlc_am_lte::rlc_am_lte_tx::build_retx_pdu(uint8_t* payload, uint32_t nof_byt
if (!retx_queue.empty()) {
retx = retx_queue.front();
} else {
logger.info("In build_retx_pdu(): retx_queue is empty during sanity check, sn=%d", retx.sn);
return 0;
logger.info("%s SN=%d not in Tx window. Ignoring retx.", RB_NAME, retx.sn);
if (tx_window.has_sn(vt_a)) {
// schedule next SN for retx
retransmit_pdu(vt_a);
retx = retx_queue.front();
} else {
// empty tx window, can't provide retx PDU
return 0;
}
}
}

Loading…
Cancel
Save