nr,gnb,rrc: Allow NR EN-DC to be re-activated in case of Reestablishment with cause other than ReconfFailure

master
Francisco 3 years ago committed by Francisco Paisana
parent 1d37c5b476
commit abe2c8cba4

@ -64,6 +64,11 @@ public:
*/ */
struct sgnb_rel_req_ack_ev {}; struct sgnb_rel_req_ack_ev {};
/**
* @brief in case of non supported NR carrier in UE capabilities or the NR reconfiguration failed
*/
struct disable_endc_ev {};
rrc_endc(srsenb::rrc::ue* outer_ue, const rrc_endc_cfg_t& endc_cfg_); rrc_endc(srsenb::rrc::ue* outer_ue, const rrc_endc_cfg_t& endc_cfg_);
~rrc_endc(); ~rrc_endc();
@ -91,9 +96,8 @@ private:
uint32_t nr_meas_id = 0; uint32_t nr_meas_id = 0;
// vars // vars
bool endc_supported = false; rrc_endc_cfg_t endc_cfg = {};
rrc_endc_cfg_t endc_cfg = {}; uint16_t nr_rnti = SRSRAN_INVALID_RNTI; // C-RNTI assigned to UE on NR side
uint16_t nr_rnti = SRSRAN_INVALID_RNTI; // C-RNTI assigned to UE on NR side
asn1::rrc::rrc_conn_recfg_complete_s pending_recfg_complete; asn1::rrc::rrc_conn_recfg_complete_s pending_recfg_complete;
// fixed ENDC variables // fixed ENDC variables
@ -119,13 +123,15 @@ private:
struct wait_add_complete_st {}; // user needs to complete RA procedure and send C-RNTI CE struct wait_add_complete_st {}; // user needs to complete RA procedure and send C-RNTI CE
struct endc_activated_st {}; // user has enabled EN-DC successfully and is currently served struct endc_activated_st {}; // user has enabled EN-DC successfully and is currently served
struct wait_sgnb_rel_req_resp_st {}; // release EN-DC struct wait_sgnb_rel_req_resp_st {}; // release EN-DC
struct endc_disabled_st {}; // EN-DC disabled
// FSM guards // FSM guards
// FSM transition handlers // FSM transition handlers
void handle_sgnb_add_req_ack(wait_sgnb_add_req_resp_st& s, const sgnb_add_req_ack_ev& ev); void handle_sgnb_add_req_ack(wait_sgnb_add_req_resp_st& s, const sgnb_add_req_ack_ev& ev);
void handle_sgnb_rel_req(endc_activated_st& s, const sgnb_rel_req_ev& ev); void handle_sgnb_rel_req(endc_activated_st& s, const sgnb_rel_req_ev& ev);
void handle_rrc_reest(wait_add_complete_st& s, const rrc_reest_rx_ev& ev); void handle_rrc_reest(const rrc_reest_rx_ev& ev);
void handle_endc_disabled(const disable_endc_ev& ev);
protected: protected:
// states // states
@ -134,14 +140,16 @@ protected:
prepare_recfg_st, prepare_recfg_st,
wait_add_complete_st, wait_add_complete_st,
endc_activated_st, endc_activated_st,
wait_sgnb_rel_req_resp_st> wait_sgnb_rel_req_resp_st,
endc_disabled_st>
states{this, states{this,
endc_deactivated_st{}, endc_deactivated_st{},
wait_sgnb_add_req_resp_st{}, wait_sgnb_add_req_resp_st{},
prepare_recfg_st{this}, prepare_recfg_st{this},
wait_add_complete_st{}, wait_add_complete_st{},
endc_activated_st{}, endc_activated_st{},
wait_sgnb_rel_req_resp_st{}}; wait_sgnb_rel_req_resp_st{},
endc_disabled_st{}};
// transitions // transitions
using fsm = rrc_endc; using fsm = rrc_endc;
@ -155,11 +163,11 @@ protected:
row< wait_sgnb_add_req_resp_st, endc_deactivated_st, sgnb_add_req_reject_ev >, row< wait_sgnb_add_req_resp_st, endc_deactivated_st, sgnb_add_req_reject_ev >,
row< prepare_recfg_st, wait_add_complete_st, rrc_recfg_sent_ev >, row< prepare_recfg_st, wait_add_complete_st, rrc_recfg_sent_ev >,
row< wait_add_complete_st, endc_activated_st, sgnb_add_complete_ev >, row< wait_add_complete_st, endc_activated_st, sgnb_add_complete_ev >,
row< wait_add_complete_st, endc_deactivated_st, rrc_reest_rx_ev, &fsm::handle_rrc_reest >,
// +---------------------------+--------------------------+------------------------+------------------------------+-------------------------+ // +---------------------------+--------------------------+------------------------+------------------------------+-------------------------+
row< endc_activated_st, wait_sgnb_rel_req_resp_st, sgnb_rel_req_ev, &fsm::handle_sgnb_rel_req >, row< endc_activated_st, wait_sgnb_rel_req_resp_st, sgnb_rel_req_ev, &fsm::handle_sgnb_rel_req >,
row< wait_sgnb_rel_req_resp_st, endc_deactivated_st, sgnb_rel_req_ack_ev > to_state< endc_deactivated_st, rrc_reest_rx_ev, &fsm::handle_rrc_reest >,
row< wait_sgnb_rel_req_resp_st, endc_deactivated_st, sgnb_rel_req_ack_ev >,
to_state< endc_disabled_st, disable_endc_ev, &fsm::handle_endc_disabled >
>; >;
// clang-format on // clang-format on
}; };

