From b2b7d8f617b84aff8e1a709fe10cf8fe8c84a93b Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Thu, 1 Apr 2021 11:00:28 +0100 Subject: [PATCH] Set rlf_timer timeout once. Make activity timer expiry also stops rlf_timer --- srsenb/enb.conf.example | 2 +- srsenb/src/main.cc | 2 +- srsenb/src/stack/rrc/rrc_ue.cc | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/srsenb/enb.conf.example b/srsenb/enb.conf.example index bec3c6678..0f6270a3f 100644 --- a/srsenb/enb.conf.example +++ b/srsenb/enb.conf.example @@ -324,7 +324,7 @@ enable = false #pregenerate_signals = false #tx_amplitude = 0.6 #rrc_inactivity_timer = 30000 -#max_nof_kos = 256 +#max_nof_kos = 50 #max_prach_offset_us = 30 #eea_pref_list = EEA0, EEA2, EEA1 #eia_pref_list = EIA2, EIA1, EIA0 diff --git a/srsenb/src/main.cc b/srsenb/src/main.cc index d36ee15d1..d49bb5fb0 100644 --- a/srsenb/src/main.cc +++ b/srsenb/src/main.cc @@ -214,7 +214,7 @@ void parse_args(all_args_t* args, int argc, char* argv[]) ("expert.eea_pref_list", bpo::value(&args->general.eea_pref_list)->default_value("EEA0, EEA2, EEA1"), "Ordered preference list for the selection of encryption algorithm (EEA) (default: EEA0, EEA2, EEA1).") ("expert.eia_pref_list", bpo::value(&args->general.eia_pref_list)->default_value("EIA2, EIA1, EIA0"), "Ordered preference list for the selection of integrity algorithm (EIA) (default: EIA2, EIA1, EIA0).") ("expert.max_nof_ues", bpo::value(&args->stack.mac.max_nof_ues)->default_value(64), "Maximum number of connected UEs") - ("expert.max_mac_dl_kos", bpo::value(&args->general.max_mac_dl_kos)->default_value(30), "Maximum number of consecutive KOs before triggering the UE's release") + ("expert.max_mac_dl_kos", bpo::value(&args->general.max_mac_dl_kos)->default_value(50), "Maximum number of consecutive KOs before triggering the UE's release") // eMBMS section ("embms.enable", bpo::value(&args->stack.embms.enable)->default_value(false), "Enables MBMS in the eNB") diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index 964bfb317..afd7db63c 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -59,6 +59,7 @@ int rrc::ue::init() rlf_timer = parent->task_sched.get_unique_timer(); activity_timer = parent->task_sched.get_unique_timer(); set_activity_timeout(MSG3_RX_TIMEOUT); // next UE response is Msg3 + set_rlf_timeout(); mobility_handler.reset(new rrc_mobility(this)); return SRSRAN_SUCCESS; @@ -129,6 +130,7 @@ void rrc::ue::mac_ko_activity() void rrc::ue::activity_timer_expired(const activity_timeout_type_t type) { + rlf_timer.stop(); if (parent) { parent->logger.info("Activity timer for rnti=0x%x expired after %d ms", rnti, activity_timer.time_elapsed()); @@ -159,6 +161,7 @@ void rrc::ue::activity_timer_expired(const activity_timeout_type_t type) void rrc::ue::rlf_timer_expired() { + activity_timer.stop(); if (parent) { parent->logger.info("RLF timer for rnti=0x%x expired after %d ms", rnti, rlf_timer.time_elapsed()); @@ -181,7 +184,7 @@ void rrc::ue::max_retx_reached() parent->logger.info("Max retx reached for rnti=0x%x", rnti); // Give UE time to start re-establishment - set_rlf_timeout(); + rlf_timer.run(); mac_ctrl.handle_max_retx(); } @@ -201,7 +204,6 @@ void rrc::ue::set_rlf_timeout() uint32_t deadline = deadline_s * 1e3 + deadline_ms; rlf_timer.set(deadline, [this](uint32_t tid) { rlf_timer_expired(); }); parent->logger.debug("Setting RLF timer for rnti=0x%x to %dms", rnti, deadline); - rlf_timer.run(); } void rrc::ue::set_activity_timeout(const activity_timeout_type_t type)