diff --git a/CMakeLists.txt b/CMakeLists.txt index 37895b1299..b2be224013 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -636,11 +636,6 @@ add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION w add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE" ON) add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE" ON) -######################## -# Include order -########################## -add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" ON) - ########################## # SCHEDULING/REAL-TIME/PERF options ########################## @@ -701,19 +696,11 @@ include_directories("${OPENAIR_BIN_DIR}") # Legacy exact order include_directories("${OPENAIR_DIR}/executables") -if(ENB_MODE) - include_directories("${OPENAIR2_DIR}/COMMON") - include_directories("${OPENAIR2_DIR}/UTIL") - include_directories("${OPENAIR2_DIR}/UTIL/LOG") - include_directories("${OPENAIR3_DIR}/COMMON") - include_directories("${OPENAIR3_DIR}/UTILS") -else() - include_directories("${OPENAIR3_DIR}/COMMON") - include_directories("${OPENAIR3_DIR}/UTILS") - include_directories("${OPENAIR2_DIR}/COMMON") - include_directories("${OPENAIR2_DIR}/UTIL") - include_directories("${OPENAIR2_DIR}/UTIL/LOG") -endif() +include_directories("${OPENAIR2_DIR}/COMMON") +include_directories("${OPENAIR2_DIR}/UTIL") +include_directories("${OPENAIR2_DIR}/UTIL/LOG") +include_directories("${OPENAIR3_DIR}/COMMON") +include_directories("${OPENAIR3_DIR}/UTILS") include_directories("${NFAPI_DIR}/nfapi/public_inc") include_directories("${NFAPI_DIR}/common/public_inc") include_directories("${NFAPI_DIR}/pnf/public_inc") diff --git a/cmake_targets/at_commands/CMakeLists.txt b/cmake_targets/at_commands/CMakeLists.txt index 9e16576ba9..cda9163c9b 100755 --- a/cmake_targets/at_commands/CMakeLists.txt +++ b/cmake_targets/at_commands/CMakeLists.txt @@ -103,7 +103,6 @@ set (FIRMWARE_VERSION "No svn information") add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"") add_boolean_option(LINUX True "????") -add_boolean_option(ENB_MODE True "????") # to avoid backtrace ########################## # NAS LAYER OPTIONS diff --git a/common/utils/T/check_vcd.c b/common/utils/T/check_vcd.c index 4a21e4d2f5..33ca58f947 100644 --- a/common/utils/T/check_vcd.c +++ b/common/utils/T/check_vcd.c @@ -15,7 +15,6 @@ /* VCD specific defines and includes * If the codebase changes, it may need to be updated */ -#define ENB_MODE #define ENABLE_USE_CPU_EXECUTION_TIME #include "../LOG/vcd_signal_dumper.c" diff --git a/openair2/F1AP/f1ap_common.h b/openair2/F1AP/f1ap_common.h index 2ae6352464..ff492820d7 100644 --- a/openair2/F1AP/f1ap_common.h +++ b/openair2/F1AP/f1ap_common.h @@ -340,6 +340,8 @@ #include "F1AP_Cells-To-Be-Broadcast-Item.h" #include "F1AP_QCI.h" +#include "f1ap_default_values.h" + #include "conversions.h" #include "platform_types.h" #include "common/utils/LOG/log.h" @@ -359,22 +361,13 @@ #include "assertions.h" -#if defined(ENB_MODE) - #include "common/utils/LOG/log.h" - #include "f1ap_default_values.h" - #define F1AP_ERROR(x, args...) LOG_E(F1AP, x, ##args) - #define F1AP_WARN(x, args...) LOG_W(F1AP, x, ##args) - #define F1AP_TRAF(x, args...) LOG_I(F1AP, x, ##args) - #define F1AP_INFO(x, args...) LOG_I(F1AP, x, ##args) - #define F1AP_DEBUG(x, args...) LOG_I(F1AP, x, ##args) -#else - //# include "mme_default_values.h" - #define F1AP_ERROR(x, args...) do { fprintf(stdout, "[F1AP][E]"x, ##args); } while(0) - #define F1AP_WARN(x, args...) do { fprintf(stdout, "[F1AP][W]"x, ##args); } while(0) - #define F1AP_TRAF(x, args...) do { fprintf(stdout, "[F1AP][T]"x, ##args); } while(0) - #define F1AP_INFO(x, args...) do { fprintf(stdout, "[F1AP][I]"x, ##args); } while(0) - #define F1AP_DEBUG(x, args...) do { fprintf(stdout, "[F1AP][D]"x, ##args); } while(0) -#endif +#include "common/utils/LOG/log.h" +#include "f1ap_default_values.h" +#define F1AP_ERROR(x, args...) LOG_E(F1AP, x, ##args) +#define F1AP_WARN(x, args...) LOG_W(F1AP, x, ##args) +#define F1AP_TRAF(x, args...) LOG_I(F1AP, x, ##args) +#define F1AP_INFO(x, args...) LOG_I(F1AP, x, ##args) +#define F1AP_DEBUG(x, args...) LOG_I(F1AP, x, ##args) //Forward declaration #define F1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ diff --git a/openair2/M2AP/m2ap_MCE_defs.h b/openair2/M2AP/m2ap_MCE_defs.h index 73183e89c2..dc8f9ff5ee 100644 --- a/openair2/M2AP/m2ap_MCE_defs.h +++ b/openair2/M2AP/m2ap_MCE_defs.h @@ -33,6 +33,7 @@ #include "sctp_eNB_defs.h" +#include "m2ap_default_values.h" #include "m2ap_ids.h" //looks X2AP specific for HO #include "m2ap_timers.h" diff --git a/openair2/M2AP/m2ap_common.h b/openair2/M2AP/m2ap_common.h index c144c78dcf..7981eaa2a5 100644 --- a/openair2/M2AP/m2ap_common.h +++ b/openair2/M2AP/m2ap_common.h @@ -52,19 +52,12 @@ extern int asn1_xer_print; -#if defined(ENB_MODE) -# include "common/utils/LOG/log.h" -# include "m2ap_default_values.h" -# define M2AP_INFO(x, args...) LOG_I(M2AP, x, ##args) -# define M2AP_ERROR(x, args...) LOG_E(M2AP, x, ##args) -# define M2AP_WARN(x, args...) LOG_W(M2AP, x, ##args) -# define M2AP_DEBUG(x, args...) LOG_D(M2AP, x, ##args) -#else -# define M2AP_INFO(x, args...) do { fprintf(stdout, "[M2AP][I]"x, ##args); } while(0) -# define M2AP_ERROR(x, args...) do { fprintf(stdout, "[M2AP][E]"x, ##args); } while(0) -# define M2AP_WARN(x, args...) do { fprintf(stdout, "[M2AP][W]"x, ##args); } while(0) -# define M2AP_DEBUG(x, args...) do { fprintf(stdout, "[M2AP][D]"x, ##args); } while(0) -#endif +#include "common/utils/LOG/log.h" +#include "m2ap_default_values.h" +#define M2AP_INFO(x, args...) LOG_I(M2AP, x, ##args) +#define M2AP_ERROR(x, args...) LOG_E(M2AP, x, ##args) +#define M2AP_WARN(x, args...) LOG_W(M2AP, x, ##args) +#define M2AP_DEBUG(x, args...) LOG_D(M2AP, x, ##args) #define M2AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ do {\ diff --git a/openair2/M2AP/m2ap_eNB_defs.h b/openair2/M2AP/m2ap_eNB_defs.h index 0b30c33d80..4cc409400e 100644 --- a/openair2/M2AP/m2ap_eNB_defs.h +++ b/openair2/M2AP/m2ap_eNB_defs.h @@ -33,6 +33,7 @@ #include "sctp_eNB_defs.h" +#include "m2ap_default_values.h" #include "m2ap_ids.h" //looks X2AP specific for HO #include "m2ap_timers.h" diff --git a/openair2/X2AP/x2ap_common.h b/openair2/X2AP/x2ap_common.h index e35fd30adf..9535e9fb69 100644 --- a/openair2/X2AP/x2ap_common.h +++ b/openair2/X2AP/x2ap_common.h @@ -49,18 +49,11 @@ extern int asn1_xer_print; -#if defined(ENB_MODE) -# include "common/utils/LOG/log.h" -# define X2AP_INFO(x, args...) LOG_I(X2AP, x, ##args) -# define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args) -# define X2AP_WARN(x, args...) LOG_W(X2AP, x, ##args) -# define X2AP_DEBUG(x, args...) LOG_D(X2AP, x, ##args) -#else -# define X2AP_INFO(x, args...) do { fprintf(stdout, "[X2AP][I]"x, ##args); } while(0) -# define X2AP_ERROR(x, args...) do { fprintf(stdout, "[X2AP][E]"x, ##args); } while(0) -# define X2AP_WARN(x, args...) do { fprintf(stdout, "[X2AP][W]"x, ##args); } while(0) -# define X2AP_DEBUG(x, args...) do { fprintf(stdout, "[X2AP][D]"x, ##args); } while(0) -#endif +#include "common/utils/LOG/log.h" +#define X2AP_INFO(x, args...) LOG_I(X2AP, x, ##args) +#define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args) +#define X2AP_WARN(x, args...) LOG_W(X2AP, x, ##args) +#define X2AP_DEBUG(x, args...) LOG_D(X2AP, x, ##args) #define X2AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ do {\ diff --git a/openair3/M3AP/m3ap_MCE_defs.h b/openair3/M3AP/m3ap_MCE_defs.h index 4dcb2b4db0..c90ba38a66 100644 --- a/openair3/M3AP/m3ap_MCE_defs.h +++ b/openair3/M3AP/m3ap_MCE_defs.h @@ -33,6 +33,7 @@ #include "sctp_eNB_defs.h" +#include "m3ap_default_values.h" #include "m3ap_ids.h" //looks X2AP specific for HO #include "m3ap_timers.h" diff --git a/openair3/M3AP/m3ap_MME_defs.h b/openair3/M3AP/m3ap_MME_defs.h index 6608587cc3..7d3186915f 100644 --- a/openair3/M3AP/m3ap_MME_defs.h +++ b/openair3/M3AP/m3ap_MME_defs.h @@ -33,6 +33,7 @@ #include "sctp_eNB_defs.h" +#include "m3ap_default_values.h" #include "m3ap_ids.h" //looks X2AP specific for HO #include "m3ap_timers.h" diff --git a/openair3/M3AP/m3ap_common.h b/openair3/M3AP/m3ap_common.h index cf2189a243..5d40b29363 100644 --- a/openair3/M3AP/m3ap_common.h +++ b/openair3/M3AP/m3ap_common.h @@ -50,19 +50,12 @@ extern int asn1_xer_print; -#if defined(ENB_MODE) -# include "common/utils/LOG/log.h" -# include "m3ap_default_values.h" -# define M3AP_INFO(x, args...) LOG_I(M3AP, x, ##args) -# define M3AP_ERROR(x, args...) LOG_E(M3AP, x, ##args) -# define M3AP_WARN(x, args...) LOG_W(M3AP, x, ##args) -# define M3AP_DEBUG(x, args...) LOG_D(M3AP, x, ##args) -#else -# define M3AP_INFO(x, args...) do { fprintf(stdout, "[M3AP][I]"x, ##args); } while(0) -# define M3AP_ERROR(x, args...) do { fprintf(stdout, "[M3AP][E]"x, ##args); } while(0) -# define M3AP_WARN(x, args...) do { fprintf(stdout, "[M3AP][W]"x, ##args); } while(0) -# define M3AP_DEBUG(x, args...) do { fprintf(stdout, "[M3AP][D]"x, ##args); } while(0) -#endif +#include "common/utils/LOG/log.h" +#include "m3ap_default_values.h" +#define M3AP_INFO(x, args...) LOG_I(M3AP, x, ##args) +#define M3AP_ERROR(x, args...) LOG_E(M3AP, x, ##args) +#define M3AP_WARN(x, args...) LOG_W(M3AP, x, ##args) +#define M3AP_DEBUG(x, args...) LOG_D(M3AP, x, ##args) #define M3AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ do {\ diff --git a/openair3/NGAP/ngap_common.h b/openair3/NGAP/ngap_common.h index 8de2542766..41f6093c08 100644 --- a/openair3/NGAP/ngap_common.h +++ b/openair3/NGAP/ngap_common.h @@ -96,7 +96,6 @@ extern int asn_debug; extern int asn1_xer_print; -#if defined(ENB_MODE) # include "common/utils/LOG/log.h" # include "ngap_gNB_default_values.h" # define NGAP_ERROR(x, args...) LOG_E(NGAP, x, ##args) @@ -104,14 +103,6 @@ extern int asn1_xer_print; # define NGAP_TRAF(x, args...) LOG_I(NGAP, x, ##args) # define NGAP_INFO(x, args...) LOG_I(NGAP, x, ##args) # define NGAP_DEBUG(x, args...) LOG_I(NGAP, x, ##args) -#else -# include "amf_default_values.h" -# define NGAP_ERROR(x, args...) do { fprintf(stdout, "[NGAP][E]"x, ##args); } while(0) -# define NGAP_WARN(x, args...) do { fprintf(stdout, "[NGAP][W]"x, ##args); } while(0) -# define NGAP_TRAF(x, args...) do { fprintf(stdout, "[NGAP][T]"x, ##args); } while(0) -# define NGAP_INFO(x, args...) do { fprintf(stdout, "[NGAP][I]"x, ##args); } while(0) -# define NGAP_DEBUG(x, args...) do { fprintf(stdout, "[NGAP][D]"x, ##args); } while(0) -#endif #define NGAP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ do { \ diff --git a/openair3/S1AP/s1ap_common.h b/openair3/S1AP/s1ap_common.h index bdfc9b9f6f..65baea44c6 100644 --- a/openair3/S1AP/s1ap_common.h +++ b/openair3/S1AP/s1ap_common.h @@ -52,21 +52,13 @@ extern int asn1_xer_print; -#if defined(ENB_MODE) -# include "common/utils/LOG/log.h" -# include "s1ap_eNB_default_values.h" -# define S1AP_ERROR(x, args...) LOG_E(S1AP, x, ##args) -# define S1AP_WARN(x, args...) LOG_W(S1AP, x, ##args) -# define S1AP_TRAF(x, args...) LOG_I(S1AP, x, ##args) -# define S1AP_INFO(x, args...) LOG_I(S1AP, x, ##args) -# define S1AP_DEBUG(x, args...) LOG_I(S1AP, x, ##args) -#else -# define S1AP_ERROR(x, args...) do { fprintf(stdout, "[S1AP][E]"x, ##args); } while(0) -# define S1AP_WARN(x, args...) do { fprintf(stdout, "[S1AP][W]"x, ##args); } while(0) -# define S1AP_TRAF(x, args...) do { fprintf(stdout, "[S1AP][T]"x, ##args); } while(0) -# define S1AP_INFO(x, args...) do { fprintf(stdout, "[S1AP][I]"x, ##args); } while(0) -# define S1AP_DEBUG(x, args...) do { fprintf(stdout, "[S1AP][D]"x, ##args); } while(0) -#endif +#include "common/utils/LOG/log.h" +#include "s1ap_eNB_default_values.h" +#define S1AP_ERROR(x, args...) LOG_E(S1AP, x, ##args) +#define S1AP_WARN(x, args...) LOG_W(S1AP, x, ##args) +#define S1AP_TRAF(x, args...) LOG_I(S1AP, x, ##args) +#define S1AP_INFO(x, args...) LOG_I(S1AP, x, ##args) +#define S1AP_DEBUG(x, args...) LOG_I(S1AP, x, ##args) #define S1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ diff --git a/openair3/SCTP/sctp_common.h b/openair3/SCTP/sctp_common.h index 024feb8b09..3708ae52a0 100644 --- a/openair3/SCTP/sctp_common.h +++ b/openair3/SCTP/sctp_common.h @@ -34,16 +34,10 @@ #include #include -#if defined(ENB_MODE) -# include "common/utils/LOG/log.h" -# define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args) -# define SCTP_DEBUG(x, args...) LOG_D(SCTP, x, ##args) -# define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args) -#else -# define SCTP_ERROR(x, args...) do { fprintf(stderr, "[SCTP][E]"x, ##args); } while(0) -# define SCTP_DEBUG(x, args...) do { fprintf(stdout, "[SCTP][D]"x, ##args); } while(0) -# define SCTP_WARN(x, args...) do { fprintf(stdout, "[SCTP][W]"x, ##args); } while(0) -#endif +#include "common/utils/LOG/log.h" +#define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args) +#define SCTP_DEBUG(x, args...) LOG_D(SCTP, x, ##args) +#define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args) int sctp_set_init_opt(int sd, uint16_t instreams, uint16_t outstreams, uint16_t max_attempts, uint16_t init_timeout);