From 8d65b40734d31ffafb6f01451b1e0483a791b64b Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Mon, 23 May 2022 14:24:49 +0100 Subject: [PATCH] lib,pdcp_nr: allow for t-reordering of inifinity --- lib/src/pdcp/pdcp_entity_nr.cc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/src/pdcp/pdcp_entity_nr.cc b/lib/src/pdcp/pdcp_entity_nr.cc index b2d42e6fe..88ed5c0bf 100644 --- a/lib/src/pdcp/pdcp_entity_nr.cc +++ b/lib/src/pdcp/pdcp_entity_nr.cc @@ -49,13 +49,14 @@ bool pdcp_entity_nr::configure(const pdcp_config_t& cnfg_) rlc_mode = rlc->rb_is_um(lcid) ? rlc_mode_t::UM : rlc_mode_t::AM; - // Timers - reordering_timer = task_sched.get_unique_timer(); - - // configure timer - if (static_cast(cfg.t_reordering) > 0) { - reordering_timer.set(static_cast(cfg.t_reordering), *reordering_fnc); + // t-Reordering timer + if (cfg.t_reordering != pdcp_t_reordering_t::infinity) { + reordering_timer = task_sched.get_unique_timer(); + if (static_cast(cfg.t_reordering) > 0) { + reordering_timer.set(static_cast(cfg.t_reordering), *reordering_fnc); + } } + active = true; logger.info("%s PDCP-NR entity configured. SN_LEN=%d, Discard timer %d, Re-ordering timer %d, RLC=%s, RAT=%s", rb_name, @@ -267,10 +268,13 @@ void pdcp_entity_nr::write_pdu(unique_byte_buffer_t pdu) reordering_timer.stop(); } - if (not reordering_timer.is_running() and rx_deliv < rx_next) { - rx_reord = rx_next; - reordering_timer.run(); + if (cfg.t_reordering != pdcp_t_reordering_t::infinity) { + if (not reordering_timer.is_running() and rx_deliv < rx_next) { + rx_reord = rx_next; + reordering_timer.run(); + } } + logger.debug("Rx PDCP state - RX_NEXT=%u, RX_DELIV=%u, RX_REORD=%u", rx_next, rx_deliv, rx_reord); }