@ -50,7 +50,7 @@ rrc::ue::rrc_endc::~rrc_endc()
//! Method to add NR fields to a RRC Connection Reconfiguration Message //! Method to add NR fields to a RRC Connection Reconfiguration Message
bool rrc::ue::rrc_endc::fill_conn_recfg(asn1::rrc::rrc_conn_recfg_r8_ies_s* conn_recfg) bool rrc::ue::rrc_endc::fill_conn_recfg(asn1::rrc::rrc_conn_recfg_r8_ies_s* conn_recfg)
{ {
if (not endc_supported) { if (not is_endc_supported()) {
// skipping ENDC-related field // skipping ENDC-related field
return false; return false;
} }
@ -228,6 +228,7 @@ void rrc::ue::rrc_endc::handle_eutra_capabilities(const asn1::rrc::ue_eutra_cap_
// skip any further checks if eNB runs without NR cells // skip any further checks if eNB runs without NR cells
if (rrc_enb->cfg.num_nr_cells == 0) { if (rrc_enb->cfg.num_nr_cells == 0) {
Debug("Skipping UE capabilities. No NR cell configured."); Debug("Skipping UE capabilities. No NR cell configured.");
trigger(disable_endc_ev{});
return; return;
} }
@ -257,7 +258,7 @@ void rrc::ue::rrc_endc::handle_eutra_capabilities(const asn1::rrc::ue_eutra_cap_
if (ue_cap_v1510.irat_params_nr_r15_present) { if (ue_cap_v1510.irat_params_nr_r15_present) {
if (ue_cap_v1510.irat_params_nr_r15.en_dc_r15_present) { if (ue_cap_v1510.irat_params_nr_r15.en_dc_r15_present) {
logger.info("Enabling ENDC support for rnti=%d", rrc_ue->rnti); logger.info("Enabling ENDC support for rnti=%d", rrc_ue->rnti);
endc_supported = true; return;
} }
} }
} }
@ -273,13 +274,15 @@ void rrc::ue::rrc_endc::handle_eutra_capabilities(const asn1::rrc::ue_eutra_cap_
} }
} }
} }
trigger(disable_endc_ev{});
} }
//! Method called whenever the eNB receives a MeasReport from the UE //! Method called whenever the eNB receives a MeasReport from the UE
void rrc::ue::rrc_endc::handle_ue_meas_report(const meas_report_s& msg) void rrc::ue::rrc_endc::handle_ue_meas_report(const meas_report_s& msg)
{ {
// Ignore event if ENDC isn't supported // Ignore event if ENDC isn't supported
if (not endc_supported) { if (not is_endc_supported()) {
return; return;
} }
@ -363,10 +366,10 @@ void rrc::ue::rrc_endc::handle_sgnb_rel_req(endc_activated_st& s, const sgnb_rel
bool rrc::ue::rrc_endc::is_endc_supported() bool rrc::ue::rrc_endc::is_endc_supported()
{ {
return endc_supported; return not is_in_state<endc_disabled_st>();
} }
void rrc::ue::rrc_endc::handle_rrc_reest(wait_add_complete_st& s, const rrc_reest_rx_ev& ev) void rrc::ue::rrc_endc::handle_rrc_reest(const rrc_reest_rx_ev& ev)
{ {
auto& sgnb_config = get_state<prepare_recfg_st>()->sgnb_config; auto& sgnb_config = get_state<prepare_recfg_st>()->sgnb_config;
@ -376,4 +379,9 @@ void rrc::ue::rrc_endc::handle_rrc_reest(wait_add_complete_st& s, const rrc_rees
rrc_enb->bearer_manager.rem_user(sgnb_config.nr_rnti); rrc_enb->bearer_manager.rem_user(sgnb_config.nr_rnti);
} }
void rrc::ue::rrc_endc::handle_endc_disabled(const disable_endc_ev& ev)
{
logger.info("Disabling NR EN-DC support for rnti=0x%x", nr_rnti);
}
} // namespace srsenb } // namespace srsenb

@ -694,6 +694,13 @@ void rrc::ue::handle_rrc_con_reest_req(rrc_conn_reest_request_s* msg)
eutra_capabilities.to_json(js); eutra_capabilities.to_json(js);
parent->logger.debug("rnti=0x%x EUTRA capabilities: %s", rnti, js.to_string().c_str()); parent->logger.debug("rnti=0x%x EUTRA capabilities: %s", rnti, js.to_string().c_str());
} }
if (endc_handler) {
if (req_r8.reest_cause.value == reest_cause_opts::recfg_fail) {
endc_handler->trigger(rrc_endc::disable_endc_ev{});
} else {
endc_handler->handle_eutra_capabilities(eutra_capabilities);
}
}
// Recover GTP-U tunnels and S1AP context // Recover GTP-U tunnels and S1AP context
parent->gtpu->mod_bearer_rnti(old_rnti, rnti); parent->gtpu->mod_bearer_rnti(old_rnti, rnti);

Loading…
Cancel
Save