avoid sending UEContextReleaseRequest from Source eNB during S1 Handover.

master
Francisco 4 years ago committed by Ismael Gomez
parent f2a56c9139
commit b093576634

@ -60,7 +60,7 @@ detail::scope_exit<typename std::decay<Callable>::type> make_scope_exit(Callable
return detail::scope_exit<typename std::decay<Callable>::type>{std::forward<Callable>(callable)};
}
#define DEFER(FUNC) auto on_exit_call = make_scope_exit([&]() { FUNC })
#define DEFER(FUNC) auto on_exit_call##__LINE__ = srsran::make_scope_exit([&]() { FUNC })
} // namespace srsran

@ -206,29 +206,25 @@ void rrc::ue::rlf_timer_expired(uint32_t timeout_id)
parent->logger.info("RLC RLF timer for rnti=0x%x expired after %d ms", rnti, rlc_rlf_timer.time_elapsed());
}
phy_ul_rlf_timer.stop();
phy_dl_rlf_timer.stop();
rlc_rlf_timer.stop();
state = RRC_STATE_RELEASE_REQUEST;
if (parent->s1ap->user_release(rnti, asn1::s1ap::cause_radio_network_opts::radio_conn_with_ue_lost)) {
con_release_result = procedure_result_code::radio_conn_with_ue_lost;
phy_ul_rlf_timer.stop();
phy_dl_rlf_timer.stop();
rlc_rlf_timer.stop();
} else {
if (rnti != SRSRAN_MRNTI) {
parent->rem_user(rnti);
}
} else if (rnti != SRSRAN_MRNTI) {
parent->rem_user(rnti);
}
state = RRC_STATE_RELEASE_REQUEST;
}
void rrc::ue::max_rlc_retx_reached()
{
if (parent) {
parent->logger.info("Max RLC retx reached for rnti=0x%x", rnti);
parent->logger.info("Max RLC retx reached for rnti=0x%x", rnti);
// Turn off DRB scheduling but give UE chance to start re-establishment
rlc_rlf_timer.run();
mac_ctrl.handle_max_retx();
}
// Turn off DRB scheduling but give UE chance to start re-establishment
rlc_rlf_timer.run();
mac_ctrl.handle_max_retx();
}
void rrc::ue::set_activity_timeout(const activity_timeout_type_t type)

@ -420,11 +420,7 @@ bool s1ap::user_release(uint16_t rnti, asn1::s1ap::cause_radio_network_e cause_r
cause_c cause;
cause.set_radio_network().value = cause_radio.value;
if (not u->send_uectxtreleaserequest(cause)) {
users.erase(u);
return false;
}
return true;
return u->send_uectxtreleaserequest(cause);
}
bool s1ap::user_exists(uint16_t rnti)
@ -1400,14 +1396,21 @@ bool s1ap::ue::send_uectxtreleaserequest(const cause_c& cause)
{
if (was_uectxtrelease_requested()) {
logger.warning("UE context for RNTI:0x%x is in zombie state. Releasing...", ctxt.rnti);
s1ap_ptr->users.erase(this);
return false;
}
if (not ctxt.mme_ue_s1ap_id.has_value()) {
logger.error("Cannot send UE context release request without a MME-UE-S1AP-Id allocated.");
s1ap_ptr->users.erase(this);
return false;
}
if (ts1_reloc_overall.is_running()) {
logger.info("Not sending UEContextReleaseRequest for UE rnti=0x%x performing S1 Handover.", ctxt.rnti);
s1ap_ptr->users.erase(this);
return false;
}
release_requested = true;
s1ap_pdu_c tx_pdu;
tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_UE_CONTEXT_RELEASE_REQUEST);
ue_context_release_request_ies_container& container =
@ -1418,7 +1421,11 @@ bool s1ap::ue::send_uectxtreleaserequest(const cause_c& cause)
// Cause
container.cause.value = cause;
return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UEContextReleaseRequest");
release_requested = s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UEContextReleaseRequest");
if (not release_requested) {
s1ap_ptr->users.erase(this);
}
return release_requested;
}
bool s1ap::ue::send_uectxtreleasecomplete()

Loading…
Cancel
Save