extend handover intraenb handover fsm to account for multiple C-RNTI CEs

master
Francisco Paisana 5 years ago
parent 92c4b3f226
commit 7ce23e0afb

@ -140,12 +140,14 @@ private:
uint32_t target_cell_id; uint32_t target_cell_id;
}; };
using unsuccessful_outcome_ev = std::false_type; using unsuccessful_outcome_ev = std::false_type;
using recfg_complete_ev = asn1::rrc::rrc_conn_recfg_complete_s;
// states // states
struct idle_st {}; struct idle_st {};
struct intraenb_ho_st { struct intraenb_ho_st {
const cell_info_common* target_cell = nullptr; const cell_info_common* target_cell = nullptr;
const cell_ctxt_dedicated* source_cell_ctxt = nullptr; const cell_ctxt_dedicated* source_cell_ctxt = nullptr;
uint16_t last_temp_crnti = SRSLTE_INVALID_RNTI;
void enter(rrc_mobility* f); void enter(rrc_mobility* f);
}; };
@ -190,7 +192,8 @@ private:
// FSM transition handlers // FSM transition handlers
void handle_s1_meas_report(idle_st& s, s1_source_ho_st& d, const ho_meas_report_ev& meas_report); void handle_s1_meas_report(idle_st& s, s1_source_ho_st& d, const ho_meas_report_ev& meas_report);
void handle_intraenb_meas_report(idle_st& s, intraenb_ho_st& d, const ho_meas_report_ev& meas_report); void handle_intraenb_meas_report(idle_st& s, intraenb_ho_st& d, const ho_meas_report_ev& meas_report);
void handle_crnti_ce(intraenb_ho_st& s, idle_st& d, const user_crnti_upd_ev& ev); void handle_crnti_ce(intraenb_ho_st& s, intraenb_ho_st& d, const user_crnti_upd_ev& ev);
void handle_recfg_complete(intraenb_ho_st& s, idle_st& d, const recfg_complete_ev& ev);
protected: protected:
// states // states
@ -205,10 +208,11 @@ protected:
// clang-format off // clang-format off
using transitions = transition_table< using transitions = transition_table<
// Start Target Event Action Guard (optional) // Start Target Event Action Guard (optional)
// +------------+---------------+--------------------+---------------------------------+---------------------------+ // +---------------+----------------+--------------------+---------------------------------+-------------------------+
row< idle_st, intraenb_ho_st, ho_meas_report_ev, &fsm::handle_intraenb_meas_report, &fsm::needs_intraenb_ho >,
row< idle_st, s1_source_ho_st, ho_meas_report_ev, &fsm::handle_s1_meas_report, &fsm::needs_s1_ho >, row< idle_st, s1_source_ho_st, ho_meas_report_ev, &fsm::handle_s1_meas_report, &fsm::needs_s1_ho >,
row< intraenb_ho_st, idle_st, user_crnti_upd_ev, &fsm::handle_crnti_ce > row< idle_st, intraenb_ho_st, ho_meas_report_ev, &fsm::handle_intraenb_meas_report, &fsm::needs_intraenb_ho >,
row< intraenb_ho_st, intraenb_ho_st, user_crnti_upd_ev, &fsm::handle_crnti_ce >,
row< intraenb_ho_st, idle_st, recfg_complete_ev, &fsm::handle_recfg_complete >
>; >;
// clang-format on // clang-format on
}; };

@ -958,6 +958,7 @@ void rrc::ue::rrc_mobility::intraenb_ho_st::enter(rrc_mobility* f)
f->trigger(srslte::failure_ev{}); f->trigger(srslte::failure_ev{});
return; return;
} }
last_temp_crnti = SRSLTE_INVALID_RNTI;
/* Allocate Resources in Target Cell */ /* Allocate Resources in Target Cell */
// NOTE: for intra-eNB Handover only CQI resources will change // NOTE: for intra-eNB Handover only CQI resources will change
@ -993,10 +994,13 @@ void rrc::ue::rrc_mobility::intraenb_ho_st::enter(rrc_mobility* f)
} }
} }
void rrc::ue::rrc_mobility::handle_crnti_ce(intraenb_ho_st& s, idle_st& d, const user_crnti_upd_ev& ev) void rrc::ue::rrc_mobility::handle_crnti_ce(intraenb_ho_st& s, intraenb_ho_st& d, const user_crnti_upd_ev& ev)
{ {
rrc_log->info("UE performing handover updated its temp-crnti=0x%x to rnti=0x%x\n", ev.temp_crnti, ev.crnti); rrc_log->info("UE performing handover updated its temp-crnti=0x%x to rnti=0x%x\n", ev.temp_crnti, ev.crnti);
bool is_first_crnti_ce = s.last_temp_crnti == SRSLTE_INVALID_RNTI;
s.last_temp_crnti = ev.temp_crnti;
if (is_first_crnti_ce) {
// Need to reset SNs of bearers. // Need to reset SNs of bearers.
rrc_enb->pdcp->rem_user(rrc_ue->rnti); rrc_enb->pdcp->rem_user(rrc_ue->rnti);
rrc_enb->pdcp->add_user(rrc_ue->rnti); rrc_enb->pdcp->add_user(rrc_ue->rnti);
@ -1011,8 +1015,15 @@ void rrc::ue::rrc_mobility::handle_crnti_ce(intraenb_ho_st& s, idle_st& d, const
rrc_ue->ue_security_cfg.regenerate_keys_handover(s.target_cell->cell_cfg.pci, s.target_cell->cell_cfg.dl_earfcn); rrc_ue->ue_security_cfg.regenerate_keys_handover(s.target_cell->cell_cfg.pci, s.target_cell->cell_cfg.dl_earfcn);
rrc_ue->bearer_list.reest_bearers(); rrc_ue->bearer_list.reest_bearers();
rrc_ue->bearer_list.apply_pdcp_bearer_updates(rrc_enb->pdcp, rrc_ue->ue_security_cfg); rrc_ue->bearer_list.apply_pdcp_bearer_updates(rrc_enb->pdcp, rrc_ue->ue_security_cfg);
} else {
rrc_log->info("Received duplicate C-RNTI CE during rnti=0x%x handover.\n", rrc_ue->rnti);
}
}
rrc_log->info("new rnti=0x%x PCell is %d\n", ev.crnti, s.target_cell->enb_cc_idx); void rrc::ue::rrc_mobility::handle_recfg_complete(intraenb_ho_st& s, idle_st& d, const recfg_complete_ev& ev)
{
rrc_log->info(
"User rnti=0x%x successfully handovered to cell_id=0x%x\n", rrc_ue->rnti, s.target_cell->cell_cfg.cell_id);
} }
} // namespace srsenb } // namespace srsenb

@ -652,6 +652,9 @@ void rrc::ue::handle_rrc_reconf_complete(rrc_conn_recfg_complete_s* msg, srslte:
// Flag completion of RadioResource Configuration // Flag completion of RadioResource Configuration
bearer_list.rr_ded_cfg_complete(); bearer_list.rr_ded_cfg_complete();
// If performing handover, signal its completion
mobility_handler->trigger(*msg);
} else { } else {
parent->rrc_log->error("Expected RRCReconfigurationComplete with transaction ID: %d, got %d\n", parent->rrc_log->error("Expected RRCReconfigurationComplete with transaction ID: %d, got %d\n",
last_rrc_conn_recfg.rrc_transaction_id, last_rrc_conn_recfg.rrc_transaction_id,

Loading…
Cancel
Save