diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d9ca49a4a..703acea459 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -420,7 +420,6 @@ add_library(ngap ${NGAP_DIR}/ngap_gNB_pdu_session_management.c ${NGAP_DIR}/ngap_gNB_nnsf.c ${NGAP_DIR}/ngap_gNB_overload.c - ${NGAP_DIR}/ngap_gNB_trace.c ${NGAP_DIR}/ngap_gNB_ue_context.c ${NGAP_DIR}/ngap_gNB_NRPPa_transport_procedures.c ) diff --git a/common/utils/time_meas.h b/common/utils/time_meas.h index 700214b355..10f5308203 100644 --- a/common/utils/time_meas.h +++ b/common/utils/time_meas.h @@ -16,7 +16,7 @@ #include // global var to enable openair performance profiler extern int cpu_meas_enabled; -extern double cpu_freq_GHz __attribute__ ((aligned(32)));; +extern double cpu_freq_GHz __attribute__ ((aligned(32))); // structure to store data to compute cpu measurment #if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__) typedef long long oai_cputime_t; diff --git a/openair2/COMMON/ngap_messages_types.h b/openair2/COMMON/ngap_messages_types.h index ab9115125b..5f25e50644 100644 --- a/openair2/COMMON/ngap_messages_types.h +++ b/openair2/COMMON/ngap_messages_types.h @@ -31,9 +31,6 @@ #define NGAP_UE_CTXT_MODIFICATION_FAIL(mSGpTR) (mSGpTR)->ittiMsg.ngap_ue_ctxt_modification_fail #define NGAP_PDUSESSION_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_setup_resp #define NGAP_PDUSESSION_MODIFY_RESP(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_modify_resp -#define NGAP_PATH_SWITCH_REQ(mSGpTR) (mSGpTR)->ittiMsg.ngap_path_switch_req -#define NGAP_PATH_SWITCH_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.ngap_path_switch_req_ack -#define NGAP_PDUSESSION_MODIFICATION_IND(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_modification_ind #define NGAP_DOWNLINK_NAS(mSGpTR) (mSGpTR)->ittiMsg.ngap_downlink_nas #define NGAP_INITIAL_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.ngap_initial_context_setup_req diff --git a/openair3/NGAP/ngap_gNB.c b/openair3/NGAP/ngap_gNB.c index f193590b96..746a7b1ad8 100644 --- a/openair3/NGAP/ngap_gNB.c +++ b/openair3/NGAP/ngap_gNB.c @@ -527,7 +527,9 @@ int ngap_gNB_handle_ul_ran_status_transfer(instance_t instance, const ngap_ran_s return 0; } -void *ngap_gNB_process_itti_msg(void *notUsed) { +void *ngap_gNB_process_itti_msg(void *notUsed) +{ + UNUSED(notUsed); MessageDef *received_msg = NULL; int result; itti_receive_msg(TASK_NGAP, &received_msg); @@ -657,12 +659,13 @@ void *ngap_gNB_process_itti_msg(void *notUsed) { return NULL; } - -void *ngap_gNB_task(void *arg) { +void *ngap_gNB_task(void *arg) +{ + UNUSED(arg); ngap_gNB_init(); while (1) { - (void) ngap_gNB_process_itti_msg(NULL); + ngap_gNB_process_itti_msg(NULL); } return NULL; @@ -685,7 +688,6 @@ static int ngap_gNB_generate_ng_setup_request( NGAP_SliceSupportItem_t *ssi = NULL; uint8_t *buffer = NULL; uint32_t len = 0; - int ret = 0; DevAssert(instance_p != NULL); DevAssert(ngap_amf_data_p != NULL); ngap_amf_data_p->state = NGAP_GNB_STATE_WAITING; @@ -787,7 +789,7 @@ static int ngap_gNB_generate_ng_setup_request( /* Non UE-Associated signalling -> stream = 0 */ ngap_gNB_itti_send_sctp_data_req(instance_p->instance, ngap_amf_data_p->assoc_id, buffer, len, 0); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); - return ret; + return 0; } diff --git a/openair3/NGAP/ngap_gNB_handlers.c b/openair3/NGAP/ngap_gNB_handlers.c index 78bc0b3de4..17801a7e46 100644 --- a/openair3/NGAP/ngap_gNB_handlers.c +++ b/openair3/NGAP/ngap_gNB_handlers.c @@ -30,7 +30,6 @@ #include "ngap_gNB_nas_procedures.h" #include "ngap_gNB_paging.h" #include "ngap_gNB_NRPPa_transport_procedures.h" -#include "ngap_gNB_trace.h" #include "ngap_gNB_ue_context.h" #include "ngap_messages_types.h" #include "oai_asn1.h" @@ -691,6 +690,7 @@ static int ngap_gNB_handle_error_indication(sctp_assoc_t assoc_id, uint32_t stre * Decode the NGAP message and transfer to RRC */ static int ngap_gNB_handle_handover_request(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) { + UNUSED(stream); DevAssert(pdu != NULL); ngap_gNB_amf_data_t *amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0); @@ -851,6 +851,7 @@ static int ngap_gNB_handle_initial_context_request(sctp_assoc_t assoc_id, uint32 static int ngap_gNB_handle_ue_context_release_command(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) { + UNUSED(stream); ngap_gNB_amf_data_t *amf_desc_p = NULL; MessageDef *message_p = NULL; uint64_t amf_ue_ngap_id; @@ -1368,24 +1369,6 @@ static int ngap_gNB_handle_pdusession_release_command(sctp_assoc_t assoc_id, uin return 0; } -static int ngap_gNB_handle_ng_path_switch_request_ack(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) -{ - // TODO - return 0; -} - -static int ngap_gNB_handle_ng_path_switch_request_failure(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) -{ - // TODO - return 0; -} - -static int ngap_gNB_handle_ng_ENDC_pdusession_modification_confirm(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) -{ - LOG_W(NGAP, "Implementation of NGAP Pdusession Modification confirm handler is pending...\n"); - return 0; -} - static int ngap_gNB_handle_dl_ran_status_transfer(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) { DevAssert(pdu != NULL); @@ -1487,7 +1470,7 @@ const ngap_message_decoded_callback ngap_messages_callback[][3] = { {0, 0, 0}, /* AMFConfigurationUpdate */ {0, 0, 0}, /* AMFStatusIndication */ {0, 0, 0}, /* CellTrafficTrace */ - {ngap_gNB_handle_deactivate_trace, 0, 0}, /* DeactivateTrace */ + {0, 0, 0}, /* DeactivateTrace */ {ngap_gNB_handle_nas_downlink, 0, 0}, /* DownlinkNASTransport */ {ngap_gNB_handle_downlink_non_ue_associated_nrppa_transport, 0, 0}, /* DownlinkNonUEAssociatedNRPPaTransport */ {0, 0, 0}, /* DownlinkRANConfigurationTransfer */ @@ -1509,9 +1492,9 @@ const ngap_message_decoded_callback ngap_messages_callback[][3] = { {0, 0, 0}, /* OverloadStart */ {0, 0, 0}, /* OverloadStop */ {ngap_gNB_handle_paging, 0, 0}, /* Paging */ - {0, ngap_gNB_handle_ng_path_switch_request_ack, ngap_gNB_handle_ng_path_switch_request_failure}, /* PathSwitchRequest */ + {0, 0, 0}, /* PathSwitchRequest */ {ngap_gNB_handle_pdusession_modify_request, 0, 0}, /* PDUSessionResourceModify */ - {0, ngap_gNB_handle_ng_ENDC_pdusession_modification_confirm, 0}, /* PDUSessionResourceModifyIndication */ + {0, 0, 0}, /* PDUSessionResourceModifyIndication */ {ngap_gNB_handle_pdusession_release_command, 0, 0}, /* PDUSessionResourceRelease */ {ngap_gNB_handle_pdusession_setup_request, 0, 0}, /* PDUSessionResourceSetup */ {0, 0, 0}, /* PDUSessionResourceNotify */ @@ -1523,7 +1506,7 @@ const ngap_message_decoded_callback ngap_messages_callback[][3] = { {0, 0, 0}, /* RerouteNASRequest */ {0, 0, 0}, /* RRCInactiveTransitionReport */ {0, 0, 0}, /* TraceFailureIndication */ - {ngap_gNB_handle_trace_start, 0, 0}, /* TraceStart */ + {0, 0, 0}, /* TraceStart */ {0, 0, 0}, /* UEContextModification */ {ngap_gNB_handle_ue_context_release_command, 0, 0}, /* UEContextRelease */ {0, 0, 0}, /* UEContextReleaseRequest */ @@ -1553,7 +1536,7 @@ int ngap_gNB_handle_message(sctp_assoc_t assoc_id, int32_t stream, const uint8_t } /* Checking procedure Code and direction of message */ - if (pdu.choice.initiatingMessage->procedureCode >= sizeof(ngap_messages_callback) / (3 * sizeof(ngap_message_decoded_callback)) || (pdu.present > NGAP_NGAP_PDU_PR_unsuccessfulOutcome)) { + if (pdu.choice.initiatingMessage->procedureCode >= (long)(sizeof(ngap_messages_callback) / (3 * sizeof(ngap_message_decoded_callback))) || (pdu.present > NGAP_NGAP_PDU_PR_unsuccessfulOutcome)) { NGAP_ERROR("[SCTP %u] Either procedureCode %ld or direction %d exceed expected\n", assoc_id, pdu.choice.initiatingMessage->procedureCode, pdu.present); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); return -1; diff --git a/openair3/NGAP/ngap_gNB_overload.c b/openair3/NGAP/ngap_gNB_overload.c index 41955b06e0..42590ea31b 100644 --- a/openair3/NGAP/ngap_gNB_overload.c +++ b/openair3/NGAP/ngap_gNB_overload.c @@ -13,12 +13,6 @@ #include "ngap_gNB_defs.h" #include "ngap_gNB_management_procedures.h" -int ngap_gNB_handle_overload_start(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) -{ - //TODO - return 0; -} - int ngap_gNB_handle_overload_stop(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) { /* We received Overload stop message, meaning that the AMF is no more diff --git a/openair3/NGAP/ngap_gNB_overload.h b/openair3/NGAP/ngap_gNB_overload.h index 9eb9682152..d9083166ee 100644 --- a/openair3/NGAP/ngap_gNB_overload.h +++ b/openair3/NGAP/ngap_gNB_overload.h @@ -14,20 +14,9 @@ #include #include "NGAP_NGAP-PDU.h" -/** - * \brief Handle an overload start message - **/ -// int ngap_gNB_handle_overload_start(gNB_amf_desc_t *gNB_desc_p, -// sctp_queue_item_t *packet_p, -// struct ngap_message_s *message_p); -int ngap_gNB_handle_overload_start(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu); - /** * \brief Handle an overload stop message **/ -// int ngap_gNB_handle_overload_stop(gNB_amf_desc_t *gNB_desc_p, -// sctp_queue_item_t *packet_p, -// struct ngap_message_s *message_p); int ngap_gNB_handle_overload_stop(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu); #endif /* NGAP_GNB_OVERLOAD_H_ */ diff --git a/openair3/NGAP/ngap_gNB_trace.c b/openair3/NGAP/ngap_gNB_trace.c deleted file mode 100644 index 63e164c653..0000000000 --- a/openair3/NGAP/ngap_gNB_trace.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-License-Identifier: LicenseRef-CSSL-1.0 - */ - -/*! - * \brief ngap trace procedures for gNB - */ - -#include "ngap_gNB_trace.h" -#include - -int ngap_gNB_handle_trace_start(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) -{ - //TODO - return 0; -} - -int ngap_gNB_handle_deactivate_trace(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *message_p) -{ - // NGAP_DeactivateTraceIEs_t *deactivate_trace_p; - // - // deactivate_trace_p = &message_p->msg.deactivateTraceIEs; - - return 0; -} diff --git a/openair3/NGAP/ngap_gNB_trace.h b/openair3/NGAP/ngap_gNB_trace.h deleted file mode 100644 index 19319f6c7c..0000000000 --- a/openair3/NGAP/ngap_gNB_trace.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-License-Identifier: LicenseRef-CSSL-1.0 - */ - -/*! - * \brief ngap trace procedures for gNB - */ - -#ifndef NGAP_GNB_TRACE_H_ -#define NGAP_GNB_TRACE_H_ - -#include -#include -#include -#include "NGAP_NGAP-PDU.h" - -int ngap_gNB_handle_trace_start(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu); - -int ngap_gNB_handle_deactivate_trace(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu); - -#endif /* NGAP_GNB_TRACE_H_ */