S1AP UE context release
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6315 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -475,6 +475,7 @@ typedef struct s1ap_paging_ind_s {
|
|||||||
paging_priority_t paging_priority;
|
paging_priority_t paging_priority;
|
||||||
} s1ap_paging_ind_t;
|
} s1ap_paging_ind_t;
|
||||||
|
|
||||||
|
// S1AP --> RRC messages
|
||||||
typedef struct s1ap_ue_release_command_s {
|
typedef struct s1ap_ue_release_command_s {
|
||||||
|
|
||||||
unsigned eNB_ue_s1ap_id:24;
|
unsigned eNB_ue_s1ap_id:24;
|
||||||
@@ -483,10 +484,21 @@ typedef struct s1ap_ue_release_command_s {
|
|||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------//
|
//-------------------------------------------------------------------------------------------//
|
||||||
// S1AP <-> RRC messages
|
typedef enum S1ap_Cause_e {
|
||||||
|
S1AP_CAUSE_NOTHING, /* No components present */
|
||||||
|
S1AP_CAUSE_RADIO_NETWORK,
|
||||||
|
S1AP_CAUSE_TRANSPORT,
|
||||||
|
S1AP_CAUSE_NAS,
|
||||||
|
S1AP_CAUSE_PROTOCOL,
|
||||||
|
S1AP_CAUSE_MISC,
|
||||||
|
/* Extensions may appear below */
|
||||||
|
|
||||||
|
} s1ap_Cause_t;
|
||||||
|
// S1AP <-- RRC messages
|
||||||
typedef struct s1ap_ue_release_req_s {
|
typedef struct s1ap_ue_release_req_s {
|
||||||
unsigned eNB_ue_s1ap_id:24;
|
unsigned eNB_ue_s1ap_id:24;
|
||||||
/* TODO: add cause */
|
s1ap_Cause_t cause;
|
||||||
|
long cause_value;
|
||||||
} s1ap_ue_release_req_t, s1ap_ue_release_resp_t;
|
} s1ap_ue_release_req_t, s1ap_ue_release_resp_t;
|
||||||
|
|
||||||
#endif /* S1AP_MESSAGES_TYPES_H_ */
|
#endif /* S1AP_MESSAGES_TYPES_H_ */
|
||||||
|
|||||||
@@ -540,9 +540,18 @@ void rrc_eNB_free_UE_index(
|
|||||||
|
|
||||||
LOG_W(RRC, "[eNB %d] Removing UE %d rv 0x%" PRIx64 "\n", enb_mod_idP, ue_mod_idP,
|
LOG_W(RRC, "[eNB %d] Removing UE %d rv 0x%" PRIx64 "\n", enb_mod_idP, ue_mod_idP,
|
||||||
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP]);
|
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP]);
|
||||||
|
|
||||||
|
#if defined(ENABLE_USE_MME)
|
||||||
|
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_mod_idP, S1AP_CAUSE_RADIO_NETWORK, 0); // ue_mod_idP ??? or ???
|
||||||
|
/* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered)
|
||||||
|
* If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before
|
||||||
|
* triggering the S1 UE Context Release Request procedure
|
||||||
|
* in order to allow the UE to perform the NAS recovery
|
||||||
|
* procedure, see TS 23.401 [17].
|
||||||
|
*/
|
||||||
|
#endif
|
||||||
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].Status = RRC_IDLE;
|
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].Status = RRC_IDLE;
|
||||||
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0;
|
eNB_rrc_inst[enb_mod_idP].Info.UE_list[ue_mod_idP] = 0;
|
||||||
|
|
||||||
rrc_rlc_remove_ue(enb_mod_idP, ue_mod_idP, frameP,ENB_FLAG_YES);
|
rrc_rlc_remove_ue(enb_mod_idP, ue_mod_idP, frameP,ENB_FLAG_YES);
|
||||||
pdcp_remove_UE(enb_mod_idP, ue_mod_idP, frameP);
|
pdcp_remove_UE(enb_mod_idP, ue_mod_idP, frameP);
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ static uint16_t get_next_ue_initial_id(uint8_t mod_id) {
|
|||||||
if (ue_initial_id[mod_id] == UE_INITIAL_ID_INVALID) {
|
if (ue_initial_id[mod_id] == UE_INITIAL_ID_INVALID) {
|
||||||
ue_initial_id[mod_id]++;
|
ue_initial_id[mod_id]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ue_initial_id[mod_id];
|
return ue_initial_id[mod_id];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -808,6 +807,47 @@ int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_REQ (MessageDef *msg_p, const char *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------*/
|
||||||
|
void rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ (uint8_t mod_id, uint8_t ue_index, s1ap_Cause_t causeP, long cause_valueP) {
|
||||||
|
uint32_t eNB_ue_s1ap_id;
|
||||||
|
|
||||||
|
if (ue_index == UE_INDEX_INVALID) {
|
||||||
|
LOG_W(RRC,
|
||||||
|
"[eNB] In S1AP_UE_CONTEXT_RELEASE_COMMAND: invalid UE\n");
|
||||||
|
return (-1);
|
||||||
|
} else {
|
||||||
|
int e_rab;
|
||||||
|
int mod_id = 0;
|
||||||
|
eNB_RRC_UE_INFO *UE_info = &eNB_rrc_inst[mod_id].Info.UE[ue_index];
|
||||||
|
/* MessageDef *msg_delete_tunnels_p = NULL;
|
||||||
|
|
||||||
|
msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_ENB, GTPV1U_ENB_DELETE_TUNNEL_REQ);
|
||||||
|
memset(>PV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p),
|
||||||
|
0,
|
||||||
|
sizeof(GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p)));
|
||||||
|
|
||||||
|
// do not wait response
|
||||||
|
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).ue_index = ue_index;
|
||||||
|
for (e_rab = 0; e_rab < UE_info->nb_of_e_rabs; e_rab++) {
|
||||||
|
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).eps_bearer_id[e_rab] = UE_info->enb_gtp_ebi[e_rab];
|
||||||
|
// erase data
|
||||||
|
UE_info->enb_gtp_teid[e_rab] = 0;
|
||||||
|
memset(&UE_info->enb_gtp_addrs[e_rab], 0, sizeof(UE_info->enb_gtp_addrs[e_rab]));
|
||||||
|
UE_info->enb_gtp_ebi[e_rab] = 0;
|
||||||
|
}
|
||||||
|
itti_send_msg_to_task(TASK_GTPV1_U, mod_id, msg_delete_tunnels_p);
|
||||||
|
*/
|
||||||
|
MessageDef *msg_complete_p = NULL;
|
||||||
|
msg_complete_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_REQ);
|
||||||
|
S1AP_UE_CONTEXT_RELEASE_REQ(msg_complete_p).eNB_ue_s1ap_id = UE_info->eNB_ue_s1ap_id;
|
||||||
|
S1AP_UE_CONTEXT_RELEASE_REQ(msg_complete_p).cause = causeP;
|
||||||
|
S1AP_UE_CONTEXT_RELEASE_REQ(msg_complete_p).cause_value = cause_valueP;
|
||||||
|
itti_send_msg_to_task(TASK_S1AP, mod_id, msg_complete_p);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND (MessageDef *msg_p, const char *msg_name, instance_t instance) {
|
int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND (MessageDef *msg_p, const char *msg_name, instance_t instance) {
|
||||||
uint32_t eNB_ue_s1ap_id;
|
uint32_t eNB_ue_s1ap_id;
|
||||||
|
|||||||
@@ -51,7 +51,6 @@
|
|||||||
*\param ue_index Instance ID of UE in the eNB.
|
*\param ue_index Instance ID of UE in the eNB.
|
||||||
*/
|
*/
|
||||||
void rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(uint8_t Mod_id, uint8_t UE_index);
|
void rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(uint8_t Mod_id, uint8_t UE_index);
|
||||||
# endif
|
|
||||||
|
|
||||||
/*! \fn void rrc_eNB_send_S1AP_UPLINK_NAS(uint8_t Mod_id, uint8_t UE_index, UL_DCCH_Message_t *ul_dcch_msg)
|
/*! \fn void rrc_eNB_send_S1AP_UPLINK_NAS(uint8_t Mod_id, uint8_t UE_index, UL_DCCH_Message_t *ul_dcch_msg)
|
||||||
*\brief create a S1AP_UPLINK_NAS to transfer a NAS message to S1AP.
|
*\brief create a S1AP_UPLINK_NAS to transfer a NAS message to S1AP.
|
||||||
@@ -79,9 +78,19 @@ void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(uint8_t mod_id, uint8_t ue_index, UL_
|
|||||||
void rrc_eNB_send_S1AP_NAS_FIRST_REQ(uint8_t Mod_id, uint8_t UE_index,
|
void rrc_eNB_send_S1AP_NAS_FIRST_REQ(uint8_t Mod_id, uint8_t UE_index,
|
||||||
RRCConnectionSetupComplete_r8_IEs_t *rrcConnectionSetupComplete);
|
RRCConnectionSetupComplete_r8_IEs_t *rrcConnectionSetupComplete);
|
||||||
|
|
||||||
|
|
||||||
|
/*! \fn rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(uint8_t Mod_id, uint8_t UE_index, s1ap_Cause_t causeP, long cause_valueP)
|
||||||
|
*\brief create a S1AP_UE_CONTEXT_RELEASE_REQ message, the message is sent by the eNB to S1AP task to request the release of
|
||||||
|
the UE-associated S1-logical connection over the S1 interface. .
|
||||||
|
*\param mod_id Instance ID of eNB.
|
||||||
|
*\param ue_index Instance ID of UE in the eNB.
|
||||||
|
*\param causeP Origin of the cause for the UE removal.
|
||||||
|
*\param cause_valueP Contextual value (in regard of the origin) of the cause.
|
||||||
|
*/
|
||||||
|
void rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ (uint8_t mod_id, uint8_t ue_index, s1ap_Cause_t causeP, long cause_valueP);
|
||||||
|
|
||||||
/* Down link procedures */
|
/* Down link procedures */
|
||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
|
||||||
/*! \fn rrc_eNB_process_S1AP_DOWNLINK_NAS(MessageDef *msg_p, const char *msg_name, instance_t instance, mui_t *rrc_eNB_mui)
|
/*! \fn rrc_eNB_process_S1AP_DOWNLINK_NAS(MessageDef *msg_p, const char *msg_name, instance_t instance, mui_t *rrc_eNB_mui)
|
||||||
*\brief process a S1AP_DOWNLINK_NAS message received from S1AP and transfer the embedded NAS message to UE.
|
*\brief process a S1AP_DOWNLINK_NAS message received from S1AP and transfer the embedded NAS message to UE.
|
||||||
*\param msg_p Message received by RRC.
|
*\param msg_p Message received by RRC.
|
||||||
|
|||||||
Reference in New Issue
Block a user