rlc: always remove PDCP SNs from undelivered queue

if RLC PDUs with certain PDCP SNs were already in flight
when their discard timer at PDCP expires, they weren't
remove from the undelivered_sdu_info_queue causing
indesired log entries like:

08:08:52.455280 [RLC    ] [W] PDCP_SN=2103 already marked as undelivered

when the SN was sent again (after wrap around).

The patch makes sure to always try to delete the PDCP SN
from the queue. It should fix (at least partly) #2560
This commit is contained in:
Andre Puschmann 2021-04-26 10:21:10 +02:00
parent 20075f6f33
commit 597729ac53
1 changed files with 6 additions and 9 deletions

View File

@ -530,16 +530,13 @@ void rlc_am_lte::rlc_am_lte_tx::discard_sdu(uint32_t discard_sn)
return false;
});
if (discarded) {
// remove also from undelivered SDUs queue
logger.info("Discarding SDU with PDCP_SN=%d", discard_sn);
if (not undelivered_sdu_info_queue.has_pdcp_sn(discard_sn)) {
logger.info("PDCP SDU info does not exists for discarded SDU. PDCP_SN=%d", discard_sn);
} else {
undelivered_sdu_info_queue.clear_pdcp_sdu(discard_sn);
}
logger.info("%s PDU with PDCP_SN=%d", discarded ? "Discarding" : "Couldn't discard", discard_sn);
// always try remove from undelivered SDUs queue
if (not undelivered_sdu_info_queue.has_pdcp_sn(discard_sn)) {
logger.info("PDCP SDU info does not exists for discarded SDU. PDCP_SN=%d", discard_sn);
} else {
logger.info("Could not find SDU to discard. PDCP_SN=%d", discard_sn);
undelivered_sdu_info_queue.clear_pdcp_sdu(discard_sn);
}
}