From ee06a8893b6bb4c7748f6d35bef80404a7433dac Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 26 Apr 2022 16:13:26 +0100 Subject: [PATCH] lib,rlc_am_nr: fix wrong full sdu queue check --- lib/include/srsran/rlc/rlc_am_base.h | 2 +- lib/include/srsran/rlc/rlc_am_lte.h | 1 - lib/include/srsran/rlc/rlc_am_nr.h | 1 - lib/src/rlc/rlc_am_base.cc | 5 +++++ lib/src/rlc/rlc_am_lte.cc | 5 ----- lib/src/rlc/rlc_am_nr.cc | 5 ----- 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/lib/include/srsran/rlc/rlc_am_base.h b/lib/include/srsran/rlc/rlc_am_base.h index c5f8786f6..86285d518 100644 --- a/lib/include/srsran/rlc/rlc_am_base.h +++ b/lib/include/srsran/rlc/rlc_am_base.h @@ -134,13 +134,13 @@ public: virtual void get_buffer_state(uint32_t& tx_queue, uint32_t& prio_tx_queue) = 0; virtual void reestablish() = 0; virtual void empty_queue() = 0; - virtual bool sdu_queue_is_full() = 0; virtual bool has_data() = 0; virtual void stop() = 0; void set_bsr_callback(bsr_callback_t callback); int write_sdu(unique_byte_buffer_t sdu); + bool sdu_queue_is_full(); virtual void discard_sdu(uint32_t pdcp_sn); virtual uint32_t read_pdu(uint8_t* payload, uint32_t nof_bytes) = 0; diff --git a/lib/include/srsran/rlc/rlc_am_lte.h b/lib/include/srsran/rlc/rlc_am_lte.h index f3500d48d..ec20c0082 100644 --- a/lib/include/srsran/rlc/rlc_am_lte.h +++ b/lib/include/srsran/rlc/rlc_am_lte.h @@ -59,7 +59,6 @@ public: void stop(); uint32_t read_pdu(uint8_t* payload, uint32_t nof_bytes); - bool sdu_queue_is_full(); bool has_data(); uint32_t get_buffer_state(); diff --git a/lib/include/srsran/rlc/rlc_am_nr.h b/lib/include/srsran/rlc/rlc_am_nr.h index c48eb270f..425c71455 100644 --- a/lib/include/srsran/rlc/rlc_am_nr.h +++ b/lib/include/srsran/rlc/rlc_am_nr.h @@ -96,7 +96,6 @@ public: uint32_t read_pdu(uint8_t* payload, uint32_t nof_bytes) final; void handle_control_pdu(uint8_t* payload, uint32_t nof_bytes) final; - bool sdu_queue_is_full() final; void reestablish() final; void stop() final; diff --git a/lib/src/rlc/rlc_am_base.cc b/lib/src/rlc/rlc_am_base.cc index 049998e2b..3d0bf841a 100644 --- a/lib/src/rlc/rlc_am_base.cc +++ b/lib/src/rlc/rlc_am_base.cc @@ -272,6 +272,11 @@ void rlc_am::rlc_am_base_tx::discard_sdu(uint32_t discard_sn) RlcInfo("%s PDU with PDCP_SN=%d", discarded ? "Discarding" : "Couldn't discard", discard_sn); } +bool rlc_am::rlc_am_base_tx::sdu_queue_is_full() +{ + return tx_sdu_queue.is_full(); +} + void rlc_am::rlc_am_base_tx::set_bsr_callback(bsr_callback_t callback) { bsr_callback = callback; diff --git a/lib/src/rlc/rlc_am_lte.cc b/lib/src/rlc/rlc_am_lte.cc index a7af7555a..e11780011 100644 --- a/lib/src/rlc/rlc_am_lte.cc +++ b/lib/src/rlc/rlc_am_lte.cc @@ -268,11 +268,6 @@ void rlc_am_lte_tx::get_buffer_state_nolock(uint32_t& n_bytes_newtx, uint32_t& n } } -bool rlc_am_lte_tx::sdu_queue_is_full() -{ - return tx_sdu_queue.is_full(); -} - uint32_t rlc_am_lte_tx::read_pdu(uint8_t* payload, uint32_t nof_bytes) { std::lock_guard lock(mutex); diff --git a/lib/src/rlc/rlc_am_nr.cc b/lib/src/rlc/rlc_am_nr.cc index 9b4ad6baa..463c9456a 100644 --- a/lib/src/rlc/rlc_am_nr.cc +++ b/lib/src/rlc/rlc_am_nr.cc @@ -1154,11 +1154,6 @@ void rlc_am_nr_tx::reestablish() stop(); } -bool rlc_am_nr_tx::sdu_queue_is_full() -{ - return false; -} - void rlc_am_nr_tx::empty_queue() { std::lock_guard lock(mutex);