From 655c7ae8ae4d6651155ba287f114cd1e92fe6611 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 2 Sep 2020 18:14:41 +0200 Subject: [PATCH] enb: fix warning when removing user when removing a user from the eNB we iterated over all possible LCIDs and set the buffer state to zero in the scheduler. this resulted in following log entries: 13:57:23.856334 [RRC ] [I] Received Release Complete rnti=0x46 13:57:23.856352 [MAC ] [W] [ 5149] The provided lcid=6 is not valid 13:57:23.856362 [MAC ] [W] [ 5149] The provided lcid=7 is not valid 13:57:23.856368 [MAC ] [W] [ 5149] The provided lcid=8 is not valid 13:57:23.856371 [MAC ] [W] [ 5149] The provided lcid=9 is not valid 13:57:23.856376 [MAC ] [W] [ 5149] The provided lcid=10 is not valid we now check if the bearer exits at RLC and only report those to the MAC. --- srsenb/src/stack/upper/rlc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srsenb/src/stack/upper/rlc.cc b/srsenb/src/stack/upper/rlc.cc index c92a35604..9a9ccaa54 100644 --- a/srsenb/src/stack/upper/rlc.cc +++ b/srsenb/src/stack/upper/rlc.cc @@ -91,7 +91,9 @@ void rlc::clear_buffer(uint16_t rnti) if (users.count(rnti)) { users[rnti].rlc->empty_queue(); for (int i = 0; i < SRSLTE_N_RADIO_BEARERS; i++) { - mac->rlc_buffer_state(rnti, i, 0, 0); + if (users[rnti].rlc->has_bearer(i)) { + mac->rlc_buffer_state(rnti, i, 0, 0); + } } log_h->info("Cleared buffer rnti=0x%x\n", rnti); }