diff --git a/srsenb/hdr/enb.h b/srsenb/hdr/enb.h index 49b7e2ae6..8fd4a4437 100644 --- a/srsenb/hdr/enb.h +++ b/srsenb/hdr/enb.h @@ -87,7 +87,7 @@ struct gui_args_t { }; struct general_args_t { - int32_t rrc_inactivity_timer; + uint32_t rrc_inactivity_timer; float metrics_period_secs; bool metrics_csv_enable; std::string metrics_csv_filename; @@ -143,8 +143,8 @@ private: std::unique_ptr radio = nullptr; std::unique_ptr phy = nullptr; - srslte::logger* logger = nullptr; - srslte::log_ref log; // Own logger for eNB + srslte::logger* logger = nullptr; + srslte::log_ref log; // Own logger for eNB srslte::log_filter pool_log; diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index 7f2b3ec8a..54af50f27 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -954,13 +954,16 @@ int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_ rrc_cfg_->sibs[1].sib2().rr_cfg_common.pdsch_cfg_common.p_b = 1; } - if (args_->general.rrc_inactivity_timer == -1) { - uint32_t t310 = rrc_cfg_->sibs[1].sib2().ue_timers_and_consts.t310.to_number(); - uint32_t t311 = rrc_cfg_->sibs[1].sib2().ue_timers_and_consts.t311.to_number(); - uint32_t n310 = rrc_cfg_->sibs[1].sib2().ue_timers_and_consts.n310.to_number(); - rrc_cfg_->inactivity_timeout_ms = t310 + t311 + n310 + 50; - } else { - rrc_cfg_->inactivity_timeout_ms = args_->general.rrc_inactivity_timer; + rrc_cfg_->inactivity_timeout_ms = args_->general.rrc_inactivity_timer; + uint32_t t310 = rrc_cfg_->sibs[1].sib2().ue_timers_and_consts.t310.to_number(); + uint32_t t311 = rrc_cfg_->sibs[1].sib2().ue_timers_and_consts.t311.to_number(); + uint32_t n310 = rrc_cfg_->sibs[1].sib2().ue_timers_and_consts.n310.to_number(); + uint32_t min_rrc_inactivity_timer = t310 + t311 + n310 + 50; + if (args_->general.rrc_inactivity_timer < min_rrc_inactivity_timer) { + ERROR("rrc_inactivity_timer=%d is too low. Setting it to %d\n", + args_->general.rrc_inactivity_timer, + min_rrc_inactivity_timer); + rrc_cfg_->inactivity_timeout_ms = min_rrc_inactivity_timer; } rrc_cfg_->enable_mbsfn = args_->stack.embms.enable; rrc_cfg_->mbms_mcs = args_->stack.embms.mcs; diff --git a/srsenb/src/main.cc b/srsenb/src/main.cc index 00e1acb24..0c0df775b 100644 --- a/srsenb/src/main.cc +++ b/srsenb/src/main.cc @@ -191,7 +191,7 @@ void parse_args(all_args_t* args, int argc, char* argv[]) ("expert.max_prach_offset_us", bpo::value(&args->phy.max_prach_offset_us)->default_value(30), "Maximum allowed RACH offset (in us)") ("expert.equalizer_mode", bpo::value(&args->phy.equalizer_mode)->default_value("mmse"), "Equalizer mode") ("expert.estimator_fil_w", bpo::value(&args->phy.estimator_fil_w)->default_value(0.1), "Chooses the coefficients for the 3-tap channel estimator centered filter.") - ("expert.rrc_inactivity_timer", bpo::value(&args->general.rrc_inactivity_timer)->default_value(-1), "Inactivity timer in ms. With -1 the timeout is automatically derived.") + ("expert.rrc_inactivity_timer", bpo::value(&args->general.rrc_inactivity_timer)->default_value(30000), "Inactivity timer in ms.") ("expert.print_buffer_state", bpo::value(&args->general.print_buffer_state)->default_value(false), "Prints on the console the buffer state every 10 seconds") ("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).") diff --git a/srsenb/src/stack/rrc/rrc_cell_cfg.cc b/srsenb/src/stack/rrc/rrc_cell_cfg.cc index 25ceb207b..6281aa677 100644 --- a/srsenb/src/stack/rrc/rrc_cell_cfg.cc +++ b/srsenb/src/stack/rrc/rrc_cell_cfg.cc @@ -431,7 +431,10 @@ bool cell_ctxt_dedicated_list::alloc_sr_resources(uint32_t period) sr_res.sr_sched_sf_idx = j_min; sr_res_present = true; - log_h->info("Allocated SR resources in time-freq slot (%d, %d)\n", sr_res.sr_sched_prb_idx, sr_res.sr_sched_sf_idx); + log_h->info("Allocated SR resources in time-freq slot (%d, %d), sf_cfg_idx=%d\n", + sr_res.sr_sched_sf_idx, + sr_res.sr_sched_prb_idx, + cfg.sr_cfg.sf_mapping[sr_res.sr_sched_sf_idx]); return true; } diff --git a/srsenb/test/upper/rrc_mobility_test.cc b/srsenb/test/upper/rrc_mobility_test.cc index becd5769d..609d11429 100644 --- a/srsenb/test/upper/rrc_mobility_test.cc +++ b/srsenb/test/upper/rrc_mobility_test.cc @@ -515,9 +515,9 @@ int test_s1ap_tenb_mobility(mobility_test_params test_params) ho_cmd.crit_exts.c1().ho_cmd_r8().ho_cmd_msg.size()}; dl_dcch_msg_s dl_dcch_msg; TESTASSERT(dl_dcch_msg.unpack(bref) == asn1::SRSASN_SUCCESS); + TESTASSERT(dl_dcch_msg.msg.type().value == dl_dcch_msg_type_c::types_opts::c1); + TESTASSERT(dl_dcch_msg.msg.c1().type().value == dl_dcch_msg_type_c::c1_c_::types_opts::rrc_conn_recfg); auto& recfg_r8 = dl_dcch_msg.msg.c1().rrc_conn_recfg().crit_exts.c1().rrc_conn_recfg_r8(); - TESTASSERT(recfg_r8.rr_cfg_ded.phys_cfg_ded.sched_request_cfg.setup().sr_cfg_idx == 15); - TESTASSERT(recfg_r8.rr_cfg_ded.phys_cfg_ded.sched_request_cfg.setup().sr_pucch_res_idx == 0); // Receives MMEStatusTransfer asn1::s1ap::bearers_subject_to_status_transfer_list_l bearers;