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.
This commit is contained in:
Andre Puschmann 2021-05-26 21:34:40 +02:00
parent 9612bb0e14
commit f22f4b4fbd
1 changed files with 9 additions and 2 deletions

View File

@ -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;
}
}
}