From e65bcd7147df922c25e9e888ee006e1e2ecbb342 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 12 Nov 2021 13:10:10 +0000 Subject: [PATCH] Changed default max S1 Setup retries to infinity --- lib/include/srsran/interfaces/enb_s1ap_interfaces.h | 2 +- lib/src/common/network_utils.cc | 2 -- srsenb/enb.conf.example | 6 ++++-- srsenb/src/main.cc | 2 +- srsenb/src/stack/s1ap/s1ap.cc | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/include/srsran/interfaces/enb_s1ap_interfaces.h b/lib/include/srsran/interfaces/enb_s1ap_interfaces.h index 8ccba2f5e..41013bc37 100644 --- a/lib/include/srsran/interfaces/enb_s1ap_interfaces.h +++ b/lib/include/srsran/interfaces/enb_s1ap_interfaces.h @@ -32,7 +32,7 @@ struct s1ap_args_t { std::string enb_name; uint32_t ts1_reloc_prep_timeout; uint32_t ts1_reloc_overall_timeout; - uint32_t max_s1_setup_retries; + int32_t max_s1_setup_retries; }; // S1AP interface for RRC diff --git a/lib/src/common/network_utils.cc b/lib/src/common/network_utils.cc index 29759d153..e6dc6a97b 100644 --- a/lib/src/common/network_utils.cc +++ b/lib/src/common/network_utils.cc @@ -234,13 +234,11 @@ bool connect_to(int fd, const char* dest_addr_str, int dest_port, sockaddr_in* d if (dest_sockaddr != nullptr) { *dest_sockaddr = sockaddr_tmp; } - if (connect(fd, (const struct sockaddr*)&sockaddr_tmp, sizeof(sockaddr_tmp)) == -1) { srslog::fetch_basic_logger(LOGSERVICE).info("Failed to establish socket connection to %s", dest_addr_str); perror("connect()"); return false; } - return true; } diff --git a/srsenb/enb.conf.example b/srsenb/enb.conf.example index 90f07dda2..ee7ec0fe8 100644 --- a/srsenb/enb.conf.example +++ b/srsenb/enb.conf.example @@ -359,7 +359,9 @@ enable = false # gtpu_tunnel_timeout: Time that GTPU takes to release indirect forwarding tunnel since the last received GTPU PDU (0 for no timer) # ts1_reloc_prep_timeout: S1AP TS 36.413 TS1RelocPrep Expiry Timeout value in milliseconds # ts1_reloc_overall_timeout: S1AP TS 36.413 TS1RelocOverall Expiry Timeout value in milliseconds -# s1_setup_max_retries: Maximum amount of retries to setup the S1AP connection. If this value is exceeded, an alarm is written to the log +# rlf_release_timer_ms: Time taken by eNB to release UE context after it detects a RLF +# rlf_min_ul_snr_estim: SNR threshold in dB below which the enb is notified with RLF ko +# s1_setup_max_retries: Maximum amount of retries to setup the S1AP connection. If this value is exceeded, an alarm is written to the log. -1 means infinity. # ##################################################################### [expert] @@ -396,4 +398,4 @@ enable = false #ts1_reloc_overall_timeout = 10000 #rlf_release_timer_ms = 4000 #rlf_min_ul_snr_estim = -2 -#s1_setup_max_retries = 12 +#s1_setup_max_retries = -1 diff --git a/srsenb/src/main.cc b/srsenb/src/main.cc index 81fc55ea5..d31d959f9 100644 --- a/srsenb/src/main.cc +++ b/srsenb/src/main.cc @@ -247,7 +247,7 @@ void parse_args(all_args_t* args, int argc, char* argv[]) ("expert.ts1_reloc_prep_timeout", bpo::value(&args->stack.s1ap.ts1_reloc_prep_timeout)->default_value(10000), "S1AP TS 36.413 TS1RelocPrep Expiry Timeout value in milliseconds.") ("expert.ts1_reloc_overall_timeout", bpo::value(&args->stack.s1ap.ts1_reloc_overall_timeout)->default_value(10000), "S1AP TS 36.413 TS1RelocOverall Expiry Timeout value in milliseconds.") ("expert.rlf_min_ul_snr_estim", bpo::value(&args->stack.mac.rlf_min_ul_snr_estim)->default_value(-2), "SNR threshold in dB below which the eNB is notified with rlf ko.") - ("expert.max_s1_setup_retries", bpo::value(&args->stack.s1ap.max_s1_setup_retries)->default_value(12), "Max S1 setup retries") + ("expert.max_s1_setup_retries", bpo::value(&args->stack.s1ap.max_s1_setup_retries)->default_value(-1), "Max S1 setup retries") // eMBMS section ("embms.enable", bpo::value(&args->stack.embms.enable)->default_value(false), "Enables MBMS in the eNB") diff --git a/srsenb/src/stack/s1ap/s1ap.cc b/srsenb/src/stack/s1ap/s1ap.cc index d128e93f7..12d598e30 100644 --- a/srsenb/src/stack/s1ap/s1ap.cc +++ b/srsenb/src/stack/s1ap/s1ap.cc @@ -277,7 +277,7 @@ void s1ap::s1_setup_proc_t::then(const srsran::proc_state_t& result) s1ap_ptr->mme_socket.close(); procInfo("S1AP socket closed."); s1ap_ptr->mme_connect_timer.run(); - if (connect_count > s1ap_ptr->args.max_s1_setup_retries) { + if (s1ap_ptr->args.max_s1_setup_retries > 0 && connect_count > s1ap_ptr->args.max_s1_setup_retries) { s1ap_ptr->alarms_channel("s1apError"); srsran_terminate("Error connecting to MME"); }