Revert "Revert "rlc_um_nr: reimplement update of RX_Next_Reassembly""

This reverts commit 296758e4ab.
This commit is contained in:
Andre Puschmann 2021-11-08 14:55:55 +01:00
parent 7141fda69c
commit 4187be3ff9
1 changed files with 6 additions and 3 deletions

View File

@ -433,9 +433,12 @@ void rlc_um_nr::rlc_um_nr_rx::handle_rx_buffer_update(const uint32_t sn)
// find next SN in rx buffer
if (sn == RX_Next_Reassembly) {
RX_Next_Reassembly = ((RX_Next_Reassembly + 1) % mod);
while (RX_MOD_NR_BASE(RX_Next_Reassembly) < RX_MOD_NR_BASE(RX_Next_Highest)) {
RX_Next_Reassembly = (RX_Next_Reassembly + 1) % mod;
for (auto it = rx_window.begin(); it != rx_window.end(); ++it) {
logger.debug("SN=%d has %zd segments", it->first, it->second.segments.size());
if (RX_MOD_NR_BASE(it->first) > RX_MOD_NR_BASE(RX_Next_Reassembly)) {
RX_Next_Reassembly = it->first;
break;
}
}
logger.debug("Updating RX_Next_Reassembly=%d", RX_Next_Reassembly);
}