Commit 1145a551 authored by Roberto Louro Magueta's avatar Roberto Louro Magueta

Revert "Change hardcoded task id to TASK_VARIABLE"

This reverts commit 64aa42d6
parent 64aa42d6
...@@ -370,7 +370,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -370,7 +370,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
} }
if (itti_create_task (TASK_VARIABLE, &nr_gtpv1u_gNB_task, NULL) < 0) { if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n"); LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1; return -1;
} }
...@@ -395,7 +395,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -395,7 +395,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
} }
if (itti_create_task (TASK_VARIABLE, &nr_gtpv1u_gNB_task, NULL) < 0) { if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n"); LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1; return -1;
} }
......
...@@ -324,7 +324,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, ...@@ -324,7 +324,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
for (i=0; i<num_cells_to_activate; i++) { for (i=0; i<num_cells_to_activate; i++) {
LOG_I(F1AP, "(cell %d) mcc = %d, mnc = %d, mnc_digit_length = %d\n", LOG_I(F1AP, "(%d) mcc = %d, mnc = %d, mnc_digit_length = %d\n",
i, f1ap_setup_resp->cells_to_activate[i].mcc, f1ap_setup_resp->cells_to_activate[i].mnc, f1ap_setup_resp->cells_to_activate[i].mnc_digit_length); i, f1ap_setup_resp->cells_to_activate[i].mcc, f1ap_setup_resp->cells_to_activate[i].mnc, f1ap_setup_resp->cells_to_activate[i].mnc_digit_length);
F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies;
...@@ -569,7 +569,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu ...@@ -569,7 +569,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
for (i=0; i<f1ap_gnb_cu_configuration_update->num_cells_to_activate; i++) { for (i=0; i<f1ap_gnb_cu_configuration_update->num_cells_to_activate; i++) {
LOG_I(F1AP, "(cell %d) mcc = %d, mnc = %d, mnc_digit_length = %d\n", LOG_I(F1AP, "(%d) mcc = %d, mnc = %d, mnc_digit_length = %d\n",
i, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length); i, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length);
F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies;
......
...@@ -1012,7 +1012,7 @@ pdcp_data_ind( ...@@ -1012,7 +1012,7 @@ pdcp_data_ind(
rb_id + 4, rb_id + 4,
sdu_buffer_sizeP - payload_offset); sdu_buffer_sizeP - payload_offset);
//LOG_T(PDCP,"Sending to GTPV1U %d bytes\n", sdu_buffer_sizeP - payload_offset); //LOG_T(PDCP,"Sending to GTPV1U %d bytes\n", sdu_buffer_sizeP - payload_offset);
gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_VARIABLE, gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_GTPV1_U,
sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX); sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX);
AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY"); AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY");
memcpy(&gtpu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset); memcpy(&gtpu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset);
......
...@@ -481,7 +481,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, ...@@ -481,7 +481,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
int offset=0; int offset=0;
if (entity->has_sdap == 1 && entity->has_sdapULheader == 1) offset = 1; // this is the offset of the SDAP header in bytes if (entity->has_sdap == 1 && entity->has_sdapULheader == 1) offset = 1; // this is the offset of the SDAP header in bytes
gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_VARIABLE, gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_GTPV1_U,
size + GTPU_HEADER_OVERHEAD_MAX - offset); size + GTPU_HEADER_OVERHEAD_MAX - offset);
AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY"); AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY");
memcpy(&gtpu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], buf+offset, size-offset); memcpy(&gtpu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], buf+offset, size-offset);
......
...@@ -8157,7 +8157,7 @@ rrc_eNB_decode_dcch( ...@@ -8157,7 +8157,7 @@ rrc_eNB_decode_dcch(
} }
} }
itti_send_msg_to_task(TASK_VARIABLE, ctxt_pP->instance, msg_delete_tunnels_p); itti_send_msg_to_task(TASK_GTPV1_U, ctxt_pP->instance, msg_delete_tunnels_p);
//S1AP_E_RAB_RELEASE_RESPONSE //S1AP_E_RAB_RELEASE_RESPONSE
rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(ctxt_pP, rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(ctxt_pP,
ue_context_p, ue_context_p,
......
...@@ -121,11 +121,11 @@ gtpv_data_req( ...@@ -121,11 +121,11 @@ gtpv_data_req(
LOG_I(GTPU,"gtpv_data_req task_id = TASK_DATA_FORWARDING\n"); LOG_I(GTPU,"gtpv_data_req task_id = TASK_DATA_FORWARDING\n");
message_buffer = itti_malloc (TASK_VARIABLE, TASK_DATA_FORWARDING, sdu_sizeP); message_buffer = itti_malloc (TASK_GTPV1_U, TASK_DATA_FORWARDING, sdu_sizeP);
memcpy (message_buffer, buffer_pP, sdu_sizeP); memcpy (message_buffer, buffer_pP, sdu_sizeP);
message_p = itti_alloc_new_message (TASK_VARIABLE, 0, GTPV1U_ENB_DATA_FORWARDING_IND); message_p = itti_alloc_new_message (TASK_GTPV1_U, 0, GTPV1U_ENB_DATA_FORWARDING_IND);
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).frame = ctxt_pP->frame; GTPV1U_ENB_DATA_FORWARDING_IND (message_p).frame = ctxt_pP->frame;
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).enb_flag = ctxt_pP->enb_flag; GTPV1U_ENB_DATA_FORWARDING_IND (message_p).enb_flag = ctxt_pP->enb_flag;
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).rb_id = rb_idP; GTPV1U_ENB_DATA_FORWARDING_IND (message_p).rb_id = rb_idP;
...@@ -144,11 +144,11 @@ gtpv_data_req( ...@@ -144,11 +144,11 @@ gtpv_data_req(
LOG_I(GTPU,"gtpv_data_req task_id = TASK_END_MARKER\n"); LOG_I(GTPU,"gtpv_data_req task_id = TASK_END_MARKER\n");
message_buffer = itti_malloc (TASK_VARIABLE, TASK_END_MARKER, sdu_sizeP); message_buffer = itti_malloc (TASK_GTPV1_U, TASK_END_MARKER, sdu_sizeP);
memcpy (message_buffer, buffer_pP, sdu_sizeP); memcpy (message_buffer, buffer_pP, sdu_sizeP);
message_p = itti_alloc_new_message (TASK_VARIABLE, 0, GTPV1U_ENB_END_MARKER_IND); message_p = itti_alloc_new_message (TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_IND);
GTPV1U_ENB_END_MARKER_IND (message_p).frame = ctxt_pP->frame; GTPV1U_ENB_END_MARKER_IND (message_p).frame = ctxt_pP->frame;
GTPV1U_ENB_END_MARKER_IND (message_p).enb_flag = ctxt_pP->enb_flag; GTPV1U_ENB_END_MARKER_IND (message_p).enb_flag = ctxt_pP->enb_flag;
GTPV1U_ENB_END_MARKER_IND (message_p).rb_id = rb_idP; GTPV1U_ENB_END_MARKER_IND (message_p).rb_id = rb_idP;
...@@ -201,15 +201,15 @@ boolean_t gtpv_data_req_new ( ...@@ -201,15 +201,15 @@ boolean_t gtpv_data_req_new (
//ue_context_p->ue_context.handover_info->state = HO_END_MARKER; //ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
MessageDef *msg; MessageDef *msg;
// Configure end marker // Configure end marker
msg = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_END_MARKER_REQ); msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_REQ);
GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_VARIABLE, TASK_VARIABLE, GTPU_HEADER_OVERHEAD_MAX + sdu_buffer_sizeP); GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + sdu_buffer_sizeP);
memcpy(&GTPV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], sdu_buffer_pP, sdu_buffer_sizeP); memcpy(&GTPV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], sdu_buffer_pP, sdu_buffer_sizeP);
GTPV1U_ENB_END_MARKER_REQ(msg).length = sdu_buffer_sizeP; GTPV1U_ENB_END_MARKER_REQ(msg).length = sdu_buffer_sizeP;
GTPV1U_ENB_END_MARKER_REQ(msg).rnti = ctxt->rnti; GTPV1U_ENB_END_MARKER_REQ(msg).rnti = ctxt->rnti;
GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = rb_idP; GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = rb_idP;
GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX; GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt->frame,ctxt->subframe); LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt->frame,ctxt->subframe);
itti_send_msg_to_task(TASK_VARIABLE, ENB_MODULE_ID_TO_INSTANCE(ctxt->module_id), msg); itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt->module_id), msg);
return NW_GTPV1U_OK; return NW_GTPV1U_OK;
} }
......
...@@ -88,7 +88,6 @@ ...@@ -88,7 +88,6 @@
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include <openair2/RRC/NR/rrc_gNB_UE_context.h> #include <openair2/RRC/NR/rrc_gNB_UE_context.h>
#include <openair2/X2AP/x2ap_eNB.h> #include <openair2/X2AP/x2ap_eNB.h>
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "BIT_STRING.h" #include "BIT_STRING.h"
#include "assertions.h" #include "assertions.h"
...@@ -2271,7 +2270,7 @@ rrc_gNB_decode_dcch( ...@@ -2271,7 +2270,7 @@ rrc_gNB_decode_dcch(
} }
} }
itti_send_msg_to_task(TASK_VARIABLE, ctxt_pP->instance, msg_delete_tunnels_p); itti_send_msg_to_task(TASK_GTPV1_U, ctxt_pP->instance, msg_delete_tunnels_p);
//NGAP_PDUSESSION_RELEASE_RESPONSE //NGAP_PDUSESSION_RELEASE_RESPONSE
rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(ctxt_pP, ue_context_p, xid); rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(ctxt_pP, ue_context_p, xid);
} else { } else {
......
...@@ -59,12 +59,6 @@ ...@@ -59,12 +59,6 @@
#include "NR_UE-CapabilityRAT-ContainerList.h" #include "NR_UE-CapabilityRAT-ContainerList.h"
#include "f1ap_messages_types.h" #include "f1ap_messages_types.h"
#if defined(NEW_GTPU)
#define TASK_VARIABLE OCP_GTPV1_U
#else
#define TASK_VARIABLE TASK_GTPV1_U
#endif
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
/* Value to indicate an invalid UE initial id */ /* Value to indicate an invalid UE initial id */
...@@ -1428,7 +1422,7 @@ rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND( ...@@ -1428,7 +1422,7 @@ rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(
} }
} }
itti_send_msg_to_task(TASK_VARIABLE, instance, msg_delete_tunnels_p); itti_send_msg_to_task(TASK_GTPV1_U, instance, msg_delete_tunnels_p);
//NGAP_PDUSESSION_RELEASE_RESPONSE //NGAP_PDUSESSION_RELEASE_RESPONSE
rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(&ctxt, ue_context_p, xid); rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(&ctxt, ue_context_p, xid);
LOG_I(NR_RRC, "Send PDU Session Release Response \n"); LOG_I(NR_RRC, "Send PDU Session Release Response \n");
......
...@@ -310,7 +310,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -310,7 +310,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
} }
if (itti_create_task (TASK_VARIABLE, &nr_gtpv1u_gNB_task, NULL) < 0) { if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
LOG_E(GTPU, "Create task for GTPV1U failed\n"); LOG_E(GTPU, "Create task for GTPV1U failed\n");
return -1; return -1;
} }
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#include "gtpv1u_eNB_task.h" #include "gtpv1u_eNB_task.h"
#include "rrc_eNB_GTPV1U.h" #include "rrc_eNB_GTPV1U.h"
#include <common/utils/msc/msc.h> #include <common/utils/msc/msc.h>
#include <openair3/ocp-gtpu/gtp_itf.h>
#undef GTP_DUMP_SOCKET #undef GTP_DUMP_SOCKET
...@@ -137,7 +136,7 @@ static int gtpv1u_eNB_send_init_udp(const Gtpv1uS1Req *req) { ...@@ -137,7 +136,7 @@ static int gtpv1u_eNB_send_init_udp(const Gtpv1uS1Req *req) {
// Create and alloc new message // Create and alloc new message
MessageDef *message_p; MessageDef *message_p;
struct in_addr addr= {0}; struct in_addr addr= {0};
message_p = itti_alloc_new_message(TASK_VARIABLE, 0, UDP_INIT); message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_INIT);
if (message_p == NULL) { if (message_p == NULL) {
return -1; return -1;
...@@ -186,7 +185,7 @@ NwGtpv1uRcT gtpv1u_eNB_send_udp_msg( ...@@ -186,7 +185,7 @@ NwGtpv1uRcT gtpv1u_eNB_send_udp_msg(
// Create and alloc new message // Create and alloc new message
MessageDef *message_p = NULL; MessageDef *message_p = NULL;
udp_data_req_t *udp_data_req_p = NULL; udp_data_req_t *udp_data_req_p = NULL;
message_p = itti_alloc_new_message(TASK_VARIABLE, 0, UDP_DATA_REQ); message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_DATA_REQ);
if (message_p) { if (message_p) {
#if defined(LOG_GTPU) && LOG_GTPU > 0 #if defined(LOG_GTPU) && LOG_GTPU > 0
...@@ -287,15 +286,15 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( ...@@ -287,15 +286,15 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
//ue_context_p->ue_context.handover_info->state = HO_END_MARKER; //ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
MessageDef *msg; MessageDef *msg;
// Configure end marker // Configure end marker
msg = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_END_MARKER_REQ); msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_REQ);
GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_VARIABLE, TASK_VARIABLE, GTPU_HEADER_OVERHEAD_MAX + buffer_len); GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len);
memcpy(&GTPV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len); memcpy(&GTPV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len);
GTPV1U_ENB_END_MARKER_REQ(msg).length = buffer_len; GTPV1U_ENB_END_MARKER_REQ(msg).length = buffer_len;
GTPV1U_ENB_END_MARKER_REQ(msg).rnti = ctxt.rnti; GTPV1U_ENB_END_MARKER_REQ(msg).rnti = ctxt.rnti;
GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = gtpv1u_teid_data_p->eps_bearer_id; GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = gtpv1u_teid_data_p->eps_bearer_id;
GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX; GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe); LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe);
itti_send_msg_to_task(TASK_VARIABLE, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg); itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg);
return NW_GTPV1U_OK; return NW_GTPV1U_OK;
} }
} }
...@@ -360,8 +359,8 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( ...@@ -360,8 +359,8 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
if (ue_context_p->ue_context.handover_info->state == HO_COMPLETE) { if (ue_context_p->ue_context.handover_info->state == HO_COMPLETE) {
MessageDef *msg; MessageDef *msg;
// Configure target // Configure target
msg = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_DATA_FORWARDING_REQ); msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_DATA_FORWARDING_REQ);
GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer = itti_malloc(TASK_VARIABLE, TASK_VARIABLE, GTPU_HEADER_OVERHEAD_MAX + buffer_len); GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len);
memcpy(&GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len); memcpy(&GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len);
GTPV1U_ENB_DATA_FORWARDING_REQ(msg).length = buffer_len; GTPV1U_ENB_DATA_FORWARDING_REQ(msg).length = buffer_len;
GTPV1U_ENB_DATA_FORWARDING_REQ(msg).rnti = ctxt.rnti; GTPV1U_ENB_DATA_FORWARDING_REQ(msg).rnti = ctxt.rnti;
...@@ -379,7 +378,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( ...@@ -379,7 +378,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
LOG_T(GTPU, "\n"); LOG_T(GTPU, "\n");
#endif #endif
LOG_I(GTPU, "Send data forwarding to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe); LOG_I(GTPU, "Send data forwarding to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe);
itti_send_msg_to_task(TASK_VARIABLE, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg); itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg);
return NW_GTPV1U_OK; return NW_GTPV1U_OK;
} }
...@@ -586,7 +585,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( ...@@ -586,7 +585,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) {
timer_setup(timeoutSec, timer_setup(timeoutSec,
timeoutUsec, timeoutUsec,
TASK_VARIABLE, TASK_GTPV1_U,
INSTANCE_DEFAULT, INSTANCE_DEFAULT,
TIMER_ONE_SHOT, TIMER_ONE_SHOT,
timeoutArg, timeoutArg,
...@@ -594,7 +593,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( ...@@ -594,7 +593,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
} else { } else {
timer_setup(timeoutSec, timer_setup(timeoutSec,
timeoutUsec, timeoutUsec,
TASK_VARIABLE, TASK_GTPV1_U,
INSTANCE_DEFAULT, INSTANCE_DEFAULT,
TIMER_PERIODIC, TIMER_PERIODIC,
timeoutArg, timeoutArg,
...@@ -1124,7 +1123,7 @@ int gtpv1u_delete_s1u_tunnel( ...@@ -1124,7 +1123,7 @@ int gtpv1u_delete_s1u_tunnel(
hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS;
teid_t teid_eNB = 0; teid_t teid_eNB = 0;
int erab_index = 0; int erab_index = 0;
message_p = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_DELETE_TUNNEL_RESP); message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_DELETE_TUNNEL_RESP);
GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).rnti = req_pP->rnti; GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).rnti = req_pP->rnti;
GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).status = 0; GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).status = 0;
hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)&gtpv1u_ue_data_p); hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)&gtpv1u_ue_data_p);
...@@ -1288,7 +1287,7 @@ void *gtpv1u_eNB_process_itti_msg(void *notUsed) { ...@@ -1288,7 +1287,7 @@ void *gtpv1u_eNB_process_itti_msg(void *notUsed) {
instance_t instance; instance_t instance;
MessageDef *received_message_p = NULL; MessageDef *received_message_p = NULL;
int rc = 0; int rc = 0;
itti_receive_msg(TASK_VARIABLE, &received_message_p); itti_receive_msg(TASK_GTPV1_U, &received_message_p);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN);
DevAssert(received_message_p != NULL); DevAssert(received_message_p != NULL);
instance = ITTI_MSG_DESTINATION_INSTANCE(received_message_p); instance = ITTI_MSG_DESTINATION_INSTANCE(received_message_p);
...@@ -1592,7 +1591,7 @@ void *gtpv1u_eNB_task(void *args) { ...@@ -1592,7 +1591,7 @@ void *gtpv1u_eNB_task(void *args) {
int rc = 0; int rc = 0;
rc = gtpv1u_eNB_init(); rc = gtpv1u_eNB_init();
AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); AssertFatal(rc == 0, "gtpv1u_eNB_init Failed");
itti_mark_task_ready(TASK_VARIABLE); itti_mark_task_ready(TASK_GTPV1_U);
MSC_START_USE(); MSC_START_USE();
while(1) { while(1) {
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "mme_config.h" #include "mme_config.h"
#include "intertask_interface.h" #include "intertask_interface.h"
...@@ -87,7 +86,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( ...@@ -87,7 +86,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) {
timer_setup(timeoutSec, timer_setup(timeoutSec,
timeoutUsec, timeoutUsec,
TASK_VARIABLE, TASK_GTPV1_U,
INSTANCE_DEFAULT, INSTANCE_DEFAULT,
TIMER_ONE_SHOT, TIMER_ONE_SHOT,
timeoutArg, timeoutArg,
...@@ -95,7 +94,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( ...@@ -95,7 +94,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
} else { } else {
timer_setup(timeoutSec, timer_setup(timeoutSec,
timeoutUsec, timeoutUsec,
TASK_VARIABLE, TASK_GTPV1_U,
INSTANCE_DEFAULT, INSTANCE_DEFAULT,
TIMER_PERIODIC, TIMER_PERIODIC,
timeoutArg, timeoutArg,
...@@ -303,7 +302,7 @@ void *gtpv1u_gNB_task(void *args) { ...@@ -303,7 +302,7 @@ void *gtpv1u_gNB_task(void *args) {
int rc = 0; int rc = 0;
rc = gtpv1u_gNB_init(); rc = gtpv1u_gNB_init();
AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); AssertFatal(rc == 0, "gtpv1u_eNB_init Failed");
itti_mark_task_ready(TASK_VARIABLE); itti_mark_task_ready(TASK_GTPV1_U);
MSC_START_USE(); MSC_START_USE();
while(1) { while(1) {
...@@ -756,7 +755,7 @@ int gtpv1u_delete_ngu_tunnel( ...@@ -756,7 +755,7 @@ int gtpv1u_delete_ngu_tunnel(
hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS;
teid_t teid_gNB = 0; teid_t teid_gNB = 0;
int pdusession_index = 0; int pdusession_index = 0;
message_p = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_GNB_DELETE_TUNNEL_RESP); message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_GNB_DELETE_TUNNEL_RESP);
GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).rnti = req_pP->rnti; GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).rnti = req_pP->rnti;
GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).status = 0; GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).status = 0;
hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)&gtpv1u_ue_data_p); hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)&gtpv1u_ue_data_p);
...@@ -827,7 +826,7 @@ static int gtpv1u_gNB_send_init_udp(const Gtpv1uNGReq *req) { ...@@ -827,7 +826,7 @@ static int gtpv1u_gNB_send_init_udp(const Gtpv1uNGReq *req) {
// Create and alloc new message // Create and alloc new message
MessageDef *message_p; MessageDef *message_p;
struct in_addr addr= {0}; struct in_addr addr= {0};
message_p = itti_alloc_new_message(TASK_VARIABLE, 0, UDP_INIT); message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_INIT);
if (message_p == NULL) { if (message_p == NULL) {
return -1; return -1;
...@@ -939,7 +938,7 @@ void *gtpv1u_gNB_process_itti_msg(void *notUsed) { ...@@ -939,7 +938,7 @@ void *gtpv1u_gNB_process_itti_msg(void *notUsed) {
instance_t instance; instance_t instance;
MessageDef *received_message_p = NULL; MessageDef *received_message_p = NULL;
int rc = 0; int rc = 0;
itti_receive_msg(TASK_VARIABLE, &received_message_p); itti_receive_msg(TASK_GTPV1_U, &received_message_p);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN);
DevAssert(received_message_p != NULL); DevAssert(received_message_p != NULL);
instance = received_message_p->ittiMsgHeader.originInstance; instance = received_message_p->ittiMsgHeader.originInstance;
...@@ -1008,7 +1007,7 @@ void *nr_gtpv1u_gNB_task(void *args) { ...@@ -1008,7 +1007,7 @@ void *nr_gtpv1u_gNB_task(void *args) {
int rc = 0; int rc = 0;
rc = nr_gtpv1u_gNB_init(); rc = nr_gtpv1u_gNB_init();
AssertFatal(rc == 0, "gtpv1u_gNB_init Failed"); AssertFatal(rc == 0, "gtpv1u_gNB_init Failed");
itti_mark_task_ready(TASK_VARIABLE); itti_mark_task_ready(TASK_GTPV1_U);
MSC_START_USE(); MSC_START_USE();
while(1) { while(1) {
......
...@@ -162,7 +162,7 @@ NwGtpv1uRcT gtpv1u_send_udp_msg( ...@@ -162,7 +162,7 @@ NwGtpv1uRcT gtpv1u_send_udp_msg(
MessageDef *message_p; MessageDef *message_p;
udp_data_req_t *udp_data_req_p; udp_data_req_t *udp_data_req_p;
message_p = itti_alloc_new_message(TASK_VARIABLE, UDP_DATA_REQ); message_p = itti_alloc_new_message(TASK_GTPV1_U, UDP_DATA_REQ);
udp_data_req_p = &message_p->ittiMsg.udp_data_req; udp_data_req_p = &message_p->ittiMsg.udp_data_req;
...@@ -202,7 +202,7 @@ NwGtpv1uRcT gtpv1u_process_stack_req( ...@@ -202,7 +202,7 @@ NwGtpv1uRcT gtpv1u_process_stack_req(
pUlpApi->apiInfo.recvMsgInfo.teid, pUlpApi->apiInfo.recvMsgInfo.teid,
((NwGtpv1uMsgT*)pUlpApi->apiInfo.recvMsgInfo.hMsg)->msgBufLen); ((NwGtpv1uMsgT*)pUlpApi->apiInfo.recvMsgInfo.hMsg)->msgBufLen);
message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_TUNNEL_DATA_IND); message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_TUNNEL_DATA_IND);
if (message_p == NULL) { if (message_p == NULL) {
return -1; return -1;
...@@ -282,7 +282,7 @@ static int gtpv1u_create_s1u_tunnel(Gtpv1uCreateTunnelReq *create_tunnel_reqP) ...@@ -282,7 +282,7 @@ static int gtpv1u_create_s1u_tunnel(Gtpv1uCreateTunnelReq *create_tunnel_reqP)
// gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[3] = 2; // gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[3] = 2;
message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_CREATE_TUNNEL_RESP); message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_CREATE_TUNNEL_RESP);
message_p->ittiMsg.gtpv1uCreateTunnelResp.S1u_teid = s1u_teid; message_p->ittiMsg.gtpv1uCreateTunnelResp.S1u_teid = s1u_teid;
message_p->ittiMsg.gtpv1uCreateTunnelResp.context_teid = create_tunnel_reqP->context_teid; message_p->ittiMsg.gtpv1uCreateTunnelResp.context_teid = create_tunnel_reqP->context_teid;
message_p->ittiMsg.gtpv1uCreateTunnelResp.eps_bearer_id = create_tunnel_reqP->eps_bearer_id; message_p->ittiMsg.gtpv1uCreateTunnelResp.eps_bearer_id = create_tunnel_reqP->eps_bearer_id;
...@@ -312,7 +312,7 @@ static int gtpv1u_delete_s1u_tunnel(Teid_t context_teidP, Teid_t S1U_teidP) ...@@ -312,7 +312,7 @@ static int gtpv1u_delete_s1u_tunnel(Teid_t context_teidP, Teid_t S1U_teidP)
MessageDef *message_p; MessageDef *message_p;
GTPU_DEBUG("Rx GTPV1U_DELETE_TUNNEL Context %u S1U teid %u\n", context_teidP, S1U_teidP); GTPU_DEBUG("Rx GTPV1U_DELETE_TUNNEL Context %u S1U teid %u\n", context_teidP, S1U_teidP);
message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_DELETE_TUNNEL_RESP); message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_DELETE_TUNNEL_RESP);
message_p->ittiMsg.gtpv1uDeleteTunnelResp.S1u_teid = S1U_teidP; message_p->ittiMsg.gtpv1uDeleteTunnelResp.S1u_teid = S1U_teidP;
message_p->ittiMsg.gtpv1uDeleteTunnelResp.context_teid = context_teidP; message_p->ittiMsg.gtpv1uDeleteTunnelResp.context_teid = context_teidP;
...@@ -338,7 +338,7 @@ static int gtpv1u_update_s1u_tunnel(Gtpv1uUpdateTunnelReq *reqP) ...@@ -338,7 +338,7 @@ static int gtpv1u_update_s1u_tunnel(Gtpv1uUpdateTunnelReq *reqP)
reqP->context_teid, reqP->context_teid,
reqP->sgw_S1u_teid, reqP->sgw_S1u_teid,
reqP->enb_S1u_teid); reqP->enb_S1u_teid);
message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_UPDATE_TUNNEL_RESP); message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_UPDATE_TUNNEL_RESP);
hash_rc = hashtable_get(gtpv1u_sgw_data.S1U_mapping, reqP->sgw_S1u_teid, (void**)&gtpv1u_teid2enb_info); hash_rc = hashtable_get(gtpv1u_sgw_data.S1U_mapping, reqP->sgw_S1u_teid, (void**)&gtpv1u_teid2enb_info);
...@@ -376,7 +376,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( ...@@ -376,7 +376,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) {
timer_setup(timeoutSec, timer_setup(timeoutSec,
timeoutUsec, timeoutUsec,
TASK_VARIABLE, TASK_GTPV1_U,
INSTANCE_DEFAULT, INSTANCE_DEFAULT,
TIMER_ONE_SHOT, TIMER_ONE_SHOT,
timeoutArg, timeoutArg,
...@@ -384,7 +384,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( ...@@ -384,7 +384,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
} else { } else {
timer_setup(timeoutSec, timer_setup(timeoutSec,
timeoutUsec, timeoutUsec,
TASK_VARIABLE, TASK_GTPV1_U,
INSTANCE_DEFAULT, INSTANCE_DEFAULT,
TIMER_PERIODIC, TIMER_PERIODIC,
timeoutArg, timeoutArg,
...@@ -406,7 +406,7 @@ static NwGtpv1uRcT gtpv1u_stop_timer_wrapper( ...@@ -406,7 +406,7 @@ static NwGtpv1uRcT gtpv1u_stop_timer_wrapper(
static void *gtpv1u_thread(void *args) static void *gtpv1u_thread(void *args)
{ {
itti_mark_task_ready(TASK_VARIABLE); itti_mark_task_ready(TASK_GTPV1_U);
MSC_START_USE(); MSC_START_USE();
while(1) { while(1) {
...@@ -415,7 +415,7 @@ static void *gtpv1u_thread(void *args) ...@@ -415,7 +415,7 @@ static void *gtpv1u_thread(void *args)
* message is sent to the task. * message is sent to the task.
*/ */
MessageDef *received_message_p = NULL; MessageDef *received_message_p = NULL;
itti_receive_msg(TASK_VARIABLE, &received_message_p); itti_receive_msg(TASK_GTPV1_U, &received_message_p);
DevAssert(received_message_p != NULL); DevAssert(received_message_p != NULL);
...@@ -474,7 +474,7 @@ int gtpv1u_init(const mme_config_t *mme_config_p) ...@@ -474,7 +474,7 @@ int gtpv1u_init(const mme_config_t *mme_config_p)
gtpv1u_sgw_data.sgw_ip_address_for_S1u_S12_S4_up = mme_config_p->ipv4.sgw_ip_address_for_S1u_S12_S4_up; gtpv1u_sgw_data.sgw_ip_address_for_S1u_S12_S4_up = mme_config_p->ipv4.sgw_ip_address_for_S1u_S12_S4_up;
if (itti_create_task(TASK_VARIABLE, &gtpv1u_thread, NULL) < 0) { if (itti_create_task(TASK_GTPV1_U, &gtpv1u_thread, NULL) < 0) {
GTPU_ERROR("gtpv1u phtread_create: %s", strerror(errno)); GTPU_ERROR("gtpv1u phtread_create: %s", strerror(errno));
return -1; return -1;
} }
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "NwTypes.h" #include "NwTypes.h"
#include "NwUtils.h" #include "NwUtils.h"
...@@ -642,7 +641,10 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz, ...@@ -642,7 +641,10 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
* tool, I saw that there were 6 bytes accessed after bufLen in nwGtpv1uCreateAndSendMsg * tool, I saw that there were 6 bytes accessed after bufLen in nwGtpv1uCreateAndSendMsg
* the value "16" has been chosen arbitrarily, just bigger than 6 * the value "16" has been chosen arbitrarily, just bigger than 6
*/ */
((NwGtpv1uMsgT*)hMsg)->msgBuf = itti_malloc(TASK_VARIABLE, TASK_UDP, bufLen + 16 /* CROUX - dirty +16, to be fixed! */); ((NwGtpv1uMsgT*)hMsg)->msgBuf = itti_malloc(
TASK_GTPV1_U,
TASK_UDP,
bufLen + 16 /* CROUX - dirty +16, to be fixed! */);
((NwGtpv1uMsgT*)hMsg)->msgBufLen = bufLen; ((NwGtpv1uMsgT*)hMsg)->msgBufLen = bufLen;
NW_ASSERT(NW_GTPV1U_OK == rc); NW_ASSERT(NW_GTPV1U_OK == rc);
......
...@@ -73,7 +73,7 @@ int create_tasks(uint32_t enb_nb) { ...@@ -73,7 +73,7 @@ int create_tasks(uint32_t enb_nb) {
rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL); rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for UDP failed\n"); AssertFatal(rc >= 0, "Create task for UDP failed\n");
} }
rc = itti_create_task(TASK_VARIABLE, gtpv1u_eNB_task, NULL); rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n"); AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
if (is_x2ap_enabled()) { if (is_x2ap_enabled()) {
rc = itti_create_task(TASK_X2AP, x2ap_task, NULL); rc = itti_create_task(TASK_X2AP, x2ap_task, NULL);
......
...@@ -115,7 +115,7 @@ int create_tasks_mbms(uint32_t enb_nb) { ...@@ -115,7 +115,7 @@ int create_tasks_mbms(uint32_t enb_nb) {
// AssertFatal(rc >= 0, "Create task for SCTP failed\n"); // AssertFatal(rc >= 0, "Create task for SCTP failed\n");
rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL); rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for UDP failed\n"); AssertFatal(rc >= 0, "Create task for UDP failed\n");
rc = itti_create_task(TASK_VARIABLE, gtpv1u_eNB_task, NULL); rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n"); AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
} }
/// ///
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment