From a049ec6b82a61d1b44434e23d7bbe2656b12b8d6 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 26 Nov 2019 11:19:47 +0000 Subject: [PATCH] Finished to add boiler plate code to support PDCP discard notifications to RLC. --- srsenb/src/stack/upper/pdcp.cc | 2 +- srsenb/src/stack/upper/rlc.cc | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/srsenb/src/stack/upper/pdcp.cc b/srsenb/src/stack/upper/pdcp.cc index 3ca5c7b5f..9607e33e5 100644 --- a/srsenb/src/stack/upper/pdcp.cc +++ b/srsenb/src/stack/upper/pdcp.cc @@ -172,7 +172,7 @@ void pdcp::user_interface_rlc::write_sdu(uint32_t lcid, srslte::unique_byte_buff void pdcp::user_interface_rlc::discard_sdu(uint32_t lcid, uint32_t discard_sn) { - rlc->discard_sdu(lcid, discard_sn); + rlc->discard_sdu(rnti, lcid, discard_sn); } bool pdcp::user_interface_rlc::rb_is_um(uint32_t lcid) diff --git a/srsenb/src/stack/upper/rlc.cc b/srsenb/src/stack/upper/rlc.cc index 5ee8372d0..038c81984 100644 --- a/srsenb/src/stack/upper/rlc.cc +++ b/srsenb/src/stack/upper/rlc.cc @@ -205,12 +205,11 @@ void rlc::discard_sdu(uint16_t rnti, uint32_t lcid, uint32_t discard_sn) pthread_rwlock_rdlock(&rwlock); if (users.count(rnti)) { - users[rnti].rlc->discard_sdu(lcid, discard_sn); - tx_queue = users[rnti].rlc->get_buffer_state(lcid); - } - // In the eNodeB, there is no polling for buffer state from the scheduler, thus + users[rnti].rlc->discard_sdu(lcid, discard_sn); + tx_queue = users[rnti].rlc->get_buffer_state(lcid); + + // In the eNodeB, there is no polling for buffer state from the scheduler, thus // communicate buffer state every time a new SDU is discarded - uint32_t retx_queue = 0; mac->rlc_buffer_state(rnti, lcid, tx_queue, retx_queue); log_h->info("Buffer state: rnti=0x%x, lcid=%d, tx_queue=%d\n", rnti, lcid, tx_queue);