From 9e0a36df4065c93f652bd261ee66fa8d81b4f344 Mon Sep 17 00:00:00 2001 From: yagoda Date: Thu, 20 May 2021 18:58:08 +0200 Subject: [PATCH] fixing eMBMS after new ue_db architecture and scheduler changes --- CMakeLists.txt | 2 +- srsenb/src/stack/mac/mac.cc | 7 +++++-- srsenb/src/stack/mac/schedulers/sched_time_pf.cc | 6 ++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c12fc5a66..d6b2ac423 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ option(ENABLE_SRSENB "Build srsENB application" ON) option(ENABLE_SRSEPC "Build srsEPC application" ON) option(DISABLE_SIMD "Disable SIMD instructions" OFF) option(AUTO_DETECT_ISA "Autodetect supported ISA extensions" ON) - + option(ENABLE_GUI "Enable GUI (using srsGUI)" ON) option(ENABLE_UHD "Enable UHD" ON) option(ENABLE_BLADERF "Enable BladeRF" ON) diff --git a/srsenb/src/stack/mac/mac.cc b/srsenb/src/stack/mac/mac.cc index c6c449e8e..1292130d5 100644 --- a/srsenb/src/stack/mac/mac.cc +++ b/srsenb/src/stack/mac/mac.cc @@ -1016,9 +1016,12 @@ void mac::write_mcch(const srsran::sib2_mbms_t* sib2_, sib13 = *sib13_; memcpy(mcch_payload_buffer, mcch_payload, mcch_payload_length * sizeof(uint8_t)); current_mcch_length = mcch_payload_length; - ue_db[SRSRAN_MRNTI] = std::unique_ptr{ + std::unique_ptr ptr = std::unique_ptr{ new ue(SRSRAN_MRNTI, args.nof_prb, &scheduler, rrc_h, rlc_h, phy_h, logger, cells.size(), softbuffer_pool.get())}; - + auto ret = ue_db.insert(SRSRAN_MRNTI, std::move(ptr)); + if (!ret) { + logger.info("Failed to allocate rnti=0x%x.for eMBMS", SRSRAN_MRNTI); + } rrc_h->add_user(SRSRAN_MRNTI, {}); } diff --git a/srsenb/src/stack/mac/schedulers/sched_time_pf.cc b/srsenb/src/stack/mac/schedulers/sched_time_pf.cc index b3563db48..0e20507e0 100644 --- a/srsenb/src/stack/mac/schedulers/sched_time_pf.cc +++ b/srsenb/src/stack/mac/schedulers/sched_time_pf.cc @@ -44,6 +44,12 @@ sched_time_pf::sched_time_pf(const sched_cell_params_t& cell_params_, const sche void sched_time_pf::new_tti(sched_ue_list& ue_db, sf_sched* tti_sched) { + while (not dl_queue.empty()) { + dl_queue.pop(); + } + while (not ul_queue.empty()) { + ul_queue.pop(); + } current_tti_rx = tti_point{tti_sched->get_tti_rx()}; // remove deleted users from history for (auto it = ue_history_db.begin(); it != ue_history_db.end();) {