From 1145a5516c8de8faa83298bc97b41f959d05a8cd Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Mon, 31 May 2021 02:05:38 +0200 Subject: [PATCH] Revert "Change hardcoded task id to TASK_VARIABLE" This reverts commit 64aa42d6468c47a6a68ce02ce1f6e3df93b29406 --- executables/nr-softmodem.c | 4 +-- openair2/F1AP/f1ap_cu_interface_management.c | 4 +-- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 2 +- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 2 +- openair2/RRC/LTE/rrc_eNB.c | 2 +- openair2/RRC/LTE/rrc_eNB_GTPV1U.c | 14 +++++----- openair2/RRC/NR/rrc_gNB.c | 3 +-- openair2/RRC/NR/rrc_gNB_NGAP.c | 8 +----- openair2/SIMULATION/NR_RRC/itti_sim.c | 2 +- openair3/GTPV1-U/gtpv1u_eNB.c | 27 ++++++++++---------- openair3/GTPV1-U/gtpv1u_gNB.c | 15 +++++------ openair3/GTPV1-U/gtpv1u_task.c | 20 +++++++-------- openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c | 6 +++-- targets/COMMON/create_tasks.c | 2 +- targets/COMMON/create_tasks_mbms.c | 2 +- 15 files changed, 53 insertions(+), 60 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 2400e1b744..b803b6e79e 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -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"); return -1; } @@ -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"); return -1; } diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index c147836e9f..5b29a1bcc3 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -324,7 +324,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, for (i=0; icells_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; @@ -569,7 +569,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu for (i=0; inum_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); F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index c4c4e80c23..51d3cfc8f3 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -1012,7 +1012,7 @@ pdcp_data_ind( rb_id + 4, 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); AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY"); memcpy(>pu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset); diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index c325c1239b..7c69b72c2a 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -481,7 +481,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, int offset=0; 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); AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY"); memcpy(>pu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], buf+offset, size-offset); diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 31d39f2934..789dc6ba48 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -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 rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(ctxt_pP, ue_context_p, diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c index 8081747708..a6af6a4163 100644 --- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c +++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c @@ -121,11 +121,11 @@ gtpv_data_req( 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); - 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).enb_flag = ctxt_pP->enb_flag; GTPV1U_ENB_DATA_FORWARDING_IND (message_p).rb_id = rb_idP; @@ -144,11 +144,11 @@ gtpv_data_req( 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); - 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).enb_flag = ctxt_pP->enb_flag; GTPV1U_ENB_END_MARKER_IND (message_p).rb_id = rb_idP; @@ -201,15 +201,15 @@ boolean_t gtpv_data_req_new ( //ue_context_p->ue_context.handover_info->state = HO_END_MARKER; MessageDef *msg; // Configure end marker - msg = itti_alloc_new_message(TASK_VARIABLE, 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); + msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_REQ); + GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + sdu_buffer_sizeP); memcpy(>PV1U_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).rnti = ctxt->rnti; GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = rb_idP; 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); - 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; } diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 652e353d0b..1788ecf0fa 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -88,7 +88,6 @@ #include "executables/softmodem-common.h" #include #include -#include #include "BIT_STRING.h" #include "assertions.h" @@ -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 rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(ctxt_pP, ue_context_p, xid); } else { diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 319b1dc88e..482f228fdb 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -59,12 +59,6 @@ #include "NR_UE-CapabilityRAT-ContainerList.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; /* Value to indicate an invalid UE initial id */ @@ -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 rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(&ctxt, ue_context_p, xid); LOG_I(NR_RRC, "Send PDU Session Release Response \n"); diff --git a/openair2/SIMULATION/NR_RRC/itti_sim.c b/openair2/SIMULATION/NR_RRC/itti_sim.c index 9fb9366885..bb39f53135 100644 --- a/openair2/SIMULATION/NR_RRC/itti_sim.c +++ b/openair2/SIMULATION/NR_RRC/itti_sim.c @@ -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"); return -1; } diff --git a/openair3/GTPV1-U/gtpv1u_eNB.c b/openair3/GTPV1-U/gtpv1u_eNB.c index 8e852fa54c..0fe2741d7b 100644 --- a/openair3/GTPV1-U/gtpv1u_eNB.c +++ b/openair3/GTPV1-U/gtpv1u_eNB.c @@ -52,7 +52,6 @@ #include "gtpv1u_eNB_task.h" #include "rrc_eNB_GTPV1U.h" #include -#include #undef GTP_DUMP_SOCKET @@ -137,7 +136,7 @@ static int gtpv1u_eNB_send_init_udp(const Gtpv1uS1Req *req) { // Create and alloc new message MessageDef *message_p; 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) { return -1; @@ -186,7 +185,7 @@ NwGtpv1uRcT gtpv1u_eNB_send_udp_msg( // Create and alloc new message MessageDef *message_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 defined(LOG_GTPU) && LOG_GTPU > 0 @@ -287,15 +286,15 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( //ue_context_p->ue_context.handover_info->state = HO_END_MARKER; MessageDef *msg; // Configure end marker - msg = itti_alloc_new_message(TASK_VARIABLE, 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); + msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_REQ); + GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len); memcpy(>PV1U_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).rnti = ctxt.rnti; 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; 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; } } @@ -360,8 +359,8 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( if (ue_context_p->ue_context.handover_info->state == HO_COMPLETE) { MessageDef *msg; // Configure target - msg = itti_alloc_new_message(TASK_VARIABLE, 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); + msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_DATA_FORWARDING_REQ); + GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len); memcpy(>PV1U_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).rnti = ctxt.rnti; @@ -379,7 +378,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( LOG_T(GTPU, "\n"); #endif 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; } @@ -586,7 +585,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_ONE_SHOT, timeoutArg, @@ -594,7 +593,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( } else { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_PERIODIC, timeoutArg, @@ -1124,7 +1123,7 @@ int gtpv1u_delete_s1u_tunnel( hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; teid_t teid_eNB = 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).status = 0; hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)>pv1u_ue_data_p); @@ -1288,7 +1287,7 @@ void *gtpv1u_eNB_process_itti_msg(void *notUsed) { instance_t instance; MessageDef *received_message_p = NULL; 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); DevAssert(received_message_p != NULL); instance = ITTI_MSG_DESTINATION_INSTANCE(received_message_p); @@ -1592,7 +1591,7 @@ void *gtpv1u_eNB_task(void *args) { int rc = 0; rc = gtpv1u_eNB_init(); AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); - itti_mark_task_ready(TASK_VARIABLE); + itti_mark_task_ready(TASK_GTPV1_U); MSC_START_USE(); while(1) { diff --git a/openair3/GTPV1-U/gtpv1u_gNB.c b/openair3/GTPV1-U/gtpv1u_gNB.c index 986195b2b5..d3f26aeff1 100644 --- a/openair3/GTPV1-U/gtpv1u_gNB.c +++ b/openair3/GTPV1-U/gtpv1u_gNB.c @@ -27,7 +27,6 @@ */ #include #include -#include #include "mme_config.h" #include "intertask_interface.h" @@ -87,7 +86,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_ONE_SHOT, timeoutArg, @@ -95,7 +94,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( } else { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_PERIODIC, timeoutArg, @@ -303,7 +302,7 @@ void *gtpv1u_gNB_task(void *args) { int rc = 0; rc = gtpv1u_gNB_init(); AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); - itti_mark_task_ready(TASK_VARIABLE); + itti_mark_task_ready(TASK_GTPV1_U); MSC_START_USE(); while(1) { @@ -756,7 +755,7 @@ int gtpv1u_delete_ngu_tunnel( hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; teid_t teid_gNB = 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).status = 0; hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)>pv1u_ue_data_p); @@ -827,7 +826,7 @@ static int gtpv1u_gNB_send_init_udp(const Gtpv1uNGReq *req) { // Create and alloc new message MessageDef *message_p; 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) { return -1; @@ -939,7 +938,7 @@ void *gtpv1u_gNB_process_itti_msg(void *notUsed) { instance_t instance; MessageDef *received_message_p = NULL; 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); DevAssert(received_message_p != NULL); instance = received_message_p->ittiMsgHeader.originInstance; @@ -1008,7 +1007,7 @@ void *nr_gtpv1u_gNB_task(void *args) { int rc = 0; rc = nr_gtpv1u_gNB_init(); AssertFatal(rc == 0, "gtpv1u_gNB_init Failed"); - itti_mark_task_ready(TASK_VARIABLE); + itti_mark_task_ready(TASK_GTPV1_U); MSC_START_USE(); while(1) { diff --git a/openair3/GTPV1-U/gtpv1u_task.c b/openair3/GTPV1-U/gtpv1u_task.c index 235677172d..1339839cf9 100644 --- a/openair3/GTPV1-U/gtpv1u_task.c +++ b/openair3/GTPV1-U/gtpv1u_task.c @@ -162,7 +162,7 @@ NwGtpv1uRcT gtpv1u_send_udp_msg( MessageDef *message_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; @@ -202,7 +202,7 @@ NwGtpv1uRcT gtpv1u_process_stack_req( pUlpApi->apiInfo.recvMsgInfo.teid, ((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) { return -1; @@ -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; - 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.context_teid = create_tunnel_reqP->context_teid; 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) MessageDef *message_p; 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.context_teid = context_teidP; @@ -338,7 +338,7 @@ static int gtpv1u_update_s1u_tunnel(Gtpv1uUpdateTunnelReq *reqP) reqP->context_teid, reqP->sgw_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**)>pv1u_teid2enb_info); @@ -376,7 +376,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_ONE_SHOT, timeoutArg, @@ -384,7 +384,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( } else { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_PERIODIC, timeoutArg, @@ -406,7 +406,7 @@ static NwGtpv1uRcT gtpv1u_stop_timer_wrapper( static void *gtpv1u_thread(void *args) { - itti_mark_task_ready(TASK_VARIABLE); + itti_mark_task_ready(TASK_GTPV1_U); MSC_START_USE(); while(1) { @@ -415,7 +415,7 @@ static void *gtpv1u_thread(void *args) * message is sent to the task. */ 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); @@ -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; - if (itti_create_task(TASK_VARIABLE, >pv1u_thread, NULL) < 0) { + if (itti_create_task(TASK_GTPV1_U, >pv1u_thread, NULL) < 0) { GTPU_ERROR("gtpv1u phtread_create: %s", strerror(errno)); return -1; } diff --git a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c index 7427bbf950..11c41394eb 100644 --- a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c +++ b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "NwTypes.h" #include "NwUtils.h" @@ -642,7 +641,10 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz, * tool, I saw that there were 6 bytes accessed after bufLen in nwGtpv1uCreateAndSendMsg * 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; NW_ASSERT(NW_GTPV1U_OK == rc); diff --git a/targets/COMMON/create_tasks.c b/targets/COMMON/create_tasks.c index d391d47992..3e0d97f60a 100644 --- a/targets/COMMON/create_tasks.c +++ b/targets/COMMON/create_tasks.c @@ -73,7 +73,7 @@ int create_tasks(uint32_t enb_nb) { rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL); 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"); if (is_x2ap_enabled()) { rc = itti_create_task(TASK_X2AP, x2ap_task, NULL); diff --git a/targets/COMMON/create_tasks_mbms.c b/targets/COMMON/create_tasks_mbms.c index 837bb96b5e..579e851ea7 100644 --- a/targets/COMMON/create_tasks_mbms.c +++ b/targets/COMMON/create_tasks_mbms.c @@ -115,7 +115,7 @@ int create_tasks_mbms(uint32_t enb_nb) { // AssertFatal(rc >= 0, "Create task for SCTP failed\n"); rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL); 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"); } ///