Set rlf_timer timeout once. Make activity timer expiry also stops rlf_timer

master
Pedro Alvarez 4 years ago
parent e1a852d4b8
commit b2b7d8f617

@ -324,7 +324,7 @@ enable = false
#pregenerate_signals = false #pregenerate_signals = false
#tx_amplitude = 0.6 #tx_amplitude = 0.6
#rrc_inactivity_timer = 30000 #rrc_inactivity_timer = 30000
#max_nof_kos = 256 #max_nof_kos = 50
#max_prach_offset_us = 30 #max_prach_offset_us = 30
#eea_pref_list = EEA0, EEA2, EEA1 #eea_pref_list = EEA0, EEA2, EEA1
#eia_pref_list = EIA2, EIA1, EIA0 #eia_pref_list = EIA2, EIA1, EIA0

@ -214,7 +214,7 @@ void parse_args(all_args_t* args, int argc, char* argv[])
("expert.eea_pref_list", bpo::value<string>(&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.eea_pref_list", bpo::value<string>(&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<string>(&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.eia_pref_list", bpo::value<string>(&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<uint32_t>(&args->stack.mac.max_nof_ues)->default_value(64), "Maximum number of connected UEs") ("expert.max_nof_ues", bpo::value<uint32_t>(&args->stack.mac.max_nof_ues)->default_value(64), "Maximum number of connected UEs")
("expert.max_mac_dl_kos", bpo::value<uint32_t>(&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<uint32_t>(&args->general.max_mac_dl_kos)->default_value(50), "Maximum number of consecutive KOs before triggering the UE's release")
// eMBMS section // eMBMS section
("embms.enable", bpo::value<bool>(&args->stack.embms.enable)->default_value(false), "Enables MBMS in the eNB") ("embms.enable", bpo::value<bool>(&args->stack.embms.enable)->default_value(false), "Enables MBMS in the eNB")

@ -59,6 +59,7 @@ int rrc::ue::init()
rlf_timer = parent->task_sched.get_unique_timer(); rlf_timer = parent->task_sched.get_unique_timer();
activity_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_activity_timeout(MSG3_RX_TIMEOUT); // next UE response is Msg3
set_rlf_timeout();
mobility_handler.reset(new rrc_mobility(this)); mobility_handler.reset(new rrc_mobility(this));
return SRSRAN_SUCCESS; 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) void rrc::ue::activity_timer_expired(const activity_timeout_type_t type)
{ {
rlf_timer.stop();
if (parent) { if (parent) {
parent->logger.info("Activity timer for rnti=0x%x expired after %d ms", rnti, activity_timer.time_elapsed()); 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() void rrc::ue::rlf_timer_expired()
{ {
activity_timer.stop();
if (parent) { if (parent) {
parent->logger.info("RLF timer for rnti=0x%x expired after %d ms", rnti, rlf_timer.time_elapsed()); 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); parent->logger.info("Max retx reached for rnti=0x%x", rnti);
// Give UE time to start re-establishment // Give UE time to start re-establishment
set_rlf_timeout(); rlf_timer.run();
mac_ctrl.handle_max_retx(); mac_ctrl.handle_max_retx();
} }
@ -201,7 +204,6 @@ void rrc::ue::set_rlf_timeout()
uint32_t deadline = deadline_s * 1e3 + deadline_ms; uint32_t deadline = deadline_s * 1e3 + deadline_ms;
rlf_timer.set(deadline, [this](uint32_t tid) { rlf_timer_expired(); }); 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); 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) void rrc::ue::set_activity_timeout(const activity_timeout_type_t type)

Loading…
Cancel
Save