From 3f99e401590800048db5a5d8ad3de7e3639a0d18 Mon Sep 17 00:00:00 2001 From: yagoda Date: Fri, 1 May 2020 17:21:18 +0200 Subject: [PATCH] -changing rlc so that mrb is never removed when going to idle -adding metric counting to eMBMS MAC so that the count is not lost during eMBMS subframes --- lib/src/upper/rlc.cc | 15 ++++++--------- srsenb/src/stack/mac/mac.cc | 4 ++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/src/upper/rlc.cc b/lib/src/upper/rlc.cc index e7d28ab5b..9b6e99878 100644 --- a/lib/src/upper/rlc.cc +++ b/lib/src/upper/rlc.cc @@ -156,12 +156,7 @@ void rlc::reset() delete (it->second); } rlc_array.clear(); - - for (rlc_map_t::iterator it = rlc_array_mrb.begin(); it != rlc_array_mrb.end(); ++it) { - it->second->stop(); - delete (it->second); - } - rlc_array_mrb.clear(); + // the multicast bearer (MRB) is not removed here because eMBMS services continue to be streamed in idle mode (3GPP TS 23.246 version 14.1.0 Release 14 section 8) } // Add SRB0 again @@ -433,9 +428,11 @@ void rlc::add_bearer_mrb(uint32_t lcid) rlc_log->error("Error configuring RLC entity\n."); goto delete_and_exit; } - if (not rlc_array_mrb.insert(rlc_map_pair_t(lcid, rlc_entity)).second) { - rlc_log->error("Error inserting RLC entity in to array\n."); - goto delete_and_exit; + if (rlc_array_mrb.count(lcid) == 0) { + if (not rlc_array_mrb.insert(rlc_map_pair_t(lcid, rlc_entity)).second) { + rlc_log->error("Error inserting RLC entity in to array\n."); + goto delete_and_exit; + } } rlc_log->warning("Added bearer MRB%d with mode RLC_UM\n", lcid); return; diff --git a/srsenb/src/stack/mac/mac.cc b/srsenb/src/stack/mac/mac.cc index e37cc4907..6846883d8 100644 --- a/srsenb/src/stack/mac/mac.cc +++ b/srsenb/src/stack/mac/mac.cc @@ -774,6 +774,10 @@ int mac::get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res mch.current_sf_allocation_num++; } + // Count number of TTIs for all active users + for (auto& u : ue_db) { + u.second->metrics_cnt(); + } return SRSLTE_SUCCESS; }