Removed GTPU-CREATE-TUNNEL-REQ asynchronous task-> procedure call
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7833 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -142,10 +142,11 @@ gtpv1u_new_data_req(
|
|||||||
uint32_t buf_offsetP
|
uint32_t buf_offsetP
|
||||||
);
|
);
|
||||||
|
|
||||||
static int
|
int
|
||||||
gtpv1u_create_s1u_tunnel(
|
gtpv1u_create_s1u_tunnel(
|
||||||
const instance_t instanceP,
|
const instance_t instanceP,
|
||||||
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP);
|
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP,
|
||||||
|
gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
gtpv1u_delete_s1u_tunnel(
|
gtpv1u_delete_s1u_tunnel(
|
||||||
@@ -658,10 +659,12 @@ gtpv1u_new_data_req(
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static int
|
int
|
||||||
gtpv1u_create_s1u_tunnel(
|
gtpv1u_create_s1u_tunnel(
|
||||||
const instance_t instanceP,
|
const instance_t instanceP,
|
||||||
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP)
|
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP,
|
||||||
|
gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP
|
||||||
|
)
|
||||||
{
|
{
|
||||||
/* Create a new nw-gtpv1-u stack req using API */
|
/* Create a new nw-gtpv1-u stack req using API */
|
||||||
NwGtpv1uUlpApiT stack_req;
|
NwGtpv1uUlpApiT stack_req;
|
||||||
@@ -689,10 +692,9 @@ gtpv1u_create_s1u_tunnel(
|
|||||||
create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->eps_bearer_id[0],
|
create_tunnel_req_pP->num_tunnels, create_tunnel_req_pP->eps_bearer_id[0],
|
||||||
create_tunnel_req_pP->sgw_S1u_teid[0]);
|
create_tunnel_req_pP->sgw_S1u_teid[0]);
|
||||||
|
|
||||||
message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_ENB_CREATE_TUNNEL_RESP);
|
create_tunnel_resp_pP->rnti = create_tunnel_req_pP->rnti;
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).rnti = create_tunnel_req_pP->rnti;
|
create_tunnel_resp_pP->status = 0;
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status = 0;
|
create_tunnel_resp_pP->num_tunnels = 0;
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).num_tunnels = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < create_tunnel_req_pP->num_tunnels; i++) {
|
for (i = 0; i < create_tunnel_req_pP->num_tunnels; i++) {
|
||||||
ip_offset = 0;
|
ip_offset = 0;
|
||||||
@@ -729,10 +731,10 @@ gtpv1u_create_s1u_tunnel(
|
|||||||
|
|
||||||
gtpv1u_ue_data_p->ue_id = create_tunnel_req_pP->rnti;
|
gtpv1u_ue_data_p->ue_id = create_tunnel_req_pP->rnti;
|
||||||
gtpv1u_ue_data_p->instance_id = 0; // TO DO
|
gtpv1u_ue_data_p->instance_id = 0; // TO DO
|
||||||
memcpy(>PV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_addr.buffer,
|
memcpy(&create_tunnel_resp_pP->enb_addr.buffer,
|
||||||
>pv1u_data_g.enb_ip_address_for_S1u_S12_S4_up,
|
>pv1u_data_g.enb_ip_address_for_S1u_S12_S4_up,
|
||||||
sizeof (in_addr_t));
|
sizeof (in_addr_t));
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_addr.length = sizeof (in_addr_t);
|
create_tunnel_resp_pP->enb_addr.length = sizeof (in_addr_t);
|
||||||
|
|
||||||
addrs_length_in_bytes = create_tunnel_req_pP->sgw_addr[i].length / 8;
|
addrs_length_in_bytes = create_tunnel_req_pP->sgw_addr[i].length / 8;
|
||||||
AssertFatal((addrs_length_in_bytes == 4) ||
|
AssertFatal((addrs_length_in_bytes == 4) ||
|
||||||
@@ -755,18 +757,19 @@ gtpv1u_create_s1u_tunnel(
|
|||||||
16);
|
16);
|
||||||
}
|
}
|
||||||
|
|
||||||
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].state = BEARER_IN_CONFIG;
|
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].state = BEARER_IN_CONFIG;
|
||||||
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB = s1u_teid;
|
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB = s1u_teid;
|
||||||
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_sgw = create_tunnel_req_pP->sgw_S1u_teid[i];
|
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB_stack_session = stack_req.apiInfo.createTunnelEndPointInfo.hStackSession;
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = s1u_teid;
|
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_sgw = create_tunnel_req_pP->sgw_S1u_teid[i];
|
||||||
|
create_tunnel_resp_pP->enb_S1u_teid[i] = s1u_teid;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = 0;
|
create_tunnel_resp_pP->enb_S1u_teid[i] = 0;
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status = 0xFF;
|
create_tunnel_resp_pP->status = 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).eps_bearer_id[i] = eps_bearer_id;
|
create_tunnel_resp_pP->eps_bearer_id[i] = eps_bearer_id;
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).num_tunnels += 1;
|
create_tunnel_resp_pP->num_tunnels += 1;
|
||||||
|
|
||||||
//-----------------------
|
//-----------------------
|
||||||
// GTPV1U->PDCP mapping
|
// GTPV1U->PDCP mapping
|
||||||
@@ -781,8 +784,8 @@ gtpv1u_create_s1u_tunnel(
|
|||||||
hash_rc = hashtable_insert(gtpv1u_data_g.teid_mapping, s1u_teid, gtpv1u_teid_data_p);
|
hash_rc = hashtable_insert(gtpv1u_data_g.teid_mapping, s1u_teid, gtpv1u_teid_data_p);
|
||||||
AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting teid mapping in GTPV1U hashtable");
|
AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting teid mapping in GTPV1U hashtable");
|
||||||
} else {
|
} else {
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = 0;
|
create_tunnel_resp_pP->enb_S1u_teid[i] = 0;
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status = 0xFF;
|
create_tunnel_resp_pP->status = 0xFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MSC_LOG_TX_MESSAGE(
|
MSC_LOG_TX_MESSAGE(
|
||||||
@@ -790,13 +793,13 @@ gtpv1u_create_s1u_tunnel(
|
|||||||
MSC_RRC_ENB,
|
MSC_RRC_ENB,
|
||||||
NULL,0,
|
NULL,0,
|
||||||
"0 GTPV1U_ENB_CREATE_TUNNEL_RESP rnti %x teid %x",
|
"0 GTPV1U_ENB_CREATE_TUNNEL_RESP rnti %x teid %x",
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).rnti,
|
create_tunnel_resp_pP->rnti,
|
||||||
s1u_teid);
|
s1u_teid);
|
||||||
|
|
||||||
LOG_D(GTPU, "Tx GTPV1U_ENB_CREATE_TUNNEL_RESP ue rnti %x status %d\n",
|
LOG_D(GTPU, "Tx GTPV1U_ENB_CREATE_TUNNEL_RESP ue rnti %x status %d\n",
|
||||||
create_tunnel_req_pP->rnti,
|
create_tunnel_req_pP->rnti,
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status);
|
create_tunnel_resp_pP->status);
|
||||||
return itti_send_msg_to_task(TASK_RRC_ENB, instanceP, message_p);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -835,9 +838,7 @@ static int gtpv1u_delete_s1u_tunnel(
|
|||||||
LOG_D(GTPU, "gtpv1u_delete_s1u_tunnel erab %u %u\n",
|
LOG_D(GTPU, "gtpv1u_delete_s1u_tunnel erab %u %u\n",
|
||||||
req_pP->eps_bearer_id[erab_index],
|
req_pP->eps_bearer_id[erab_index],
|
||||||
teid_eNB);
|
teid_eNB);
|
||||||
stack_req.apiInfo.createTunnelEndPointInfo.teid = teid_eNB;
|
stack_req.apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle = gtpv1u_ue_data_p->bearers[req_pP->eps_bearer_id[erab_index] - GTPV1U_BEARER_OFFSET].teid_eNB_stack_session;
|
||||||
stack_req.apiInfo.createTunnelEndPointInfo.hUlpSession = 0;
|
|
||||||
stack_req.apiInfo.createTunnelEndPointInfo.hStackSession = 0;
|
|
||||||
|
|
||||||
rc = nwGtpv1uProcessUlpReq(gtpv1u_data_g.gtpv1u_stack, &stack_req);
|
rc = nwGtpv1uProcessUlpReq(gtpv1u_data_g.gtpv1u_stack, &stack_req);
|
||||||
LOG_D(GTPU, ".\n");
|
LOG_D(GTPU, ".\n");
|
||||||
@@ -1016,10 +1017,6 @@ void *gtpv1u_eNB_task(void *args)
|
|||||||
msg_name_p = ITTI_MSG_NAME(received_message_p);
|
msg_name_p = ITTI_MSG_NAME(received_message_p);
|
||||||
|
|
||||||
switch (ITTI_MSG_ID(received_message_p)) {
|
switch (ITTI_MSG_ID(received_message_p)) {
|
||||||
case GTPV1U_ENB_CREATE_TUNNEL_REQ: {
|
|
||||||
gtpv1u_create_s1u_tunnel(instance, &received_message_p->ittiMsg.Gtpv1uCreateTunnelReq);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GTPV1U_ENB_DELETE_TUNNEL_REQ: {
|
case GTPV1U_ENB_DELETE_TUNNEL_REQ: {
|
||||||
gtpv1u_delete_s1u_tunnel(instance, &received_message_p->ittiMsg.Gtpv1uDeleteTunnelReq);
|
gtpv1u_delete_s1u_tunnel(instance, &received_message_p->ittiMsg.Gtpv1uDeleteTunnelReq);
|
||||||
|
|||||||
@@ -65,8 +65,9 @@ typedef struct gtpv1u_teid_data_s {
|
|||||||
|
|
||||||
typedef struct gtpv1u_bearer_s {
|
typedef struct gtpv1u_bearer_s {
|
||||||
/* TEID used in dl and ul */
|
/* TEID used in dl and ul */
|
||||||
teid_t teid_eNB; ///< eNB TEID
|
teid_t teid_eNB; ///< eNB TEID
|
||||||
teid_t teid_sgw; ///< Remote TEID
|
uintptr_t teid_eNB_stack_session; ///< eNB TEID
|
||||||
|
teid_t teid_sgw; ///< Remote TEID
|
||||||
in_addr_t sgw_ip_addr;
|
in_addr_t sgw_ip_addr;
|
||||||
struct in6_addr sgw_ip6_addr;
|
struct in6_addr sgw_ip6_addr;
|
||||||
tcp_udp_port_t port;
|
tcp_udp_port_t port;
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
#ifndef GTPV1U_ENB_TASK_H_
|
#ifndef GTPV1U_ENB_TASK_H_
|
||||||
#define GTPV1U_ENB_TASK_H_
|
#define GTPV1U_ENB_TASK_H_
|
||||||
|
|
||||||
|
#include "messages_types.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
gtpv1u_new_data_req(
|
gtpv1u_new_data_req(
|
||||||
uint8_t enb_id,
|
uint8_t enb_id,
|
||||||
@@ -45,4 +47,11 @@ gtpv1u_new_data_req(
|
|||||||
uint32_t buf_len);
|
uint32_t buf_len);
|
||||||
void *gtpv1u_eNB_task(void *args);
|
void *gtpv1u_eNB_task(void *args);
|
||||||
|
|
||||||
|
int
|
||||||
|
gtpv1u_create_s1u_tunnel(
|
||||||
|
const instance_t instanceP,
|
||||||
|
const gtpv1u_enb_create_tunnel_req_t * const create_tunnel_req_pP,
|
||||||
|
gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP);
|
||||||
|
|
||||||
|
|
||||||
#endif /* GTPV1U_ENB_TASK_H_ */
|
#endif /* GTPV1U_ENB_TASK_H_ */
|
||||||
|
|||||||
@@ -27,8 +27,6 @@
|
|||||||
|
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
MESSAGE_DEF(GTPV1U_ENB_CREATE_TUNNEL_REQ, MESSAGE_PRIORITY_MAX, gtpv1u_enb_create_tunnel_req_t, Gtpv1uCreateTunnelReq)
|
|
||||||
MESSAGE_DEF(GTPV1U_ENB_CREATE_TUNNEL_RESP, MESSAGE_PRIORITY_MAX, gtpv1u_enb_create_tunnel_resp_t, Gtpv1uCreateTunnelResp)
|
|
||||||
MESSAGE_DEF(GTPV1U_ENB_UPDATE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_update_tunnel_req_t, Gtpv1uUpdateTunnelReq)
|
MESSAGE_DEF(GTPV1U_ENB_UPDATE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_update_tunnel_req_t, Gtpv1uUpdateTunnelReq)
|
||||||
MESSAGE_DEF(GTPV1U_ENB_UPDATE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, gtpv1u_enb_update_tunnel_resp_t, Gtpv1uUpdateTunnelResp)
|
MESSAGE_DEF(GTPV1U_ENB_UPDATE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, gtpv1u_enb_update_tunnel_resp_t, Gtpv1uUpdateTunnelResp)
|
||||||
MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_delete_tunnel_req_t, Gtpv1uDeleteTunnelReq)
|
MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_delete_tunnel_req_t, Gtpv1uDeleteTunnelReq)
|
||||||
|
|||||||
@@ -35,8 +35,6 @@
|
|||||||
|
|
||||||
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
|
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
|
||||||
|
|
||||||
#define GTPV1U_ENB_CREATE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uCreateTunnelReq
|
|
||||||
#define GTPV1U_ENB_CREATE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uCreateTunnelResp
|
|
||||||
#define GTPV1U_ENB_UPDATE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelReq
|
#define GTPV1U_ENB_UPDATE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelReq
|
||||||
#define GTPV1U_ENB_UPDATE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelResp
|
#define GTPV1U_ENB_UPDATE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelResp
|
||||||
#define GTPV1U_ENB_DELETE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uDeleteTunnelReq
|
#define GTPV1U_ENB_DELETE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uDeleteTunnelReq
|
||||||
|
|||||||
@@ -4359,16 +4359,6 @@ rrc_enb_task(
|
|||||||
rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance);
|
rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GTPV1U_ENB_CREATE_TUNNEL_RESP:
|
|
||||||
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
|
|
||||||
instance,
|
|
||||||
ENB_FLAG_YES,
|
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_p).rnti,
|
|
||||||
msg_p->ittiMsgHeader.lte_time.frame,
|
|
||||||
msg_p->ittiMsgHeader.lte_time.slot);
|
|
||||||
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(&ctxt, msg_p, msg_name_p);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GTPV1U_ENB_DELETE_TUNNEL_RESP:
|
case GTPV1U_ENB_DELETE_TUNNEL_RESP:
|
||||||
/* Nothing to do. Apparently everything is done in S1AP processing */
|
/* Nothing to do. Apparently everything is done in S1AP processing */
|
||||||
//LOG_I(RRC, "[eNB %d] Received message %s, not processed because procedure not synched\n",
|
//LOG_I(RRC, "[eNB %d] Received message %s, not processed because procedure not synched\n",
|
||||||
|
|||||||
@@ -50,34 +50,32 @@
|
|||||||
int
|
int
|
||||||
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
MessageDef* msg_pP,
|
const gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP
|
||||||
const char* msg_name_pP
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rnti_t rnti;
|
rnti_t rnti;
|
||||||
int i;
|
int i;
|
||||||
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
|
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
|
||||||
|
|
||||||
if (msg_pP) {
|
if (create_tunnel_resp_pP) {
|
||||||
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RX %s num tunnels %u \n",
|
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RX CREATE_TUNNEL_RESP num tunnels %u \n",
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||||
msg_name_pP,
|
create_tunnel_resp_pP->num_tunnels);
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).num_tunnels);
|
|
||||||
|
|
||||||
rnti = GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).rnti;
|
rnti = create_tunnel_resp_pP->rnti;
|
||||||
ue_context_p = rrc_eNB_get_ue_context(
|
ue_context_p = rrc_eNB_get_ue_context(
|
||||||
&eNB_rrc_inst[ctxt_pP->module_id],
|
&eNB_rrc_inst[ctxt_pP->module_id],
|
||||||
ctxt_pP->rnti);
|
ctxt_pP->rnti);
|
||||||
|
|
||||||
for (i = 0; i < GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).num_tunnels; i++) {
|
for (i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) {
|
||||||
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP tunnel %u bearer index %u id %u\n",
|
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP tunnel %u bearer index %u id %u\n",
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).enb_S1u_teid[i],
|
create_tunnel_resp_pP->enb_S1u_teid[i],
|
||||||
i,
|
i,
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).eps_bearer_id[i]);
|
create_tunnel_resp_pP->eps_bearer_id[i]);
|
||||||
ue_context_p->ue_context.enb_gtp_teid[i] = GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).enb_S1u_teid[i];
|
ue_context_p->ue_context.enb_gtp_teid[i] = create_tunnel_resp_pP->enb_S1u_teid[i];
|
||||||
ue_context_p->ue_context.enb_gtp_addrs[i] = GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).enb_addr;
|
ue_context_p->ue_context.enb_gtp_addrs[i] = create_tunnel_resp_pP->enb_addr;
|
||||||
ue_context_p->ue_context.enb_gtp_ebi[i] = GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).eps_bearer_id[i];
|
ue_context_p->ue_context.enb_gtp_ebi[i] = create_tunnel_resp_pP->eps_bearer_id[i];
|
||||||
}
|
}
|
||||||
MSC_LOG_RX_MESSAGE(
|
MSC_LOG_RX_MESSAGE(
|
||||||
MSC_RRC_ENB,
|
MSC_RRC_ENB,
|
||||||
@@ -85,7 +83,7 @@ rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
|||||||
NULL,0,
|
NULL,0,
|
||||||
MSC_AS_TIME_FMT" CREATE_TUNNEL_RESP RNTI %"PRIx16" ntuns %u ebid %u enb-s1u teid %u",
|
MSC_AS_TIME_FMT" CREATE_TUNNEL_RESP RNTI %"PRIx16" ntuns %u ebid %u enb-s1u teid %u",
|
||||||
0,0,rnti,
|
0,0,rnti,
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).num_tunnels,
|
create_tunnel_resp_pP->num_tunnels,
|
||||||
ue_context_p->ue_context.enb_gtp_ebi[0],
|
ue_context_p->ue_context.enb_gtp_ebi[0],
|
||||||
ue_context_p->ue_context.enb_gtp_teid[0]);
|
ue_context_p->ue_context.enb_gtp_teid[0]);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -42,17 +42,15 @@
|
|||||||
|
|
||||||
# if defined(ENABLE_ITTI)
|
# if defined(ENABLE_ITTI)
|
||||||
|
|
||||||
/*! \fn rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t* const ctxt_pP, MessageDef *msg_pP, const char *msg_name_pP)
|
/*! \fn rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t* const ctxt_pP, const gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP)
|
||||||
*\brief Process GTPV1U_ENB_CREATE_TUNNEL_RESP message received from GTPV1U, retrieve the enb teid created.
|
*\brief Process GTPV1U_ENB_CREATE_TUNNEL_RESP message received from GTPV1U, retrieve the enb teid created.
|
||||||
*\param ctxt_pP Running context
|
*\param ctxt_pP Running context
|
||||||
*\param msg_pP Message received by RRC.
|
*\param create_tunnel_resp_pP Message received by RRC.
|
||||||
*\param msg_name_pP Message name.
|
|
||||||
*\return 0 when successful, -1 if the UE index can not be retrieved. */
|
*\return 0 when successful, -1 if the UE index can not be retrieved. */
|
||||||
int
|
int
|
||||||
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
||||||
const protocol_ctxt_t* const ctxt_pP,
|
const protocol_ctxt_t* const ctxt_pP,
|
||||||
MessageDef* msg_pP,
|
const gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP
|
||||||
const char* msg_name_pP
|
|
||||||
);
|
);
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -846,9 +846,11 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char *msg_name, instance_t instance)
|
int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char *msg_name, instance_t instance)
|
||||||
{
|
{
|
||||||
uint16_t ue_initial_id;
|
uint16_t ue_initial_id;
|
||||||
uint32_t eNB_ue_s1ap_id;
|
uint32_t eNB_ue_s1ap_id;
|
||||||
MessageDef *message_gtpv1u_p = NULL;
|
MessageDef *message_gtpv1u_p = NULL;
|
||||||
|
gtpv1u_enb_create_tunnel_req_t create_tunnel_req;
|
||||||
|
gtpv1u_enb_create_tunnel_resp_t create_tunnel_resp;
|
||||||
|
|
||||||
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
|
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
|
||||||
protocol_ctxt_t ctxt;
|
protocol_ctxt_t ctxt;
|
||||||
@@ -880,8 +882,7 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
message_gtpv1u_p = itti_alloc_new_message(TASK_S1AP, GTPV1U_ENB_CREATE_TUNNEL_REQ);
|
memset(&create_tunnel_req, 0 , sizeof(create_tunnel_req));
|
||||||
memset(&message_gtpv1u_p->ittiMsg.Gtpv1uCreateTunnelReq, 0 , sizeof(gtpv1u_enb_create_tunnel_req_t));
|
|
||||||
ue_context_p->ue_context.nb_of_e_rabs = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).nb_of_e_rabs;
|
ue_context_p->ue_context.nb_of_e_rabs = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).nb_of_e_rabs;
|
||||||
|
|
||||||
for (i = 0; i < ue_context_p->ue_context.nb_of_e_rabs; i++) {
|
for (i = 0; i < ue_context_p->ue_context.nb_of_e_rabs; i++) {
|
||||||
@@ -889,18 +890,25 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
|
|||||||
ue_context_p->ue_context.e_rab[i].param = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i];
|
ue_context_p->ue_context.e_rab[i].param = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i];
|
||||||
|
|
||||||
|
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_REQ(message_gtpv1u_p).eps_bearer_id[i] = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].e_rab_id;
|
create_tunnel_req.eps_bearer_id[i] = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].e_rab_id;
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_REQ(message_gtpv1u_p).sgw_S1u_teid[i] = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].gtp_teid;
|
create_tunnel_req.sgw_S1u_teid[i] = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].gtp_teid;
|
||||||
|
|
||||||
memcpy(>PV1U_ENB_CREATE_TUNNEL_REQ(message_gtpv1u_p).sgw_addr[i],
|
memcpy(&create_tunnel_req.sgw_addr[i],
|
||||||
&S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].sgw_addr,
|
&S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].sgw_addr,
|
||||||
sizeof(transport_layer_addr_t));
|
sizeof(transport_layer_addr_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_REQ(message_gtpv1u_p).rnti = ue_context_p->ue_context.rnti; // warning put zero above
|
create_tunnel_req.rnti = ue_context_p->ue_context.rnti; // warning put zero above
|
||||||
GTPV1U_ENB_CREATE_TUNNEL_REQ(message_gtpv1u_p).num_tunnels = i;
|
create_tunnel_req.num_tunnels = i;
|
||||||
|
|
||||||
itti_send_msg_to_task(TASK_GTPV1_U, instance, message_gtpv1u_p);
|
gtpv1u_create_s1u_tunnel(
|
||||||
|
instance,
|
||||||
|
&create_tunnel_req,
|
||||||
|
&create_tunnel_resp);
|
||||||
|
|
||||||
|
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
||||||
|
&ctxt,
|
||||||
|
&create_tunnel_resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO parameters yet to process ... */
|
/* TODO parameters yet to process ... */
|
||||||
|
|||||||
@@ -164,6 +164,10 @@ eNBs =
|
|||||||
pdcp_log_verbosity ="medium";
|
pdcp_log_verbosity ="medium";
|
||||||
rrc_log_level ="info";
|
rrc_log_level ="info";
|
||||||
rrc_log_verbosity ="medium";
|
rrc_log_verbosity ="medium";
|
||||||
|
gtpu_log_level ="info";
|
||||||
|
gtpu_log_verbosity ="medium";
|
||||||
|
udp_log_level ="info";
|
||||||
|
udp_log_verbosity ="medium";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user