From f22f4b4fbde27b2aa3626b89180007cf2d63bcea Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 26 May 2021 21:34:40 +0200 Subject: [PATCH] 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. --- lib/src/upper/rlc_am_lte.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/src/upper/rlc_am_lte.cc b/lib/src/upper/rlc_am_lte.cc index 1fa934fa1..795e2be83 100644 --- a/lib/src/upper/rlc_am_lte.cc +++ b/lib/src/upper/rlc_am_lte.cc @@ -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; + } } }