Introduce an_release flag: only free UE in RRC+ack if requested by core
The F1AP UE context release procedure can happen in at least two cases: 1. core requested a release of a UE 2. CU requests DU a release of a UE without a core release (e.g., handover) In case 1., the CU has to fully release the UE in the CU, then ack the NGAP message from the core, whilst in 2., nothing of that should happen after the DU acknowledges the F1AP UE context release cmd.
This commit is contained in:
@@ -289,6 +289,8 @@ typedef struct gNB_RRC_UE_s {
|
||||
uint32_t ue_reestablishment_counter;
|
||||
uint32_t ue_reconfiguration_counter;
|
||||
|
||||
bool an_release; // flag if core requested UE release
|
||||
|
||||
/* NGUEContextSetup might come with PDU sessions, but setup needs to be
|
||||
* delayed after security (and capability); PDU sessions are stored here */
|
||||
int n_initial_pdu;
|
||||
|
||||
@@ -2030,7 +2030,13 @@ static void rrc_CU_process_ue_context_release_complete(MessageDef *msg_p)
|
||||
return;
|
||||
}
|
||||
|
||||
rrc_remove_ue(RC.nrrrc[0], ue_context_p);
|
||||
gNB_RRC_UE_t *UE = &ue_context_p->ue_context;
|
||||
if (UE->an_release) {
|
||||
/* only trigger release if it has been requested by core
|
||||
* otherwise, it might be CU that requested release on a DU during normal
|
||||
* operation (i.e, handover) */
|
||||
rrc_remove_ue(RC.nrrrc[0], ue_context_p);
|
||||
}
|
||||
}
|
||||
|
||||
static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, instance_t instance)
|
||||
|
||||
@@ -1180,6 +1180,7 @@ int rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(MessageDef *msg_p, instance_
|
||||
}
|
||||
|
||||
gNB_RRC_UE_t *UE = &ue_context_p->ue_context;
|
||||
UE->an_release = true;
|
||||
#ifdef E2_AGENT
|
||||
signal_rrc_state_changed_to(UE, RC_SM_RRC_IDLE);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user