Refactor E1 UE removal in separate function
Refactor into remove_ue_e1(), to be used in the next commit, independent of e1_bearer_release_cmd().
This commit is contained in:
@@ -300,24 +300,28 @@ void e1_bearer_context_modif(const e1ap_bearer_mod_req_t *req)
|
|||||||
get_e1_if()->bearer_modif_response(&modif);
|
get_e1_if()->bearer_modif_response(&modif);
|
||||||
}
|
}
|
||||||
|
|
||||||
void e1_bearer_release_cmd(const e1ap_bearer_release_cmd_t *cmd)
|
static void remove_ue_e1(const uint32_t ue_id)
|
||||||
{
|
{
|
||||||
bool need_ue_id_mgmt = e1_used();
|
bool need_ue_id_mgmt = e1_used();
|
||||||
|
|
||||||
instance_t n3inst = get_n3_gtp_instance();
|
instance_t n3inst = get_n3_gtp_instance();
|
||||||
instance_t f1inst = get_f1_gtp_instance();
|
instance_t f1inst = get_f1_gtp_instance();
|
||||||
|
|
||||||
LOG_I(E1AP, "releasing UE %d\n", cmd->gNB_cu_up_ue_id);
|
newGtpuDeleteAllTunnels(n3inst, ue_id);
|
||||||
|
|
||||||
newGtpuDeleteAllTunnels(n3inst, cmd->gNB_cu_up_ue_id);
|
|
||||||
if (f1inst >= 0) // is there F1-U?
|
if (f1inst >= 0) // is there F1-U?
|
||||||
newGtpuDeleteAllTunnels(f1inst, cmd->gNB_cu_up_ue_id);
|
newGtpuDeleteAllTunnels(f1inst, ue_id);
|
||||||
if (need_ue_id_mgmt) {
|
if (need_ue_id_mgmt) {
|
||||||
// see issue #706: in monolithic, gNB will free PDCP of UE
|
// see issue #706: in monolithic, gNB will free PDCP of UE
|
||||||
nr_pdcp_remove_UE(cmd->gNB_cu_up_ue_id);
|
nr_pdcp_remove_UE(ue_id);
|
||||||
cu_remove_f1_ue_data(cmd->gNB_cu_up_ue_id);
|
cu_remove_f1_ue_data(ue_id);
|
||||||
}
|
}
|
||||||
nr_sdap_delete_ue_entities(cmd->gNB_cu_up_ue_id);
|
nr_sdap_delete_ue_entities(ue_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void e1_bearer_release_cmd(const e1ap_bearer_release_cmd_t *cmd)
|
||||||
|
{
|
||||||
|
LOG_I(E1AP, "releasing UE %d\n", cmd->gNB_cu_up_ue_id);
|
||||||
|
remove_ue_e1(cmd->gNB_cu_up_ue_id);
|
||||||
|
|
||||||
e1ap_bearer_release_cplt_t cplt = {
|
e1ap_bearer_release_cplt_t cplt = {
|
||||||
.gNB_cu_cp_ue_id = cmd->gNB_cu_cp_ue_id,
|
.gNB_cu_cp_ue_id = cmd->gNB_cu_cp_ue_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user