From afcc9aabd854b3b13022a534af9234ffe09216d1 Mon Sep 17 00:00:00 2001 From: bruno mongazon <bruno.mongazon-cazavet@nokia-bell-labs.com> Date: Thu, 11 Jan 2018 16:50:50 +0100 Subject: [PATCH] Fix #582, USER_MODE flag removed --- cmake_targets/CMakeLists.txt | 2 - cmake_targets/epc_test/CMakeLists.template | 1 - .../oaisim_build_oai/CMakeLists.template | 1 - .../oaisim_mme_build_oai/CMakeLists.template | 1 - .../oaisim_noS1_build_oai/CMakeLists.template | 1 - .../s1c_mme_test/CMakeLists.template | 1 - common/utils/itti/itti_types.h | 4 - common/utils/telnetsrv/CMakeLists.txt | 2 +- openair1/PHY/CODING/Makefile.arm | 2 +- openair1/PHY/CODING/TESTBENCH/Makefile | 2 +- openair1/PHY/CODING/crc_byte.c | 7 -- openair1/PHY/CODING/viterbi_lte.c | 6 +- openair1/PHY/INIT/init_top.c | 4 - openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c | 4 - .../lte_dl_bf_channel_estimation.c | 2 - .../lte_dl_channel_estimation.c | 2 - .../lte_dl_channel_estimation_emos.c | 2 - .../lte_dl_mbsfn_channel_estimation.c | 2 - .../PHY/LTE_ESTIMATION/lte_ue_measurements.c | 3 - .../lte_ul_channel_estimation.c | 15 --- openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c | 2 - openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c | 2 - openair1/PHY/LTE_REFSIG/lte_dl_uespec.c | 2 - openair1/PHY/LTE_TRANSPORT/dci.c | 2 - openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c | 8 -- .../PHY/LTE_TRANSPORT/dlsch_demodulation.c | 8 -- openair1/PHY/LTE_TRANSPORT/drs_modulation.c | 15 --- openair1/PHY/LTE_TRANSPORT/edci.c | 2 - openair1/PHY/LTE_TRANSPORT/initial_sync.c | 4 - openair1/PHY/LTE_TRANSPORT/pbch.c | 10 -- openair1/PHY/LTE_TRANSPORT/phich.c | 4 - openair1/PHY/LTE_TRANSPORT/prach.c | 2 - openair1/PHY/LTE_TRANSPORT/srs_modulation.c | 28 ----- openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 9 -- openair1/PHY/MODULATION/ul_7_5_kHz.c | 4 - openair1/PHY/TOOLS/Makefile | 8 +- openair1/PHY/TOOLS/cmult_vv.c | 5 +- openair1/PHY/TOOLS/defs.h | 2 - openair1/PHY/TOOLS/file_output.c | 4 - openair1/PHY/TOOLS/lte_dfts.c | 2 - openair1/PHY/types.h | 4 - openair1/SCHED/extern.h | 34 ------ openair1/SCHED/phy_procedures_lte_ue.c | 2 + .../ETH_TRANSPORT/bypass_session_layer.c | 92 +-------------- openair1/SIMULATION/ETH_TRANSPORT/extern.h | 4 - .../SIMULATION/ETH_TRANSPORT/multicast_link.c | 4 +- openair1/SIMULATION/ETH_TRANSPORT/proto.h | 8 -- openair1/SIMULATION/ETH_TRANSPORT/socket.c | 2 - openair1/SIMULATION/ETH_TRANSPORT/vars.h | 4 - openair1/SIMULATION/LTE_PHY/Makefile | 2 +- openair1/SIMULATION/RF/Makefile | 2 +- openair1/SIMULATION/TOOLS/rangen_double.c | 2 - openair1/SIMULATION/TOOLS/taus.c | 21 ---- openair2/COMMON/openair_defs.h | 43 ------- openair2/COMMON/openair_types.h | 14 --- openair2/COMMON/platform_constants.h | 8 -- openair2/COMMON/platform_types.h | 2 - openair2/COMMON/rtos_header.h | 48 ++------ openair2/LAYER2/MAC/defs.h | 8 -- openair2/LAYER2/MAC/extern.h | 4 - openair2/LAYER2/MAC/main.c | 4 - openair2/LAYER2/MAC/pre_processor.c | 6 - openair2/LAYER2/MAC/ue_procedures.c | 5 - openair2/LAYER2/MAC/vars.h | 3 - openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 7 +- openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c | 8 +- openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c | 2 +- openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h | 4 - openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c | 2 - .../LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c | 8 -- .../LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c | 4 - .../LAYER2/RLC/AM_v9.3.0/rlc_am_structs.h | 2 - .../LAYER2/RLC/AM_v9.3.0/rlc_am_windows.c | 2 - openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c | 4 - openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h | 3 - .../LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c | 2 - .../LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c | 6 - .../LAYER2/RLC/UM_v9.3.0/rlc_um_structs.h | 2 - openair2/LAYER2/RLC/rlc.h | 4 - openair2/LAYER2/RLC/rlc_primitives.h | 6 +- openair2/LAYER2/openair2_proc.c | 52 +-------- openair2/LAYER2/register.c | 40 ------- openair2/NAS/SIMU_CELLULAR/Makefile | 4 +- openair2/PHY_INTERFACE/mac_phy_primitives.c | 9 -- openair2/PHY_INTERFACE/vars.h | 4 - .../L2_INTERFACE/openair_rrc_L2_interface.c | 35 ------ openair2/RRC/LITE/MESSAGES/asn1_msg.c | 46 +------- openair2/RRC/LITE/MESSAGES/asn1_msg.h | 4 - openair2/RRC/LITE/defs.h | 7 -- openair2/RRC/LITE/mesh_top.c | 107 ------------------ openair2/RRC/LITE/rrc_UE.c | 10 -- openair2/RRC/LITE/rrc_common.c | 2 - openair2/RRC/LITE/rrc_eNB.c | 10 +- openair2/RRC/LITE/rrc_rrm_interface.c | 5 - openair2/RRC/LITE/rrc_rrm_interface.h | 12 -- openair2/RRC/LITE/rrm_2_rrc_msg.c | 48 -------- openair2/RRC/LITE/utils.c | 22 ---- openair2/UTIL/LISTS/list2.c | 6 - openair2/UTIL/LOG/log.c | 16 --- openair2/UTIL/LOG/log.h | 25 ---- openair2/UTIL/MATH/random.c | 10 +- openair2/UTIL/MEM/mem_block.c | 4 +- openair2/UTIL/MEM/mem_block.h | 13 --- openair2/UTIL/MEM/mem_mngt.c | 4 - openair2/UTIL/OCG/makefile | 2 +- openair2/UTIL/OMG/makefile | 2 +- openair2/UTIL/OMG/makefile_old | 2 +- openair2/UTIL/OMG/makefile_standalone | 2 +- openair2/UTIL/TRACE/print.h | 11 +- openair2/X2AP/Makefile.inc | 1 - targets/ARCH/EXMIMO/USERSPACE/OCTAVE/Makefile | 2 +- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 10 +- targets/Makefile.common | 1 - targets/PROJECTS/E-MBMS/build_all.bash | 4 +- targets/RT/USER/Makefile | 2 +- targets/RT/USER/Makefile.agilent | 4 +- targets/SIMU/USER/Makefile | 2 +- targets/SIMU/USER/oaisim_functions.c | 4 +- targets/TEST/AT_COMMANDS/Makefile | 2 +- targets/TEST/OAI/case01.py | 8 +- targets/TEST/PACKET_TRACER/Makefile | 2 +- targets/TEST/PDCP/Makefile | 2 +- .../TEST/PDCP/with_rlc/Makefile.data_bearer | 2 +- targets/TEST/RLC_AM_V9.3.0/Makefile | 2 +- targets/TEST/RLC_UM_V9.3.0/Makefile | 2 +- 125 files changed, 69 insertions(+), 1074 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index b24db90edb..f788f95f3c 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -587,7 +587,6 @@ Message("CPU_Affinity flag is ${CPU_AFFINITY}") add_boolean_option(ENABLE_SECURITY True "Enable LTE integrity and ciphering between RRC UE and eNB") add_boolean_option(ENABLE_USE_MME True "eNB connected to MME (INTERFACE S1-C), not standalone eNB") add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO") -add_boolean_option(USER_MODE True "????") add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the default bearer") add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????") @@ -2136,7 +2135,6 @@ get_directory_property(DirDefs COMPILE_DEFINITIONS ) foreach( d ${DirDefs} ) set(module_cc_opt_tmp "${module_cc_opt_tmp} -D${d}") endforeach() -string(REPLACE "-DUSER_MODE" "" module_cc_opt ${module_cc_opt_tmp}) get_directory_property( DirDefs INCLUDE_DIRECTORIES ) foreach( d ${DirDefs} ) set(module_cc_opt "${module_cc_opt} -I${d}") diff --git a/cmake_targets/epc_test/CMakeLists.template b/cmake_targets/epc_test/CMakeLists.template index 76defbc7d7..15fec380e9 100644 --- a/cmake_targets/epc_test/CMakeLists.template +++ b/cmake_targets/epc_test/CMakeLists.template @@ -75,5 +75,4 @@ set ( SECU False ) set ( SMBV False ) set ( TEST_OMG False ) set ( USE_MME "R10" ) -set ( USER_MODE True ) set ( XER_PRINT True ) diff --git a/cmake_targets/oaisim_build_oai/CMakeLists.template b/cmake_targets/oaisim_build_oai/CMakeLists.template index 0a05d68d10..80d2b60500 100644 --- a/cmake_targets/oaisim_build_oai/CMakeLists.template +++ b/cmake_targets/oaisim_build_oai/CMakeLists.template @@ -76,5 +76,4 @@ set ( SPECTRA False ) set ( TEST_OMG False ) set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) set ( USE_MME "R10" ) -set ( USER_MODE True ) set ( XER_PRINT False ) diff --git a/cmake_targets/oaisim_mme_build_oai/CMakeLists.template b/cmake_targets/oaisim_mme_build_oai/CMakeLists.template index 69fa209b16..0a11b8a249 100644 --- a/cmake_targets/oaisim_mme_build_oai/CMakeLists.template +++ b/cmake_targets/oaisim_mme_build_oai/CMakeLists.template @@ -78,6 +78,5 @@ set ( UPDATE_RELEASE_9 True) set ( UPDATE_RELEASE_10 True) set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) set ( USE_MME "R10" ) -set ( USER_MODE True ) set ( XER_PRINT False ) set ( XFORMS False ) diff --git a/cmake_targets/oaisim_noS1_build_oai/CMakeLists.template b/cmake_targets/oaisim_noS1_build_oai/CMakeLists.template index 8e1670ea43..510744cd7b 100644 --- a/cmake_targets/oaisim_noS1_build_oai/CMakeLists.template +++ b/cmake_targets/oaisim_noS1_build_oai/CMakeLists.template @@ -77,7 +77,6 @@ set ( SPECTRA False ) set ( TEST_OMG False ) set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) set ( USE_MME "R10" ) -set ( USER_MODE True ) set ( XER_PRINT False ) set ( DEBUG_PHY False ) set ( DEBUG_PHY_PROC False) diff --git a/cmake_targets/s1c_mme_test/CMakeLists.template b/cmake_targets/s1c_mme_test/CMakeLists.template index 994edf8352..2bbf7bc536 100644 --- a/cmake_targets/s1c_mme_test/CMakeLists.template +++ b/cmake_targets/s1c_mme_test/CMakeLists.template @@ -80,6 +80,5 @@ set ( TEST_S1C_MME True ) set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) set ( USE_MME "R10" ) -set ( USER_MODE True ) set ( XER_PRINT False ) set ( XFORMS False ) diff --git a/common/utils/itti/itti_types.h b/common/utils/itti/itti_types.h index 7f01901712..d07853133b 100644 --- a/common/utils/itti/itti_types.h +++ b/common/utils/itti/itti_types.h @@ -27,11 +27,7 @@ #ifndef _ITTI_TYPES_H_ #define _ITTI_TYPES_H_ -#ifdef USER_MODE #include <stdint.h> -#else -#include <linux/types.h> -#endif #define CHARS_TO_UINT32(c1, c2, c3, c4) (((c4) << 24) | ((c3) << 16) | ((c2) << 8) | (c1)) diff --git a/common/utils/telnetsrv/CMakeLists.txt b/common/utils/telnetsrv/CMakeLists.txt index 51284ad2e8..56c1d70791 100644 --- a/common/utils/telnetsrv/CMakeLists.txt +++ b/common/utils/telnetsrv/CMakeLists.txt @@ -24,7 +24,7 @@ set(OPENAIR_NFAPIINC $ENV{NFAPI_DIR} ) set(CMAKE_INSTALL_PREFIX $ENV{OPENAIR_TARGETS}) -add_definitions (-DRel14 -DCMAKER -DENABLE_FXP -DENABLE_ITTI -DENABLE_NAS_UE_LOGGING -DENABLE_SECURITY -DENABLE_USE_CPU_EXECUTION_TIME -DENABLE_USE_MME -DENABLE_VCD -DENB_AGENT -DENB_MODE -DETHERNET=1 -DEXMIMO_IOT -DJUMBO_FRAME -DLINK_ENB_PDCP_TO_GTPV1U -DLOG_NO_THREAD -DMAC_CONTEXT -DMAX_NUM_CCs=1 -DNAS_BUILT_IN_UE -DNAS_UE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX=2 -DNEW_FFT -DNO_RRM -DNone=1 -DOAI_NW_DRIVER_USE_NETLINK -DOPENAIR1 -DOPENAIR2 -DOPENAIR_LTE -DPC_DSP -DPC_TARGET -DPHYSIM -DPHY_CONTEXT -DPUCCH -DRel10=1 -DS1AP_VERSION=R10 -DTRACE_RLC_MUTEX -DUSER_MODE -DX2AP_VERSION=R11 -DXFORMS -mavx2 -msse4.1 -mssse3) +add_definitions (-DRel14 -DCMAKER -DENABLE_FXP -DENABLE_ITTI -DENABLE_NAS_UE_LOGGING -DENABLE_SECURITY -DENABLE_USE_CPU_EXECUTION_TIME -DENABLE_USE_MME -DENABLE_VCD -DENB_AGENT -DENB_MODE -DETHERNET=1 -DEXMIMO_IOT -DJUMBO_FRAME -DLINK_ENB_PDCP_TO_GTPV1U -DLOG_NO_THREAD -DMAC_CONTEXT -DMAX_NUM_CCs=1 -DNAS_BUILT_IN_UE -DNAS_UE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX=2 -DNEW_FFT -DNO_RRM -DNone=1 -DOAI_NW_DRIVER_USE_NETLINK -DOPENAIR1 -DOPENAIR2 -DOPENAIR_LTE -DPC_DSP -DPC_TARGET -DPHYSIM -DPHY_CONTEXT -DPUCCH -DRel10=1 -DS1AP_VERSION=R10 -DTRACE_RLC_MUTEX -DX2AP_VERSION=R11 -DXFORMS -mavx2 -msse4.1 -mssse3) add_compile_options( -fPIC -march=native -Ofast) include_directories( ./ ${OPENAIR_COMMON_DIR} ${OPENAIR_DIR} ${OPENAIR1_DIR} ${OPENAIR2_DIR} ${OPENAIR2_COMMON_DIR} ${OPENAIR2_DIR}/UTIL/LOG diff --git a/openair1/PHY/CODING/Makefile.arm b/openair1/PHY/CODING/Makefile.arm index 07dbf55909..04598075e3 100644 --- a/openair1/PHY/CODING/Makefile.arm +++ b/openair1/PHY/CODING/Makefile.arm @@ -5,7 +5,7 @@ RATE12CC_SRC = ccoding_byte.c viterbi.c crc_byte.c all: 3gpplte_sse 3gpplte_sse: $(TURBO_SRC) - gcc -O3 -gdwarf-2 -mfloat-abi=hard -mfpu=neon -lm -lgcc -lrt ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DUSER_MODE -DTC_MAIN -DNB_ANTENNAS_RX=1 -o 3gpplte_sse 3gpplte_sse.c -Wall -g -ggdb -DTC_MAIN + gcc -O3 -gdwarf-2 -mfloat-abi=hard -mfpu=neon -lm -lgcc -lrt ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DTC_MAIN -DNB_ANTENNAS_RX=1 -o 3gpplte_sse 3gpplte_sse.c -Wall -g -ggdb -DTC_MAIN diff --git a/openair1/PHY/CODING/TESTBENCH/Makefile b/openair1/PHY/CODING/TESTBENCH/Makefile index a8ddd1fcb5..515775a102 100644 --- a/openair1/PHY/CODING/TESTBENCH/Makefile +++ b/openair1/PHY/CODING/TESTBENCH/Makefile @@ -7,7 +7,7 @@ OPENAIR2_TOP = $(OPENAIR2_DIR) OPENAIR3 = $(OPENAIR3_DIR) -CFLAGS += -DNODE_RG -DUSER_MODE -DPC_TARGET -DNO_UL_REF -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DOPENAIR_LTE -DMAX_NUM_CCs=1 +CFLAGS += -DNODE_RG -DPC_TARGET -DNO_UL_REF -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DOPENAIR_LTE -DMAX_NUM_CCs=1 ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES diff --git a/openair1/PHY/CODING/crc_byte.c b/openair1/PHY/CODING/crc_byte.c index 4f0dcf2196..5ec4fcaaa4 100644 --- a/openair1/PHY/CODING/crc_byte.c +++ b/openair1/PHY/CODING/crc_byte.c @@ -31,13 +31,6 @@ */ -#ifndef USER_MODE -#define __NO_VERSION__ - -#endif - -//#include "PHY/types.h" - #include "defs.h" diff --git a/openair1/PHY/CODING/viterbi_lte.c b/openair1/PHY/CODING/viterbi_lte.c index d112e7c109..5e11cb3453 100644 --- a/openair1/PHY/CODING/viterbi_lte.c +++ b/openair1/PHY/CODING/viterbi_lte.c @@ -28,10 +28,6 @@ date: 21.10.2009 */ -#ifdef USER_MODE -#include <stdio.h> -#endif - #ifndef TEST_DEBUG #include "PHY/defs.h" #include "PHY/extern.h" @@ -126,7 +122,7 @@ void print_shorts(__m128i x,char *s) { } */ -#endif // USER_MODE +#endif // DEBUG_VITERBI diff --git a/openair1/PHY/INIT/init_top.c b/openair1/PHY/INIT/init_top.c index c4d5850501..218beb4faf 100644 --- a/openair1/PHY/INIT/init_top.c +++ b/openair1/PHY/INIT/init_top.c @@ -20,10 +20,6 @@ */ /*!\brief Initilization and reconfiguration routines for LTE PHY */ -#ifndef USER_MODE -#define __NO_VERSION__ -#endif - #include "defs.h" #include "PHY/extern.h" #include "MAC_INTERFACE/extern.h" diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c index cd032e688f..18444076f3 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c @@ -149,10 +149,8 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms, int temp, i, aa, max_pos = 0,ind; int max_val=0; short Re,Im,ncoef; -#ifdef USER_MODE #ifdef DEBUG_PHY char fname[100],vname[100]; -#endif #endif ncoef = 32768 - coef; @@ -187,12 +185,10 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms, 1); break; } -#ifdef USER_MODE #ifdef DEBUG_PHY sprintf(fname,"srs_ch_estimates_time_%d%d.m",ind,aa); sprintf(vname,"srs_time_%d%d",ind,aa); write_output(fname,vname,lte_eNB_srs->srs_ch_estimates_time[aa],frame_parms->ofdm_symbol_size*2,2,1); -#endif #endif } diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c index 8dcf4b1c11..55d2cf6c5c 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c @@ -19,9 +19,7 @@ * contact@openairinterface.org */ -#ifdef USER_MODE #include <string.h> -#endif #include "defs.h" #include "PHY/defs.h" #include "filt16_32.h" diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c index fb935e47a8..a4b29bb25e 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c @@ -19,9 +19,7 @@ * contact@openairinterface.org */ -#ifdef USER_MODE #include <string.h> -#endif #include "defs.h" #include "SCHED/defs.h" #include "PHY/defs.h" diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation_emos.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation_emos.c index a64aa797af..4f1015a0e1 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation_emos.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation_emos.c @@ -19,9 +19,7 @@ * contact@openairinterface.org */ -#ifdef USER_MODE #include <string.h> -#endif #include "defs.h" #include "PHY/defs.h" #include "SCHED/phy_procedures_emos.h" diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c index f298f8738c..17d44b22f8 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c @@ -19,9 +19,7 @@ * contact@openairinterface.org */ -#ifdef USER_MODE #include <string.h> -#endif #include "defs.h" #include "PHY/defs.h" diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c index acda933d38..c4df34638b 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c @@ -38,7 +38,6 @@ int16_t cond_num_threshold = 0; -#ifdef USER_MODE void print_shorts(char *s,short *x) { @@ -57,8 +56,6 @@ void print_ints(char *s,int *x) ); } -#endif - int16_t get_PL(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index) { diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index b495385612..18069f9759 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -91,7 +91,6 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32))); eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 + frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12; -#if defined(USER_MODE) Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints); if (Msc_idx_ptr) @@ -101,26 +100,14 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32))); return(-1); } -#else - uint8_t b; - - for (b=0; b<33; b++) - if (Msc_RS==dftsizes[b]) - Msc_RS_idx = b; - -#endif - // LOG_I(PHY,"subframe %d, Ns %d, l %d, Msc_RS = %d, Msc_RS_idx = %d, u %d, v %d, cyclic_shift %d\n",subframe,Ns,l,Msc_RS, Msc_RS_idx,u,v,cyclic_shift); #ifdef DEBUG_CH -#ifdef USER_MODE - if (Ns==0) write_output("drs_seq0.m","drsseq0",ul_ref_sigs_rx[u][v][Msc_RS_idx],2*Msc_RS,2,1); else write_output("drs_seq1.m","drsseq1",ul_ref_sigs_rx[u][v][Msc_RS_idx],2*Msc_RS,2,1); -#endif #endif @@ -489,12 +476,10 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, 15, 0); -#ifdef USER_MODE #ifdef DEBUG_SRS sprintf(fname,"srs_ch_est%d.m",aa); sprintf(vname,"srs_est%d",aa); write_output(fname,vname,srs_vars->srs_ch_estimates[aa],frame_parms->ofdm_symbol_size,1,1); -#endif #endif } diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c index b715b3ffa2..5bf69578d1 100644 --- a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c +++ b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c @@ -19,10 +19,8 @@ * contact@openairinterface.org */ -#ifdef USER_MODE #include <stdio.h> #include <stdlib.h> -#endif #include "defs.h" #include "PHY/defs.h" diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c b/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c index 445c84623c..35e5fe6aff 100644 --- a/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c +++ b/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c @@ -21,10 +21,8 @@ // 6.10.2.2 MBSFN reference signals Mapping to resource elements -#ifdef USER_MODE #include <stdio.h> #include <stdlib.h> -#endif #include "defs.h" #include "PHY/defs.h" diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c b/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c index ed9ff1f5cd..a7db8fd5aa 100644 --- a/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c +++ b/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c @@ -30,10 +30,8 @@ * \warning */ -#ifdef USER_MODE #include <stdio.h> #include <stdlib.h> -#endif #include "defs.h" #include "PHY/defs.h" diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index 1bea8db59a..b74e05ab1b 100755 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -29,11 +29,9 @@ * \note * \warning */ -#ifdef USER_MODE #include <stdio.h> #include <stdlib.h> #include <string.h> -#endif #include "PHY/defs.h" #include "PHY/extern.h" #include "SCHED/defs.h" diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c index 271de54795..384c633fdc 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c @@ -801,8 +801,6 @@ int dlsch_abstraction_EESM(double* sinr_dB, uint8_t TM, uint32_t rb_alloc[4], ui bler = interp(sinr_eff,&sinr_bler_map[mcs][0][0],&sinr_bler_map[mcs][1][0],table_length[mcs]); -#ifdef USER_MODE // need to be adapted for the emulation in the kernel space - if (uniformrandom() < bler) { LOG_I(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f, TM %d)\n",mcs,sinr_eff,bler, TM); return(1); @@ -810,8 +808,6 @@ int dlsch_abstraction_EESM(double* sinr_dB, uint8_t TM, uint32_t rb_alloc[4], ui LOG_I(OCM,"abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f, TM %d)\n",mcs,sinr_eff,bler, TM); return(1); } - -#endif } int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], uint8_t mcs,uint8_t dl_power_off) @@ -884,8 +880,6 @@ int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], ui bler = interp(sinr_eff,&sinr_bler_map[mcs][0][0],&sinr_bler_map[mcs][1][0],table_length[mcs]); -#ifdef USER_MODE // need to be adapted for the emulation in the kernel space - if (uniformrandom() < bler) { LOG_N(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler); return(0); @@ -893,8 +887,6 @@ int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], ui LOG_I(OCM,"abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler); return(1); } - -#endif } /* diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index f53e83dbaf..1bd0076e14 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -37,11 +37,7 @@ #include "PHY/sse_intrin.h" #include "T.h" -#ifndef USER_MODE -#define NOCYGWIN_STATIC static -#else #define NOCYGWIN_STATIC -#endif /* dynamic shift for LLR computation for TM3/4 * set as command line argument, see lte-softmodem.c @@ -6027,9 +6023,6 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF, //============================================================================================== -#ifdef USER_MODE - - void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid) { unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12; @@ -6119,7 +6112,6 @@ void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,unsigned int *c // printf("log2_maxh = %d\n",ue->pdsch_vars[eNB_id]->log2_maxh); } -#endif #ifdef DEBUG_DLSCH_DEMOD /* diff --git a/openair1/PHY/LTE_TRANSPORT/drs_modulation.c b/openair1/PHY/LTE_TRANSPORT/drs_modulation.c index 2a94d77b8e..a432cde4e4 100644 --- a/openair1/PHY/LTE_TRANSPORT/drs_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/drs_modulation.c @@ -81,7 +81,6 @@ int generate_drs_pusch(PHY_VARS_UE *ue, // cyclic_shift1 = 0; Msc_RS = 12*nb_rb; -#ifdef USER_MODE Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints); if (Msc_idx_ptr) @@ -91,20 +90,6 @@ int generate_drs_pusch(PHY_VARS_UE *ue, return(-1); } -#else - uint8_t b; - - for (b=0; b<33; b++) - if (Msc_RS==dftsizes[b]) - Msc_RS_idx = b; - -#endif -#ifdef DEBUG_DRS - printf("[PHY] drs_modulation: Msc_RS = %d, Msc_RS_idx = %d,cyclic_shift %d, u0 %d, v0 %d, u1 %d, v1 %d,cshift0 %d,cshift1 %d\n",Msc_RS, Msc_RS_idx,cyclic_shift,u0,v0,u1,v1,cyclic_shift0,cyclic_shift1); - -#endif - - for (l = (3 - frame_parms->Ncp),u=u0,v=v0,cyclic_shift=cyclic_shift0; l<frame_parms->symbols_per_tti; l += (7 - frame_parms->Ncp),u=u1,v=v1,cyclic_shift=cyclic_shift1) { diff --git a/openair1/PHY/LTE_TRANSPORT/edci.c b/openair1/PHY/LTE_TRANSPORT/edci.c index 49a60ae9e8..37b1c56349 100755 --- a/openair1/PHY/LTE_TRANSPORT/edci.c +++ b/openair1/PHY/LTE_TRANSPORT/edci.c @@ -29,11 +29,9 @@ * \note * \warning */ -#ifdef USER_MODE #include <stdio.h> #include <stdlib.h> #include <string.h> -#endif #include "PHY/defs.h" #include "PHY/extern.h" #include "SCHED/defs.h" diff --git a/openair1/PHY/LTE_TRANSPORT/initial_sync.c b/openair1/PHY/LTE_TRANSPORT/initial_sync.c index d1880b0c55..918696968b 100644 --- a/openair1/PHY/LTE_TRANSPORT/initial_sync.c +++ b/openair1/PHY/LTE_TRANSPORT/initial_sync.c @@ -237,10 +237,6 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2; ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2; -#ifndef USER_MODE - // one frame delay - ue->proc.proc_rxtx[i].frame_rx ++; -#endif ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx; } #ifdef DEBUG_INITIAL_SYNCH diff --git a/openair1/PHY/LTE_TRANSPORT/pbch.c b/openair1/PHY/LTE_TRANSPORT/pbch.c index e86f225157..4fbaf3f111 100644 --- a/openair1/PHY/LTE_TRANSPORT/pbch.c +++ b/openair1/PHY/LTE_TRANSPORT/pbch.c @@ -258,13 +258,11 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, #endif #ifdef DEBUG_PBCH - #ifdef USER_MODE write_output("pbch_encoded_output2.m","pbch_encoded_out2", pbch_coded_data2, pbch_coded_bits, 1, 4); - #endif //USER_MODE #endif //DEBUG_PBCH */ #ifdef DEBUG_PBCH_ENCODING @@ -286,8 +284,6 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, #ifdef DEBUG_PBCH -#ifdef USER_MODE - if (frame_mod4==0) { write_output("pbch_e.m","pbch_e", eNB_pbch->pbch_e, @@ -298,8 +294,6 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, for (i=0; i<16; i++) printf("e[%d] %d\n",i,eNB_pbch->pbch_e[i]); } - -#endif //USER_MODE #endif //DEBUG_PBCH // scrambling @@ -307,8 +301,6 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, eNB_pbch->pbch_e, pbch_E); #ifdef DEBUG_PBCH -#ifdef USER_MODE - if (frame_mod4==0) { write_output("pbch_e_s.m","pbch_e_s", eNB_pbch->pbch_e, @@ -319,8 +311,6 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, for (i=0; i<16; i++) printf("e_s[%d] %d\n",i,eNB_pbch->pbch_e[i]); } - -#endif //USER_MODE #endif //DEBUG_PBCH } // frame_mod4==0 diff --git a/openair1/PHY/LTE_TRANSPORT/phich.c b/openair1/PHY/LTE_TRANSPORT/phich.c index dd96910549..13d7c44f2f 100644 --- a/openair1/PHY/LTE_TRANSPORT/phich.c +++ b/openair1/PHY/LTE_TRANSPORT/phich.c @@ -38,10 +38,6 @@ #include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/defs.h" -#ifndef USER_MODE -#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h" -#endif - #include "T.h" //#define DEBUG_PHICH 1 diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index 606900677e..56d9ce6d00 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -341,7 +341,6 @@ uint16_t prach_root_sequence_map4[138] = { 1,138,2,137,3,136,4,135,5,134,6,133, 61,78,62,77,63,76,64,75,65,74,66,73,67,72,68,71,69,70 }; -#ifdef USER_MODE void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) { @@ -362,7 +361,6 @@ void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) fclose(fd); } -#endif // This function computes the du void fill_du(uint8_t prach_fmt) diff --git a/openair1/PHY/LTE_TRANSPORT/srs_modulation.c b/openair1/PHY/LTE_TRANSPORT/srs_modulation.c index a360b35ff6..c4c02e6312 100644 --- a/openair1/PHY/LTE_TRANSPORT/srs_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/srs_modulation.c @@ -180,7 +180,6 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms, return(-1); } -#ifdef USER_MODE Msc_idx_ptr = (uint16_t*) bsearch((uint16_t*) &Msc_RS, (uint16_t*) dftsizes, 33, sizeof(uint16_t), compareints); if (Msc_idx_ptr) @@ -190,19 +189,6 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms, return(-1); } -#else //stdlib not availiable in RTAI - - if (Msc_RS==216) - Msc_RS_idx = 12; - else if (Msc_RS==144) - Msc_RS_idx = 9; - else { - LOG_E(PHY,"generate_srs: index for Msc_RS=%d not implemented\n",Msc_RS); - return(-1); - } - -#endif - #ifdef DEBUG_SRS LOG_D(PHY,"generate_srs_tx: Msc_RS = %d, Msc_RS_idx = %d, k0 = %d\n",Msc_RS, Msc_RS_idx,k0); #endif @@ -279,7 +265,6 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms, return(-1); } -#ifdef USER_MODE Msc_idx_ptr = (uint16_t*) bsearch((uint16_t*) &Msc_RS, (uint16_t*) dftsizes, 33, sizeof(uint16_t), compareints); if (Msc_idx_ptr) @@ -289,19 +274,6 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms, return(-1); } -#else //stdlib not availiable in RTAI - - if (Msc_RS==216) - Msc_RS_idx = 12; - else if (Msc_RS==144) - Msc_RS_idx = 9; - else { - LOG_E(PHY,"generate_srs: index for Msc_RS=%d not implemented\n",Msc_RS); - return(-1); - } - -#endif - #ifdef DEBUG_SRS LOG_I(PHY,"generate_srs_rx: Msc_RS = %d, Msc_RS_idx = %d, k0=%d\n",Msc_RS, Msc_RS_idx,k0); #endif diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index f885bf8eb3..dcf94c4826 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -1616,8 +1616,6 @@ int ulsch_abstraction(double* sinr_dB, uint8_t TM, uint8_t mcs,uint16_t nrb, uin } } -#ifdef USER_MODE // need to be adapted for the emulation in the kernel space - if (uniformrandom() < bler) { LOG_I(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler); return(0); @@ -1625,8 +1623,6 @@ int ulsch_abstraction(double* sinr_dB, uint8_t TM, uint8_t mcs,uint16_t nrb, uin LOG_I(OCM,"abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler); return(1); } - -#endif } @@ -1935,8 +1931,6 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb } } -#ifdef USER_MODE // need to be adapted for the emulation in the kernel space - if (uniformrandom() < bler) { printf("abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler); return(0); @@ -1944,9 +1938,6 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb printf("abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler); return(1); } - -#endif - } #endif diff --git a/openair1/PHY/MODULATION/ul_7_5_kHz.c b/openair1/PHY/MODULATION/ul_7_5_kHz.c index f2e43a533e..80efc70c40 100644 --- a/openair1/PHY/MODULATION/ul_7_5_kHz.c +++ b/openair1/PHY/MODULATION/ul_7_5_kHz.c @@ -23,11 +23,7 @@ #include "PHY/extern.h" #include "extern.h" #include "kHz_7_5.h" -#ifdef USER_MODE #include <math.h> -#else -#include "rtai_math.h" -#endif #include "PHY/sse_intrin.h" short conjugate75[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ; diff --git a/openair1/PHY/TOOLS/Makefile b/openair1/PHY/TOOLS/Makefile index eee9d78344..59b6a1e03b 100644 --- a/openair1/PHY/TOOLS/Makefile +++ b/openair1/PHY/TOOLS/Makefile @@ -1,14 +1,14 @@ lte_dfts_sse4: lte_dfts.c - gcc -O2 -msse4.1 -g -ggdb -o lte_dfts_sse4 lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DUSER_MODE -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS + gcc -O2 -msse4.1 -g -ggdb -o lte_dfts_sse4 lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS lte_dfts_avx2: lte_dfts.c - gcc -O2 -mavx2 -g -ggdb -o lte_dfts_avx2 lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DUSER_MODE -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS + gcc -O2 -mavx2 -g -ggdb -o lte_dfts_avx2 lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS lte_dfts_avx2.s: lte_dfts.c - gcc -O2 -mavx2 -S lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DUSER_MODE -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS + gcc -O2 -mavx2 -S lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS lte_dfts_sse4.s: lte_dfts.c - gcc -O2 -msse4.1 -S lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DUSER_MODE -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS + gcc -O2 -msse4.1 -S lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS dft_cycles_avx2: lte_dfts_avx2 ./lte_dfts_avx2 | egrep cycles diff --git a/openair1/PHY/TOOLS/cmult_vv.c b/openair1/PHY/TOOLS/cmult_vv.c index b5b551f008..13facf6907 100644 --- a/openair1/PHY/TOOLS/cmult_vv.c +++ b/openair1/PHY/TOOLS/cmult_vv.c @@ -20,10 +20,7 @@ */ #include "defs.h" -//#include "MAC_INTERFACE/extern.h" -#ifdef USER_MODE #include <stdio.h> -#endif #if defined(__x86_64__) || defined(__i386__) int16_t conjug[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ; @@ -267,4 +264,4 @@ int multadd_cpx_vector(int16_t *x1, _mm_empty(); _m_empty(); return(0); -} \ No newline at end of file +} diff --git a/openair1/PHY/TOOLS/defs.h b/openair1/PHY/TOOLS/defs.h index 41d7c9528a..5e215bfef1 100644 --- a/openair1/PHY/TOOLS/defs.h +++ b/openair1/PHY/TOOLS/defs.h @@ -286,7 +286,6 @@ void bit8_txmux(int32_t length,int32_t offset); void bit8_rxdemux(int32_t length,int32_t offset); -#ifdef USER_MODE /*!\fn int32_t write_output(const char *fname, const char *vname, void *data, int length, int dec, char format); \brief Write output file from signal data @param fname output file name @@ -297,7 +296,6 @@ void bit8_rxdemux(int32_t length,int32_t offset); @param format data format (0 = real 16-bit, 1 = complex 16-bit,2 real 32-bit, 3 complex 32-bit,4 = real 8-bit, 5 = complex 8-bit) */ int32_t write_output(const char *fname, const char *vname, void *data, int length, int dec, char format); -#endif void Zero_Buffer(void *,uint32_t); void Zero_Buffer_nommx(void *buf,uint32_t length); diff --git a/openair1/PHY/TOOLS/file_output.c b/openair1/PHY/TOOLS/file_output.c index 1a4adb04cd..1e0b31a47f 100644 --- a/openair1/PHY/TOOLS/file_output.c +++ b/openair1/PHY/TOOLS/file_output.c @@ -19,8 +19,6 @@ * contact@openairinterface.org */ -#ifdef USER_MODE - #include <string.h> #include <stdio.h> #include <stdlib.h> @@ -180,5 +178,3 @@ int write_output(const char *fname,const char *vname,void *data,int length,int d return 0; } - -#endif // USER_MODE diff --git a/openair1/PHY/TOOLS/lte_dfts.c b/openair1/PHY/TOOLS/lte_dfts.c index dc4708ce6c..e0e171f6bf 100644 --- a/openair1/PHY/TOOLS/lte_dfts.c +++ b/openair1/PHY/TOOLS/lte_dfts.c @@ -19,11 +19,9 @@ * contact@openairinterface.org */ -#ifdef USER_MODE #include <stdio.h> #include <stdlib.h> #include <string.h> -#endif #include <stdint.h> diff --git a/openair1/PHY/types.h b/openair1/PHY/types.h index be8ec7115a..c0a9af388c 100644 --- a/openair1/PHY/types.h +++ b/openair1/PHY/types.h @@ -22,11 +22,7 @@ #ifndef __openair_TYPES_H__ #define __openair_TYPES_H__ -#ifdef USER_MODE #include <stdint.h> -#else -#include <linux/types.h> -#endif #endif /*__openair_TYPES_H__ */ diff --git a/openair1/SCHED/extern.h b/openair1/SCHED/extern.h index 80a815dda7..98d4703be8 100644 --- a/openair1/SCHED/extern.h +++ b/openair1/SCHED/extern.h @@ -24,40 +24,6 @@ #ifndef __SCHED_EXTERN_H__ #define __SCHED_EXTERN_H__ -#ifndef USER_MODE -#define __NO_VERSION__ - - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/module.h> -#include <linux/version.h> -#include <linux/types.h> - -#include <asm/io.h> -#include <asm/bitops.h> - -#include <asm/uaccess.h> -#include <asm/segment.h> -#include <asm/page.h> - - - - -#ifdef RTAI_ENABLED -#include <rtai.h> -//#include <rtai_posix.h> -#include <rtai_fifos.h> -#include <rtai_sched.h> -#include <rtai_sem.h> -//#include "rt_compat.h" - -#else -#include <unistd.h> -#endif - -#endif /* USER_MODE */ - #include "defs.h" //#include "dlc_engine.h" diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 6094f52940..1a1dcc9abd 100644 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -68,6 +68,8 @@ fifo_dump_emos_UE emos_dump_UE; #include "T.h" +#include "PHY/TOOLS/defs.h" + #define DLSCH_RB_ALLOC 0x1fbf // skip DC RB (total 23/25 RBs) #define DLSCH_RB_ALLOC_12 0x0aaa // skip DC RB (total 23/25 RBs) diff --git a/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c b/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c index 01bc8f4901..b3aefbb245 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c +++ b/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c @@ -38,10 +38,8 @@ #include "UTIL/OCG/OCG_extern.h" #include "UTIL/LOG/log.h" -#ifdef USER_MODE -# include "multicast_link.h" -# include "pgm_link.h" -#endif +#include "multicast_link.h" +#include "pgm_link.h" char rx_bufferP[BYPASS_RX_BUFFER_SIZE]; unsigned int num_bytesP = 0; @@ -90,10 +88,8 @@ void init_bypass (void) void bypass_init (tx_handler_t tx_handlerP, rx_handler_t rx_handlerP) { /***************************************************************************/ -#if defined(USER_MODE) multicast_link_start (bypass_rx_handler, oai_emulation.info.multicast_group, oai_emulation.info.multicast_ifname); -#endif //USER_MODE tx_handler = tx_handlerP; rx_handler = rx_handlerP; Master_list_rx=0; @@ -448,35 +444,6 @@ int bypass_rx_data(unsigned int frame, unsigned int last_slot, return bytes_read; } -/******************************************************************************************************/ -#ifndef USER_MODE -int bypass_rx_handler(unsigned int fifo, int rw) -{ - /******************************************************************************************************/ - int bytes_read; - int bytes_processed=0; - int header_bytes; //, elapsed_time; - //printk("[BYPASS] BYPASS_RX_HANDLER IN...\n"); - header_bytes= rtf_get(fifo_bypass_phy_user2kern, rx_bufferP, - sizeof(bypass_proto2multicast_header_t) ); - - if (header_bytes> 0) { - bytes_read = rtf_get(fifo_bypass_phy_user2kern, &rx_bufferP[header_bytes], - ((bypass_proto2multicast_header_t *) (&rx_bufferP[0]))->size); - - // printk("BYTES_READ=%d\n",bytes_read); - if (bytes_read > 0) { - num_bytesP=header_bytes+bytes_read; - emul_low_mutex_var=0; - //printk("BYPASS_PHY SIGNAL MAC_LOW...\n"); - pthread_cond_signal(&emul_low_cond); - } - } - - // } - return 0; -} -#else //USER_MODE /******************************************************************************************************/ void bypass_rx_handler(unsigned int Num_bytes,char *Rx_buffer) { @@ -503,7 +470,6 @@ void bypass_rx_handler(unsigned int Num_bytes,char *Rx_buffer) #endif } } -#endif //USER_MODE /******************************************************************************************************/ void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot, @@ -511,50 +477,12 @@ void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot, { /******************************************************************************************************/ if (Master_list_rx != oai_emulation.info.master_list) { -#ifndef USER_MODE - rtf_put(fifo_mac_bypass, &tt, 1); - /* the Rx window is still opened (Re)signal bypass_phy (emulate MAC signal) */ -#endif bypass_rx_data(frame, last_slot, next_slot, is_master); } else { Master_list_rx = 0; } } -#ifndef USER_MODE -/***************************************************************************/ -int multicast_link_write_sock (int groupP, char *dataP, unsigned int sizeP) -{ - /***************************************************************************/ - int tx_bytes=0; - - pthread_mutex_lock(&Tx_mutex); - - while(!Tx_mutex_var) { - pthread_cond_wait(&Tx_cond,&Tx_mutex); - } - - Tx_mutex_var=0; - N_P=(int)((sizeP-sizeof (bypass_proto2multicast_header_t))/1000)+2; - tx_bytes += rtf_put (fifo_bypass_phy_kern2user, &dataP[tx_bytes], - sizeof (bypass_proto2multicast_header_t)); - - while(tx_bytes<sizeP) { - if(sizeP-tx_bytes<=1000) { - tx_bytes += rtf_put (fifo_bypass_phy_kern2user, &dataP[tx_bytes], - sizeP-tx_bytes); - } else { - tx_bytes += rtf_put (fifo_bypass_phy_kern2user, &dataP[tx_bytes],1000); - } - } - - //RG_tx_mutex_var=0; - pthread_mutex_unlock(&Tx_mutex); - - return tx_bytes; -} -#endif - #if defined(ENABLE_PGM_TRANSPORT) void bypass_tx_nack(unsigned int frame, unsigned int next_slot) { @@ -715,19 +643,3 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int messg->master_id, messg->seq_num); } -#ifndef USER_MODE -/*********************************************************************************************************************/ -int bypass_tx_handler(unsigned int fifo, int rw) -{ - /***************************************************************************/ - if(++N_R==N_P) { - rtf_reset(fifo_bypass_phy_kern2user); - - Tx_mutex_var=1; - N_R=0; - - pthread_cond_signal(&Tx_cond); - } -} -#endif - diff --git a/openair1/SIMULATION/ETH_TRANSPORT/extern.h b/openair1/SIMULATION/ETH_TRANSPORT/extern.h index fafa7009f5..c01b5584e2 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/extern.h +++ b/openair1/SIMULATION/ETH_TRANSPORT/extern.h @@ -31,11 +31,7 @@ #ifndef __BYPASS_SESSION_LAYER_EXTERN_H__ # define __BYPASS_SESSION_LAYER_EXTERN_H__ -#ifndef USER_MODE -#include <rtai_posix.h> -#else #include <pthread.h> -#endif //RTAI_ENABLED extern unsigned char Emulation_status; extern unsigned char emu_tx_status; diff --git a/openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c b/openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c index f32823f3bb..8750be7096 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c +++ b/openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c @@ -54,9 +54,7 @@ #include "socket.h" #include "multicast_link.h" -#ifdef USER_MODE -# include "UTIL/LOG/log.h" -#endif //USER_MODE +#include "UTIL/LOG/log.h" extern unsigned short Master_id; diff --git a/openair1/SIMULATION/ETH_TRANSPORT/proto.h b/openair1/SIMULATION/ETH_TRANSPORT/proto.h index 6a693085c9..25b3265757 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/proto.h +++ b/openair1/SIMULATION/ETH_TRANSPORT/proto.h @@ -39,14 +39,6 @@ int bypass_rx_data(unsigned int frame, unsigned int last_slot, unsigned int next_slot, uint8_t is_master); void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot, unsigned int next_slot, uint8_t is_master); -#ifndef USER_MODE -int multicast_link_write_sock (int groupP, char *dataP, unsigned int sizeP); -int bypass_tx_handler(unsigned int fifo, int rw); -int bypass_rx_handler(unsigned int fifo, int rw); -#else -void bypass_rx_handler(unsigned int Num_bytes,char *Rx_buffer); -#endif - void bypass_tx_data (emu_transport_info_t Type, unsigned int frame, unsigned int next_slot); void emulation_tx_rx(void); diff --git a/openair1/SIMULATION/ETH_TRANSPORT/socket.c b/openair1/SIMULATION/ETH_TRANSPORT/socket.c index e288dcb378..2b28a66170 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/socket.c +++ b/openair1/SIMULATION/ETH_TRANSPORT/socket.c @@ -41,9 +41,7 @@ //#include "openair_defs.h" #include "socket.h" -#ifdef USER_MODE #define msg printf -#endif //------------------------------------------------------------------------------ void socket_setnonblocking (int sockP) diff --git a/openair1/SIMULATION/ETH_TRANSPORT/vars.h b/openair1/SIMULATION/ETH_TRANSPORT/vars.h index 0ec38a8e90..f49678642e 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/vars.h +++ b/openair1/SIMULATION/ETH_TRANSPORT/vars.h @@ -28,11 +28,7 @@ * \email: navid.nikaein@eurecom.fr */ -#ifndef USER_MODE -#include <rtai_posix.h> -#else #include <pthread.h> -#endif #include "defs.h" #ifndef __BYPASS_SESSION_LAYER_VARS_H__ diff --git a/openair1/SIMULATION/LTE_PHY/Makefile b/openair1/SIMULATION/LTE_PHY/Makefile index 713bfba370..d235a01103 100644 --- a/openair1/SIMULATION/LTE_PHY/Makefile +++ b/openair1/SIMULATION/LTE_PHY/Makefile @@ -6,7 +6,7 @@ OPENAIR1_TOP = $(OPENAIR1_DIR) OPENAIR2_TOP = $(OPENAIR2_DIR) OPENAIR3 = $(OPENAIR3_DIR) -CFLAGS += -DMAX_NUM_CCs=1 -Wall -DPHYSIM -DNODE_RG -DUSER_MODE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 -DMALLOC_CHECK_=1 -DENABLE_VCD_FIFO -DLOG_NO_THREAD # -Wno-packed-bitfield-compat +CFLAGS += -DMAX_NUM_CCs=1 -Wall -DPHYSIM -DNODE_RG -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 -DMALLOC_CHECK_=1 -DENABLE_VCD_FIFO -DLOG_NO_THREAD # -Wno-packed-bitfield-compat # enable C99 mode CFLAGS += -std=gnu99 diff --git a/openair1/SIMULATION/RF/Makefile b/openair1/SIMULATION/RF/Makefile index 5b713b1d94..c6c03ad8d5 100644 --- a/openair1/SIMULATION/RF/Makefile +++ b/openair1/SIMULATION/RF/Makefile @@ -1,6 +1,6 @@ include $(OPENAIR_DIR)/common/utils/Makefile.inc OBJS = rf.o ../../PHY/TOOLS/file_output.o ../TOOLS/rangen_double.o -CFLAGS += -DRF_MAIN -DUSER_MODE -DDEBUG_PHY +CFLAGS += -DRF_MAIN -DDEBUG_PHY all: $(OBJS) gcc -o rf $(OBJS) -lm diff --git a/openair1/SIMULATION/TOOLS/rangen_double.c b/openair1/SIMULATION/TOOLS/rangen_double.c index 5168a64ef4..0fc01a8d31 100644 --- a/openair1/SIMULATION/TOOLS/rangen_double.c +++ b/openair1/SIMULATION/TOOLS/rangen_double.c @@ -19,12 +19,10 @@ * contact@openairinterface.org */ -#ifdef USER_MODE #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> -#endif #include "defs.h" diff --git a/openair1/SIMULATION/TOOLS/taus.c b/openair1/SIMULATION/TOOLS/taus.c index a86be23aec..8b5ad7dfaf 100644 --- a/openair1/SIMULATION/TOOLS/taus.c +++ b/openair1/SIMULATION/TOOLS/taus.c @@ -19,13 +19,8 @@ * contact@openairinterface.org */ -#ifdef USER_MODE #include <time.h> #include <stdlib.h> -#else -#include <asm/io.h> -#include <asm/rtai.h> -#endif #ifdef RTAI_ENABLED #include <rtai.h> #include <rtai_sched.h> @@ -55,21 +50,14 @@ unsigned int taus(void) void set_taus_seed(unsigned int seed_init) { -#ifdef USER_MODE struct drand48_data buffer; unsigned long result = 0; -#endif if (seed_init == 0) { s0 = (unsigned int)time(NULL); s1 = (unsigned int)time(NULL); s2 = (unsigned int)time(NULL); } else { -#ifndef USER_MODE - s0 = (unsigned int)0x1e23d852; - s1 = (unsigned int)0x81f38a1c; - s2 = (unsigned int)0xfe1a133e; -#else /* Use reentrant version of rand48 to ensure that no conflicts with other generators occur */ srand48_r((long int)seed_init, &buffer); mrand48_r(&buffer, (long int *)&result); @@ -78,7 +66,6 @@ void set_taus_seed(unsigned int seed_init) s1 = result; mrand48_r(&buffer, (long int *)&result); s2 = result; -#endif } } #endif @@ -87,10 +74,8 @@ void set_taus_seed(unsigned int seed_init) void set_taus_seed(unsigned int seed_init) { -#ifdef USER_MODE struct drand48_data buffer; unsigned long result = 0; -#endif s0 = (unsigned int)0x1e23d852; s1 = (unsigned int)0x81f38a1c; s2 = (unsigned int)0xfe1a133e; @@ -102,11 +87,6 @@ void set_taus_seed(unsigned int seed_init) s1 = (unsigned int)time(NULL); s2 = (unsigned int)time(NULL); } else { -#ifndef USER_MODE - s0 = (unsigned int)0x1e23d852; - s1 = (unsigned int)0x81f38a1c; - s2 = (unsigned int)0xfe1a133e; -#else // Use reentrant version of rand48 to ensure that no conflicts with other generators occur */ srand48_r((long int)seed_init, &buffer); mrand48_r(&buffer, (long int *)&result); @@ -115,7 +95,6 @@ void set_taus_seed(unsigned int seed_init) s1 = result; mrand48_r(&buffer, (long int *)&result); s2 = result; -#endif } } #endif diff --git a/openair2/COMMON/openair_defs.h b/openair2/COMMON/openair_defs.h index 908f8f9813..4d8d50606c 100644 --- a/openair2/COMMON/openair_defs.h +++ b/openair2/COMMON/openair_defs.h @@ -22,12 +22,6 @@ #ifndef __openair_DEFS_H__ #define __openair_DEFS_H__ -#ifndef USER_MODE -#include <linux/kernel.h> -#endif //USER_MODE - - -#ifdef USER_MODE #include <stdio.h> #include <stdlib.h> #if !defined (msg) @@ -49,44 +43,7 @@ #define PAGE_MASK 0xfffff000 #define virt_to_phys(x) (x) -#else // USER_MODE -#include <rtai.h> -#define msg rt_printk - -#ifdef BIGPHYSAREA - -#define bigmalloc(x) (bigphys_malloc(x)) -#define bigmalloc16(x) (bigphys_malloc(x)) - -#define malloc16(x) (bigphys_malloc(x)) -#define free16(y,x) - -#define bigfree(y,x) - -#else // BIGPHYSAREA - -#define bigmalloc(x) (dma_alloc_coherent(pdev[0],(x),&dummy_dma_ptr,0)) -#define bigmalloc16(x) (dma_alloc_coherent(pdev[0],(x),&dummy_dma_ptr,0)) -#define bigfree(y,x) (dma_free_coherent(pdev[0],(x),(void *)(y),dummy_dma_ptr)) -#define malloc16(x) (kmalloc(x,GFP_KERNEL)) -#define free16(y,x) (kfree(y)) - -#endif // BIGPHYSAREA - - -#ifdef CBMIMO1 -#define openair_get_mbox() (*(unsigned int *)mbox) -#else //CBMIMO1 -#define openair_get_mbox() (*(unsigned int *)PHY_vars->mbox>>1) -#endif //CBMIMO1 - - -#endif // USERMODE - -// #define bzero(s,n) (memset((s),0,(n))) - #define cmax(a,b) ((a>b) ? (a) : (b)) #define cmin(a,b) ((a<b) ? (a) : (b)) #endif // /*__openair_DEFS_H__ */ - diff --git a/openair2/COMMON/openair_types.h b/openair2/COMMON/openair_types.h index d28380e752..1ae2a2cefa 100644 --- a/openair2/COMMON/openair_types.h +++ b/openair2/COMMON/openair_types.h @@ -22,18 +22,4 @@ #ifndef __openair_TYPES_H__ #define __openair_TYPES_H__ -//#ifdef USER_MODE -//#include <stdint.h> -//typedef int8_t s8; /* 8 bit signed integer */ -//typedef int16_t s16; /* 16 bit signed integer */ -//typedef int32_t s32; /* 32 bit signed integer */ -//typedef int64_t s64; /* 64 bit signed integer */ - -//typedef uint8_t u8; /* 8 bit unsigned integer */ -//typedef uint16_t u16; /* 16 bit unsigned integer */ -//typedef uint32_t u32; /* 32 bit unsigned integer */ -//typedef uint64_t u64; /* 64 bit unsigned integer */ -//#else -//#include <linux/types.h> -//#endif #endif /*__openair_TYPES_H__ */ diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h index 533c5eaa2b..f4004bdbf9 100644 --- a/openair2/COMMON/platform_constants.h +++ b/openair2/COMMON/platform_constants.h @@ -43,7 +43,6 @@ #define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/ #endif -#ifdef USER_MODE #ifdef LARGE_SCALE # define NB_MODULES_MAX 128 # define NB_NODE_MAX 128 @@ -51,11 +50,6 @@ # define NB_MODULES_MAX 32 # define NB_NODE_MAX 32 #endif -#else -# define NB_MODULES_MAX 1 -# define NB_NODE_MAX 1 -#endif //PHY_EMUL - #ifdef JUMBO_FRAME # define MAX_IP_PACKET_SIZE 10000 // 9000 @@ -132,9 +126,7 @@ #define UNUSED_PARAM_MBMS_SESSION_ID 0 #define UNUSED_PARAM_MBMS_SERVICE_ID 0 -#ifdef USER_MODE #define printk printf -#endif #define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE) diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h index 3997d579bd..c0ee976fdd 100644 --- a/openair2/COMMON/platform_types.h +++ b/openair2/COMMON/platform_types.h @@ -30,9 +30,7 @@ #ifndef __PLATFORM_TYPES_H__ # define __PLATFORM_TYPES_H__ -#ifdef USER_MODE #include <stdint.h> -#endif #if defined(ENABLE_ITTI) #include "itti_types.h" diff --git a/openair2/COMMON/rtos_header.h b/openair2/COMMON/rtos_header.h index 63bc57d942..2ba3534d7e 100644 --- a/openair2/COMMON/rtos_header.h +++ b/openair2/COMMON/rtos_header.h @@ -21,44 +21,12 @@ #ifndef _RTOS_HEADER_H_ # define _RTOS_HEADER_H_ -# if defined(RTAI) && !defined(USER_MODE) -// CONVERSION BETWEEN POSIX PTHREAD AND RTAI FUNCTIONS -/* -# define pthread_mutex_init pthread_mutex_init_rt -# define pthread_mutexattr_init pthread_mutexattr_init_rt -# define pthread_mutex_lock pthread_mutex_lock_rt -# define pthread_mutex_unlock pthread_mutex_unlock_rt -# define pthread_mutex_destroy pthread_mutex_destroy_rt -# define pthread_cond_init pthread_cond_init_rt -# define pthread_cond_wait pthread_cond_wait_rt -# define pthread_cond_signal pthread_cond_signal_rt -# define pthread_cond_destroy pthread_cond_destroy_rt -# define pthread_attr_init pthread_attr_init_rt -# define pthread_attr_setschedparam pthread_attr_setschedparam_rt -# define pthread_create pthread_create_rt -# define pthread_cancel pthread_cancel_rt -# define pthread_delete_np pthread_cancel_rt -# define pthread_attr_setstacksize pthread_attr_setstacksize_rt -# define pthread_self rt_whoami -*/ -# include <asm/rtai.h> -# include <rtai.h> -# include <rtai_posix.h> -# include <rtai_fifos.h> -# include <rtai_sched.h> -# ifdef CONFIG_PROC_FS -# include <rtai_proc_fs.h> -# endif -# else -# ifdef USER_MODE -# include <stdio.h> -# include <stdlib.h> -# include <string.h> -# include <math.h> -# include <pthread.h> -# include <assert.h> -# define rtf_get read -# define rtf_put write -# endif -# endif +# include <stdio.h> +# include <stdlib.h> +# include <string.h> +# include <math.h> +# include <pthread.h> +# include <assert.h> +# define rtf_get read +# define rtf_put write #endif diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h index 43d8167fe6..638a7a4b56 100644 --- a/openair2/LAYER2/MAC/defs.h +++ b/openair2/LAYER2/MAC/defs.h @@ -39,15 +39,9 @@ -#ifdef USER_MODE #include <stdio.h> #include <stdlib.h> #include <string.h> -#endif - -//#include "COMMON/openair_defs.h" - - #include "PHY/defs.h" #include "PHY/LTE_TRANSPORT/defs.h" @@ -109,9 +103,7 @@ //#define MCH_PAYLOAD_SIZE_MAX 16384// this value is using in case mcs and TBS index are high #endif -#ifdef USER_MODE #define printk printf -#endif //USER_MODE /*!\brief Maximum number of logical channl group IDs */ #define MAX_NUM_LCGID 4 diff --git a/openair2/LAYER2/MAC/extern.h b/openair2/LAYER2/MAC/extern.h index 50ea5634b9..e9d7a5997d 100644 --- a/openair2/LAYER2/MAC/extern.h +++ b/openair2/LAYER2/MAC/extern.h @@ -32,10 +32,6 @@ #ifndef __MAC_EXTERN_H__ #define __MAC_EXTERN_H__ - -#ifdef USER_MODE -//#include "stdio.h" -#endif //USER_MODE #include "PHY/defs.h" #include "defs.h" diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index 534f603dfd..0bfad4e5b1 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -247,10 +247,6 @@ int rlcmac_init_global_param(void) void mac_top_cleanup(void) { -#ifndef USER_MODE - pdcp_module_cleanup(); -#endif - if (NB_UE_INST > 0) { free(UE_mac_inst); } diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 23d3f3bd60..ff8939d82b 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -59,12 +59,6 @@ //#define ICIC 0 -/* - #ifndef USER_MODE - #define msg debug_msg - #endif -*/ - /* this function checks that get_eNB_UE_stats returns * a non-NULL pointer for all the active CCs of an UE */ diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c index 5b73a76312..7a9b811d0e 100644 --- a/openair2/LAYER2/MAC/ue_procedures.c +++ b/openair2/LAYER2/MAC/ue_procedures.c @@ -71,11 +71,6 @@ extern uint8_t usim_test; -/* -#ifndef USER_MODE -#define msg debug_msg -#endif - */ mapping BSR_names[] = { {"NONE", 0}, {"SHORT BSR", 1}, diff --git a/openair2/LAYER2/MAC/vars.h b/openair2/LAYER2/MAC/vars.h index 2386088161..d153c82aee 100644 --- a/openair2/LAYER2/MAC/vars.h +++ b/openair2/LAYER2/MAC/vars.h @@ -32,9 +32,6 @@ #ifndef __MAC_VARS_H__ #define __MAC_VARS_H__ -#ifdef USER_MODE -//#include "stdio.h" -#endif //USER_MODE #include "PHY/defs.h" #include "defs.h" #include "COMMON/mac_rrc_primitives.h" diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index b362e8887a..8bb04c37b8 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -30,9 +30,6 @@ #define PDCP_C //#define DEBUG_PDCP_FIFO_FLUSH_SDU -#ifndef USER_MODE -#include <rtai_fifos.h> -#endif #include "assertions.h" #include "hashtable.h" #include "pdcp.h" @@ -691,7 +688,7 @@ pdcp_data_ind( payload_offset=0; } -#if defined(USER_MODE) && defined(OAI_EMU) +#if defined(OAI_EMU) if (oai_emulation.info.otg_enabled == 1) { //unsigned int dst_instance; @@ -983,7 +980,7 @@ pdcp_run ( # endif #endif -#if defined(USER_MODE) && defined(OAI_EMU) +#if defined(OAI_EMU) pdcp_fifo_read_input_sdus_from_otg(ctxt_pP); #endif diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index 6dffada99d..c19adb6753 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -40,7 +40,6 @@ extern int otg_enabled; #include "pdcp.h" #include "pdcp_primitives.h" -#ifdef USER_MODE #include <pthread.h> #include <errno.h> #include <stdio.h> @@ -48,9 +47,6 @@ extern int otg_enabled; #include <unistd.h> #define rtf_put write #define rtf_get read -#else -#include <rtai_fifos.h> -#endif //USER_MODE #include "../MAC/extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" @@ -808,7 +804,7 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) module_id_t dst_id; // dst for otg rb_id_t rb_id; unsigned int pkt_size=0; -#if defined(USER_MODE) && defined(OAI_EMU) +#if defined(OAI_EMU) module_id_t src_id; static unsigned int pkt_cnt_enb=0, pkt_cnt_ue=0; @@ -818,7 +814,7 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) #endif protocol_ctxt_t ctxt; // we need to add conditions to avoid transmitting data when the UE is not RRC connected. -#if defined(USER_MODE) && defined(OAI_EMU) +#if defined(OAI_EMU) if (oai_emulation.info.otg_enabled ==1 ) { // module_id is source id diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c index eddd42c34b..e0a0c062d7 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c @@ -101,7 +101,7 @@ pdcp_netlink_init( struct sched_param sched_param; reset_meas(&ip_pdcp_stats_tmp); -#if defined(USER_MODE) && defined(OAI_EMU) +#if defined(OAI_EMU) nb_inst_enb = oai_emulation.info.nb_enb_local; nb_inst_ue = oai_emulation.info.nb_ue_local; #else diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h index 131d56e1f8..5130bde38b 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h @@ -73,10 +73,6 @@ # include "RLC-Config.h" //# include "rlc_am_test.h" -#ifdef USER_MODE -//# include "rlc_am_very_simple_test.h" -#endif - #define PROTOCOL_RLC_AM_CTXT_FMT PROTOCOL_CTXT_FMT"[%s %02u]" #define PROTOCOL_RLC_AM_CTXT_ARGS(CTXT_Pp, rLC_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp),\ diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c index f6dd0c5809..01a635656e 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c @@ -21,9 +21,7 @@ #define RLC_AM_MODULE 1 #define RLC_AM_INIT_C 1 -#ifdef USER_MODE #include <string.h> -#endif //----------------------------------------------------------------------------- #include "rlc_am.h" #include "LAYER2/MAC/extern.h" diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c index addc949d35..d0b5b52395 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c @@ -268,11 +268,9 @@ rlc_am_reassemble_pdu( //} break; -#if USER_MODE default: assert(0 != 0); -#endif } } else { switch (pdu_info->fi) { @@ -382,19 +380,13 @@ rlc_am_reassemble_pdu( if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug // data is already ok, done by last loop above rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->hidden_size); - } else { -#if USER_MODE - //assert (5!=5); -#endif } //rlc_pP->reassembly_missing_sn_detected = 0; break; -#if USER_MODE default: assert(1 != 1); -#endif } } diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c index afce72b455..c16e897bb6 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c @@ -22,9 +22,7 @@ #define RLC_AM_MODULE 1 #define RLC_AM_SEGMENT_C 1 //----------------------------------------------------------------------------- -#if USER_MODE #include <assert.h> -#endif //----------------------------------------------------------------------------- #include "platform_types.h" //----------------------------------------------------------------------------- @@ -468,9 +466,7 @@ void rlc_am_segment_10 ( PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP), sdu_mngt_p->sdu_remaining_size, pdu_remaining_size - sdu_mngt_p->sdu_remaining_size); -#if USER_MODE assert(1!=1); -#endif memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size); pdu_mngt_p->payload_size += sdu_mngt_p->sdu_remaining_size; pdu_remaining_size = pdu_remaining_size - sdu_mngt_p->sdu_remaining_size; diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_structs.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_structs.h index a6c340a165..147fd44d07 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_structs.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_structs.h @@ -36,9 +36,7 @@ # include "list.h" # include "mem_block.h" # include "rlc_am_constants.h" -//#ifdef USER_MODE # include "mac_rlc_primitives.h" -//#endif //USER_MODE # include "mac_primitives.h" # include "rlc_primitives.h" /** diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.c index f0cacc2874..7a3005334e 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.c @@ -22,9 +22,7 @@ #define RLC_AM_MODULE 1 #define RLC_AM_WINDOWS_C 1 //----------------------------------------------------------------------------- -#if USER_MODE #include <assert.h> -#endif //----------------------------------------------------------------------------- #include "platform_types.h" //----------------------------------------------------------------------------- diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c index 2e1629f8c8..7bd0da83a9 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c @@ -682,10 +682,6 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t { rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) rlc_pP; -#if ! USER_MODE - unsigned long int rlc_um_time_us; - int min, sec, usec; -#endif #if TRACE_RLC_UM_PDU #if ENABLE_ITTI MessageDef *msg_p; diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h index c7754f587a..abf4f8ad6e 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h @@ -64,9 +64,6 @@ # include "rlc_um_receiver.h" # include "rlc_um_segment.h" # include "rlc_um_test.h" -#ifdef USER_MODE -//# include "rlc_um_very_simple_test.h" -#endif #define PROTOCOL_RLC_UM_CTXT_FMT PROTOCOL_CTXT_FMT"[%s %02u] %s()" #define PROTOCOL_RLC_UM_CTXT_ARGS(CTXT_Pp, rLC_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp),\ diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c index 468a7d062a..91e1ba66d1 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c @@ -23,9 +23,7 @@ #define RLC_UM_REASSEMBLY_C 1 #include "platform_types.h" //----------------------------------------------------------------------------- -#if USER_MODE #include <string.h> -#endif #if ENABLE_ITTI # include "platform_types.h" # include "intertask_interface.h" diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c index 4d4362251e..f9af7c1cc2 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c @@ -25,9 +25,7 @@ #include "platform_types.h" #include "platform_constants.h" //----------------------------------------------------------------------------- -#if USER_MODE #include <assert.h> -#endif #include "assertions.h" #include "msc.h" #include "list.h" @@ -367,10 +365,8 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP sdu_mngt_p->sdu_remaining_size, pdu_remaining_size - sdu_mngt_p->sdu_remaining_size); #endif -#if USER_MODE #if !EXMIMO assert(1!=1); -#endif #endif memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size); // reduce the size of the PDU @@ -754,9 +750,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP) sdu_mngt_p->sdu_remaining_size, pdu_remaining_size - sdu_mngt_p->sdu_remaining_size); #endif -#if USER_MODE assert(1!=1); -#endif memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size); // reduce the size of the PDU continue_fill_pdu_with_sdu = 0; diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_structs.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_structs.h index a5425cb8a0..7ab9798a38 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_structs.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_structs.h @@ -36,9 +36,7 @@ # include "rlc_um_constants.h" # include "mac_primitives.h" # include "rlc_primitives.h" -//#ifdef USER_MODE # include "mac_rlc_primitives.h" -//#endif //USER_MODE //----------------------- /** * @addtogroup _rlc_um_impl_ diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h index fca786b4d3..ffd963204e 100644 --- a/openair2/LAYER2/RLC/rlc.h +++ b/openair2/LAYER2/RLC/rlc.h @@ -662,10 +662,6 @@ public_rlc(rlc_op_status_t rlc_stat_req ( public_rlc(int rlc_module_init(void);) /** @} */ -#ifndef USER_MODE -#define assert(x) ((x)?msg("rlc assertion fails\n"):0) -#endif - #define RLC_FG_COLOR_BLACK "\e[0;30m" #define RLC_FG_COLOR_RED "\e[0;31m" diff --git a/openair2/LAYER2/RLC/rlc_primitives.h b/openair2/LAYER2/RLC/rlc_primitives.h index 8d679ab9aa..eb7b9ae005 100644 --- a/openair2/LAYER2/RLC/rlc_primitives.h +++ b/openair2/LAYER2/RLC/rlc_primitives.h @@ -31,10 +31,8 @@ #ifndef __RLC_PRIMITIVES_H__ # define __RLC_PRIMITIVES_H__ -# ifdef USER_MODE -# include <stdio.h> -# include <stdlib.h> -# endif +# include <stdio.h> +# include <stdlib.h> # include "platform_types.h" # include "platform_constants.h" # include "mem_block.h" diff --git a/openair2/LAYER2/openair2_proc.c b/openair2/LAYER2/openair2_proc.c index 7801279be2..c4cac46141 100644 --- a/openair2/LAYER2/openair2_proc.c +++ b/openair2/LAYER2/openair2_proc.c @@ -29,21 +29,7 @@ # @ingroup _openair2 */ -#ifdef USER_MODE -# include <inttypes.h> -#else -#include <linux/kernel.h> -#include <linux/module.h> -#include <linux/proc_fs.h> - -# ifndef PRIu64 -# if __WORDSIZE == 64 -# define PRIu64 "lu" -# else -# define PRIu64 "llu" -# endif -# endif -#endif +#include <inttypes.h> #include "LAYER2/RLC/rlc.h" #include "LAYER2/MAC/defs.h" @@ -404,11 +390,7 @@ int dump_eNB_l2_stats(char *buffer, int length) } #ifdef PROC -#ifndef USER_MODE -static int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length) -#else int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length) -#endif { int len = 0,fg,Overhead, Sign; @@ -691,36 +673,4 @@ int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length) return len; } -#ifndef USER_MODE -static struct proc_dir_entry *proc_openair2_root; -/* - * Initialize the module and add the /proc file. - */ -int add_openair2_stats() -{ - struct proc_dir_entry *pde; - - proc_openair2_root = proc_mkdir("openair2",0); - // pde = proc_create_entry("lchan_stats", S_IFREG | S_IRUGO, proc_openair2_root); - pde = proc_create_data("lchan_stats", S_IFREG | S_IRUGO, proc_openair2_root, NULL,openair2_stats_read); - - if (!pde) { - printk("[OPENAIR][ERROR] can't create proc entry !\n"); - } - - return 0; -} -/* - * Unregister the file when the module is closed. - */ -void remove_openair_stats() -{ - - if (proc_openair2_root) { - printk("[OPENAIR][CLEANUP] Removing openair proc entry\n"); - remove_proc_entry("lchan_stats", proc_openair2_root); - - } -} -#endif #endif diff --git a/openair2/LAYER2/register.c b/openair2/LAYER2/register.c index 964666875a..6d869a9508 100644 --- a/openair2/LAYER2/register.c +++ b/openair2/LAYER2/register.c @@ -27,55 +27,15 @@ ________________________________________________________________*/ -#ifndef USER_MODE -#define __NO_VERSION__ -#else #include <stdio.h> #include <stdlib.h> #include <pthread.h> -#endif #include "COMMON/openair_types.h" #include "MAC/extern.h" #include <linux/module.h> -#ifndef USER_MODE - -//-----------------------------------------------------------------------------------------------------------// -MAC_RLC_XFACE* mac_rrc_register(RRC_XFACE* RRC_xface) -{ - //-----------------------------------------------------------------------------------------------------------// - if(Is_rrc_registered) { - msg("[OPENAIR][MAC][RRC_REGISTER] RRC interface already registered, aborting ...\n"); - return NULL; - } else { - msg("[OPENAIR][MAC][RRC_REGISTER] Registering RRC Interface, Mac_rlc_xface=%p\n",Mac_rlc_xface); - Rrc_xface=RRC_xface; - Is_rrc_registered=1; - return Mac_rlc_xface; - } -} - -//-----------------------------------------------------------------------------------------------------------// -int mac_rrc_unregister(RRC_XFACE *RRC_xface) -{ - //-----------------------------------------------------------------------------------------------------------// - if (Rrc_xface == RRC_xface) { - msg("[OPENAIR][MAC XFACE][RRC_UNREGISTER] Unregistering RRC interface\n"); - Rrc_xface=NULL; - Is_rrc_registered=0; - return(0); - } else { - msg("[OPENAIR][MAC XFACE][RRC_UNREGISTER] Not the right interface descriptor pointer!!!, aborting ...\n"); - return (-1); - } - -} - -EXPORT_SYMBOL(mac_rrc_register); -EXPORT_SYMBOL(mac_rrc_unregister); -#endif //USER_MODE diff --git a/openair2/NAS/SIMU_CELLULAR/Makefile b/openair2/NAS/SIMU_CELLULAR/Makefile index 26af978a4e..12070071a6 100755 --- a/openair2/NAS/SIMU_CELLULAR/Makefile +++ b/openair2/NAS/SIMU_CELLULAR/Makefile @@ -19,8 +19,8 @@ ASN1_DIR = $(OPENAIR2_DIR) #GRAAL_DIR =$(UPDIR)/non_access_stratum/driver/nasmt #RRC_DIR =$(UPDIR)/access_stratum/l3/rrc -#CFLAGS += -Wall -g -DDEBUG_RRC_STATE -DUSER_MODE -DNODE_RG -DNODE_MT -CFLAGS += -std=gnu99 -I$(KERNEL_DIR) -DUSER_MODE -DNB_ANTENNAS_RX=1 +#CFLAGS += -Wall -g -DDEBUG_RRC_STATE -DNODE_RG -DNODE_MT +CFLAGS += -std=gnu99 -I$(KERNEL_DIR) -DNB_ANTENNAS_RX=1 ifdef CELL_RRM CFLAGS += -DNODE_RG diff --git a/openair2/PHY_INTERFACE/mac_phy_primitives.c b/openair2/PHY_INTERFACE/mac_phy_primitives.c index 3d42393d11..06e06d096d 100644 --- a/openair2/PHY_INTERFACE/mac_phy_primitives.c +++ b/openair2/PHY_INTERFACE/mac_phy_primitives.c @@ -187,9 +187,6 @@ MACPHY_DATA_REQ *new_macphy_data_req(unsigned char Mod_id) return((MACPHY_DATA_REQ*)0); } -#ifndef USER_MODE -EXPORT_SYMBOL(new_macphy_data_req); -#endif #endif //PHY_CONTEXT @@ -262,13 +259,7 @@ void macphy_data_ind(unsigned char Mod_id,unsigned char Pdu_type,void *pdu,unsig } } msg("[OPENAIR][MAC][ERROR] No more PHY_RESOURCES !!!!\n"); -#ifdef USER_MODE exit(-1); -#else - print_active_indications(); - print_active_requests(); - mac_xface->macphy_exit(); -#endif } */ diff --git a/openair2/PHY_INTERFACE/vars.h b/openair2/PHY_INTERFACE/vars.h index 736d6f89db..566f4347b6 100644 --- a/openair2/PHY_INTERFACE/vars.h +++ b/openair2/PHY_INTERFACE/vars.h @@ -42,7 +42,3 @@ unsigned int mac_registered; #endif -#ifndef USER_MODE -EXPORT_SYMBOL(mac_xface); -#endif //PHY_EMUL - diff --git a/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c b/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c index 8d69b6e76b..0844593d93 100644 --- a/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c +++ b/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c @@ -28,45 +28,10 @@ * \email: navid.nikaein@eurecom.fr */ -#ifdef USER_MODE #include <fcntl.h> #include <stdio.h> #include <stdlib.h> -#else //USER_MODE - -#include <asm/io.h> -#include <asm/bitops.h> -#include <asm/uaccess.h> -#include <asm/segment.h> -#include <asm/page.h> -#include <asm/delay.h> - -#include <linux/init.h> -#include <linux/module.h> -#include <linux/pci.h> -#include <linux/mm.h> -#include <linux/mman.h> - -#include <linux/slab.h> -#include <linux/version.h> -#include <linux/kernel.h> -#include <linux/fs.h> - -#include <linux/errno.h> - - -#ifdef KERNEL2_6 - -#include <linux/slab.h> -#endif - -#ifdef KERNEL2_4 -#include <linux/malloc.h> -#include <linux/wrapper.h> -#endif -#endif //USER_MODE - #include "platform_types.h" #include "openair_defs.h" diff --git a/openair2/RRC/LITE/MESSAGES/asn1_msg.c b/openair2/RRC/LITE/MESSAGES/asn1_msg.c index a05b27ddc3..b1035cf33c 100644 --- a/openair2/RRC/LITE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LITE/MESSAGES/asn1_msg.c @@ -28,7 +28,6 @@ * \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr */ -#ifdef USER_MODE #include <stdio.h> #include <sys/types.h> #include <stdlib.h> /* for atoi(3) */ @@ -36,14 +35,7 @@ #include <string.h> /* for strerror(3) */ #include <sysexits.h> /* for EX_* exit codes */ #include <errno.h> /* for errno */ -#else -#include <linux/module.h> /* Needed by all modules */ -#endif -#ifdef USER_MODE -//#include "RRC/LITE/defs.h" -//#include "COMMON/mac_rrc_primitives.h" #include "UTIL/LOG/log.h" -#endif #include <asn_application.h> #include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */ #include <per_encoder.h> @@ -90,16 +82,8 @@ #include "common/ran_context.h" -//#include "PHY/defs.h" -#ifndef USER_MODE -#define msg printk -#ifndef errno -int errno; -#endif -#else -# if !defined (msg) -# define msg printf -# endif +#if !defined (msg) +#define msg printf #endif //#define XER_PRINT @@ -483,9 +467,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, # endif #endif -#ifdef USER_MODE LOG_D(RRC,"[eNB] SystemInformationBlockType1 Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); -#endif if (enc_rval.encoded==-1) { return(-1); @@ -1013,9 +995,7 @@ uint8_t do_SIB23(uint8_t Mod_id, # endif #endif -#ifdef USER_MODE LOG_D(RRC,"[eNB] SystemInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); -#endif if (enc_rval.encoded==-1) { msg("[RRC] ASN1 : SI encoding failed for SIB23\n"); @@ -1102,9 +1082,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv) # endif #endif -#ifdef USER_MODE LOG_D(RRC,"[UE] RRCConnectionRequest Encoded %zd bits (%zd bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause); -#endif return((enc_rval.encoded+7)/8); @@ -1185,9 +1163,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin # endif #endif -#ifdef USER_MODE LOG_D(RRC,"RRCConnectionSetupComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); -#endif return((enc_rval.encoded+7)/8); @@ -1247,9 +1223,7 @@ do_RRCConnectionReconfigurationComplete( # endif #endif -#ifdef USER_MODE LOG_D(RRC,"RRCConnectionReconfigurationComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); -#endif return((enc_rval.encoded+7)/8); } @@ -1636,10 +1610,8 @@ do_RRCConnectionSetup( # endif #endif -#ifdef USER_MODE LOG_D(RRC,"RRCConnectionSetup Encoded %zd bits (%zd bytes), ecause %d\n", enc_rval.encoded,(enc_rval.encoded+7)/8,ecause); -#endif // FREEMEM(SRB_list); // free(SRB1_config); @@ -1709,13 +1681,11 @@ do_SecurityModeCommand( # endif #endif -#ifdef USER_MODE LOG_D(RRC,"[eNB %d] securityModeCommand for UE %x Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rnti, enc_rval.encoded, (enc_rval.encoded+7)/8); -#endif if (enc_rval.encoded==-1) { LOG_E(RRC,"[eNB %d] ASN1 : securityModeCommand encoding failed for UE %x\n", @@ -1787,13 +1757,11 @@ do_UECapabilityEnquiry( # endif #endif -#ifdef USER_MODE LOG_D(RRC,"[eNB %d] UECapabilityRequest for UE %x Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rnti, enc_rval.encoded, (enc_rval.encoded+7)/8); -#endif if (enc_rval.encoded==-1) { LOG_E(RRC,"[eNB %d] ASN1 : UECapabilityRequest encoding failed for UE %x\n", @@ -1953,13 +1921,11 @@ do_RRCConnectionReconfiguration( # endif #endif - //#ifdef USER_MODE LOG_I(RRC,"RRCConnectionReconfiguration Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); // for (i=0;i<30;i++) // msg("%x.",buffer[i]); // msg("\n"); - //#endif return((enc_rval.encoded+7)/8); } @@ -2014,10 +1980,8 @@ do_RRCConnectionReestablishmentReject( # endif #endif -#ifdef USER_MODE LOG_D(RRC,"RRCConnectionReestablishmentReject Encoded %zd bits (%zd bytes)\n", enc_rval.encoded,(enc_rval.encoded+7)/8); -#endif return((enc_rval.encoded+7)/8); } @@ -2075,10 +2039,8 @@ do_RRCConnectionReject( # endif #endif -#ifdef USER_MODE LOG_D(RRC,"RRCConnectionReject Encoded %zd bits (%zd bytes)\n", enc_rval.encoded,(enc_rval.encoded+7)/8); -#endif return((enc_rval.encoded+7)/8); } @@ -2266,9 +2228,7 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id, # endif #endif -#ifdef USER_MODE LOG_D(RRC,"[eNB] MCCH Message Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); -#endif if (enc_rval.encoded==-1) { msg("[RRC] ASN1 : MCCH encoding failed for MBSFNAreaConfiguration\n"); @@ -2400,9 +2360,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_ # endif #endif -#ifdef USER_MODE printf("Measurement Report Encoded %zu bits (%zu bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); -#endif return((enc_rval.encoded+7)/8); } diff --git a/openair2/RRC/LITE/MESSAGES/asn1_msg.h b/openair2/RRC/LITE/MESSAGES/asn1_msg.h index 6241e2963f..af11f18b94 100644 --- a/openair2/RRC/LITE/MESSAGES/asn1_msg.h +++ b/openair2/RRC/LITE/MESSAGES/asn1_msg.h @@ -28,7 +28,6 @@ * \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr */ -#ifdef USER_MODE #include <stdio.h> #include <sys/types.h> #include <stdlib.h> /* for atoi(3) */ @@ -36,9 +35,6 @@ #include <string.h> /* for strerror(3) */ #include <sysexits.h> /* for EX_* exit codes */ #include <errno.h> /* for errno */ -#else -#include <linux/module.h> /* Needed by all modules */ -#endif #include <asn_application.h> #include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */ diff --git a/openair2/RRC/LITE/defs.h b/openair2/RRC/LITE/defs.h index 9d7f7fdf2d..df306105d3 100644 --- a/openair2/RRC/LITE/defs.h +++ b/openair2/RRC/LITE/defs.h @@ -31,11 +31,9 @@ #ifndef __OPENAIR_RRC_DEFS_H__ #define __OPENAIR_RRC_DEFS_H__ -#ifdef USER_MODE #include <stdio.h> #include <stdlib.h> #include <string.h> -#endif #include "collection/tree.h" #include "rrc_types.h" @@ -47,11 +45,6 @@ #include "LAYER2/MAC/defs.h" -//#include "COMMON/openair_defs.h" -#ifndef USER_MODE -#include <rtai.h> -#endif - #include "SystemInformationBlockType1.h" #include "SystemInformation.h" #include "RRCConnectionReconfiguration.h" diff --git a/openair2/RRC/LITE/mesh_top.c b/openair2/RRC/LITE/mesh_top.c index 16395e99c6..a2b4e0f7d0 100644 --- a/openair2/RRC/LITE/mesh_top.c +++ b/openair2/RRC/LITE/mesh_top.c @@ -27,41 +27,6 @@ ________________________________________________________________*/ -#ifndef USER_MODE -#define __NO_VERSION__ - -#include <asm/io.h> -#include <asm/bitops.h> -#include <asm/uaccess.h> -#include <asm/segment.h> -#include <asm/page.h> -#include <asm/delay.h> - -#include <linux/init.h> -#include <linux/module.h> -#include <linux/pci.h> -#include <linux/mm.h> -#include <linux/mman.h> - -#include <linux/slab.h> -#include <linux/version.h> -#include <linux/kernel.h> -#include <linux/fs.h> - -#include <linux/errno.h> -#ifdef KERNEL2_6 -#include <linux/slab.h> -#endif - -#ifdef KERNEL2_4 -#include <linux/malloc.h> -#include <linux/wrapper.h> -#endif - -#endif - - - #include "defs.h" #include "vars.h" @@ -72,75 +37,3 @@ extern void *bigphys_malloc(int); - -#ifndef USER_MODE - -/*------------------------------------------------*/ -/* Prototypes */ -/*------------------------------------------------*/ -#ifdef KERNEL2_4 -static int init_module( void ); -static void cleanup_module(void); -#else -static int openair_rrc_init_module( void ); -static void openair_rrc_cleanup_module(void); -#endif - -#ifdef KERNEL2_6 -static int __init openair_rrc_init_module( void ) -#else -int init_module( void ) -#endif //KERNEL2_6 -{ - printk("[OPENAIR][RRC][INIT] inserting module\n"); - - - Rrc_xface = (RRC_XFACE*)malloc16(sizeof(RRC_XFACE)); - - if(Rrc_xface == NULL) { - printk("[RRC] FATAL EROOR: Could not allocate memory for Rrc_xface !!!\n"); - return (-1); - } - - Mac_rlc_xface=mac_rrc_register(Rrc_xface); - - if( Mac_rlc_xface == NULL ) { - printk("[OPENAIR][RRC][INIT] Could not get RRC descriptor\n"); - return -1; - } else { - printk("[OPENAIR][RRC][INIT] Got RRC descriptor , Rcc_xface %p,Mac_rlc_xface=%p \n",Rrc_xface,Mac_rlc_xface); - } - - if(rrc_init_global_param()==-1) { - printk("[OPENAIR][RRC][INIT] FATAL ERROR: INIT_GLOBAL_PARAM_NOK\n"); - return -1; - } - - return 0; -} - -#ifdef KERNEL2_6 -static void __exit openair_rrc_cleanup_module(void) -#else -void cleanup_module(void) -#endif //KERNEL2_6 -{ -#ifndef NO_RRM - rtf_destroy(RRC2RRM_FIFO); - rtf_destroy(RRM2RRC_FIFO); -#endif //NO_RRM - printk("[OPENAIR][RRC][CLEANUP] cleanup module\n"); - mac_rrc_unregister(Rrc_xface); - -} - -MODULE_AUTHOR -("Lionel GAUTHIER <lionel.gauthier@eurecom.fr>, Raymond KNOPP <raymond.knopp@eurecom.fr>, Aawatif MENOUNI <aawatif.menouni@eurecom.fr>,Dominique NUSSBAUM <dominique.nussbaum@eurecom.fr>, Michelle WETTERWALD <michelle.wetterwald@eurecom.fr>, Maxime GUILLAUD <maxime.guillaud@eurecom.fr, Hicham ANOUAR <hicham.anouar@eurecom.fr>"); -MODULE_DESCRIPTION ("openair RRC layer module"); -MODULE_LICENSE ("GPL"); -module_init (openair_rrc_init_module); -module_exit (openair_rrc_cleanup_module); - -#endif //USER_MODE - - diff --git a/openair2/RRC/LITE/rrc_UE.c b/openair2/RRC/LITE/rrc_UE.c index f0f495e8b7..bae76203c6 100644 --- a/openair2/RRC/LITE/rrc_UE.c +++ b/openair2/RRC/LITE/rrc_UE.c @@ -66,10 +66,8 @@ #include "OCG.h" #include "OCG_extern.h" #endif -#ifdef USER_MODE #include "RRC/NAS/nas_config.h" #include "RRC/NAS/rb_config.h" -#endif #if ENABLE_RAL #include "rrc_UE_ral.h" #endif @@ -1730,9 +1728,7 @@ rrc_ue_process_securityModeCommand( # endif #endif -#ifdef USER_MODE LOG_D(RRC, "securityModeComplete Encoded %zd bits (%zd bytes)\n", enc_rval.encoded, (enc_rval.encoded+7)/8); -#endif for (i = 0; i < (enc_rval.encoded + 7) / 8; i++) { LOG_T(RRC, "%02x.", buffer[i]); @@ -1835,9 +1831,7 @@ rrc_ue_process_ueCapabilityEnquiry( # endif #endif -#ifdef USER_MODE LOG_D(RRC,"UECapabilityInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); -#endif for (i = 0; i < (enc_rval.encoded + 7) / 8; i++) { LOG_T(RRC, "%02x.", buffer[i]); @@ -4246,10 +4240,6 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i #endif // rel10 -#ifndef USER_MODE -EXPORT_SYMBOL(Rlc_info_am_config); -#endif - #if defined(ENABLE_ITTI) //----------------------------------------------------------------------------- void *rrc_ue_task( void *args_p ) diff --git a/openair2/RRC/LITE/rrc_common.c b/openair2/RRC/LITE/rrc_common.c index 0e836f5677..8ff04518be 100644 --- a/openair2/RRC/LITE/rrc_common.c +++ b/openair2/RRC/LITE/rrc_common.c @@ -97,9 +97,7 @@ rrc_init_global_param( //----------------------------------------------------------------------------- { - //#ifdef USER_MODE // Rrc_xface = (RRC_XFACE*)malloc16(sizeof(RRC_XFACE)); - //#endif //USRE_MODE // Rrc_xface->openair_rrc_top_init = openair_rrc_top_init; // Rrc_xface->openair_rrc_eNB_init = openair_rrc_eNB_init; diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c index c8b42d41b3..e4c162d5f7 100644 --- a/openair2/RRC/LITE/rrc_eNB.c +++ b/openair2/RRC/LITE/rrc_eNB.c @@ -63,12 +63,10 @@ #include "MeasResults.h" //#endif -#ifdef USER_MODE -# include "RRC/NAS/nas_config.h" -# include "RRC/NAS/rb_config.h" -# include "OCG.h" -# include "OCG_extern.h" -#endif +#include "RRC/NAS/nas_config.h" +#include "RRC/NAS/rb_config.h" +#include "OCG.h" +#include "OCG_extern.h" #if defined(ENABLE_SECURITY) # include "UTIL/OSA/osa_defs.h" diff --git a/openair2/RRC/LITE/rrc_rrm_interface.c b/openair2/RRC/LITE/rrc_rrm_interface.c index 822ce554af..9f4270be89 100644 --- a/openair2/RRC/LITE/rrc_rrm_interface.c +++ b/openair2/RRC/LITE/rrc_rrm_interface.c @@ -292,10 +292,5 @@ int send_msg_fifo(int *s, msg_t *fmsg) int send_msg(void *s, msg_t *smsg) { -#ifdef USER_MODE send_msg_sock((sock_rrm_t *)s, smsg); -#else - send_msg_fifo((int *)s,smsg); -#endif - } diff --git a/openair2/RRC/LITE/rrc_rrm_interface.h b/openair2/RRC/LITE/rrc_rrm_interface.h index d204ab2db6..0880859a59 100644 --- a/openair2/RRC/LITE/rrc_rrm_interface.h +++ b/openair2/RRC/LITE/rrc_rrm_interface.h @@ -101,8 +101,6 @@ extern "C" { #define START_MSG_PUSU 0xCC -#ifdef USER_MODE - #include <sys/socket.h> #include <sys/un.h> @@ -128,16 +126,6 @@ char *recv_msg( sock_rrm_t *s ) ; } #endif -#else //USER_MODE -#include <rtai_fifos.h> - -#define RRC2RRM_FIFO 14 -#define RRM2RRC_FIFO 15 -int send_msg_fifo(int *s ,msg_t *msg ) ; -#endif //USER_MODE - int send_msg(void *, msg_t *); - - #endif diff --git a/openair2/RRC/LITE/rrm_2_rrc_msg.c b/openair2/RRC/LITE/rrm_2_rrc_msg.c index 3ef0bc2e0a..3ed3a9d859 100644 --- a/openair2/RRC/LITE/rrm_2_rrc_msg.c +++ b/openair2/RRC/LITE/rrm_2_rrc_msg.c @@ -65,17 +65,12 @@ void fn_rrc (void) /******************************************************************************/ msg_head_t *Header ; -#ifdef USER_MODE char *Data; -#else - int bytes_read; -#endif L2_ID Mac_id; while(1) { -#ifdef USER_MODE Header = (msg_head_t *) recv_msg(&S_rrc) ; if(Header==NULL) { @@ -83,52 +78,9 @@ void fn_rrc (void) } Data_to_read=Header->size; -#else - - if(Header_read_idx < Header_size) { - bytes_read = rtf_get (RRM2RRC_FIFO,&Header_buf[Header_read_idx],Header_size-Header_read_idx); - - if(bytes_read >0) { - msg("RRC: GET FIFOS RETURNS %d bytes, header %d\n",bytes_read,Header_read_idx); - } - - Header_read_idx+=bytes_read; - - if(Header_read_idx == Header_size) { - Header = (msg_head_t *) Header_buf; - Data_to_read=Header->size; - msg("RRC: Header read completed, data size %d\n",Data_to_read); - } - //msg("[fn_rrc]TTI %d: rcv_msg return Null\n",Rrc_xface->Frame_index); - else { - break; - } - } - -#endif if (Data_to_read > 0 ) { -#ifdef USER_MODE Data = (char *) (Header +1) ; -#else - bytes_read = rtf_get (RRM2RRC_FIFO,&Data[Data_read_idx],Data_to_read); - - if(bytes_read >0) { - msg("RRC: GET FIFOS RETURNS %d bytes, Data_to_read %d\n",bytes_read,Data_to_read); - } - - Data_to_read-=bytes_read; - Data_read_idx+=bytes_read; - - if(Data_to_read > 0 ) { - break; - } - - msg("RRC: DATA read completed, data size %d\n",Data_to_read); - Header_read_idx=0; - Data_read_idx=0; - Data_to_read=0; -#endif } msg("Got MSG of Type %d on Inst %d\n",Header->msg_type,Header->inst); diff --git a/openair2/RRC/LITE/utils.c b/openair2/RRC/LITE/utils.c index fd37fdf65c..bbf97046bf 100644 --- a/openair2/RRC/LITE/utils.c +++ b/openair2/RRC/LITE/utils.c @@ -29,25 +29,8 @@ ________________________________________________________________*/ -//#include "openair_types.h" #include "defs.h" #include "extern.h" -//#include "openair_proto.h" - - -#ifndef USER_MODE -char bcmp(void *x, void *y,int Size ) -{ - unsigned char i; - - for(i=0; i<Size; i++) - if(*(char*)(x+i)!= *(char*)(y+i)) { - return 1; - } - - return 0; -} -#endif //------------------------------------------------------------------------------------------------------------------// @@ -63,7 +46,6 @@ uint16_t find_free_dtch_position(uint8_t Mod_id, uint16_t UE_CH_index) for(i=j; i<NB_RAB_MAX; i++) { //first RAB IS BROADCAST DTCH - //msg("i=%d\n",i); if(CH_rrc_inst[Mod_id].Rab[i][UE_CH_index].Active==0) { return( i); } @@ -130,11 +112,7 @@ uint8_t find_rrc_info_index(uint8_t Mod_id,uint8_t CH_id) if(Rrc_inst[Mod_id].Rrc_info[i].Info.UE_info.CH_id == CH_id) return i; } error_msg("[OPENAIR][RRC] RRC_INFO_INDEX: FATAL ERROR: Not yet Pre_Synchronized with CH ???%d\n",CH_id); - #ifndef USER_MODE - // mac_xface->macphy_exit(); - #else exit(-1); - #endif */ } /* diff --git a/openair2/UTIL/LISTS/list2.c b/openair2/UTIL/LISTS/list2.c index 875f5e2d2f..3f0a59df53 100644 --- a/openair2/UTIL/LISTS/list2.c +++ b/openair2/UTIL/LISTS/list2.c @@ -38,11 +38,7 @@ ***************************************************************************/ #define LIST2_C #include "list.h" -#ifdef USER_MODE #include "assertions.h" -#else -#define NULL 0 -#endif #include <string.h> @@ -336,9 +332,7 @@ list2_display (list2_t * listP) nb_elements++; } msg (" found nb_elements %d nb_elements %d\n", nb_elements, listP->nb_elements); - #ifdef USER_MODE AssertFatal(nb_elements == listP->nb_elements, "Bad count of elements %d != %d", nb_elements, listP->nb_elements); - #endif } }*/ } diff --git a/openair2/UTIL/LOG/log.c b/openair2/UTIL/LOG/log.c index f3bd04754b..887ce5bff6 100644 --- a/openair2/UTIL/LOG/log.c +++ b/openair2/UTIL/LOG/log.c @@ -42,10 +42,8 @@ # include "intertask_interface.h" #endif -#ifdef USER_MODE # include <pthread.h> # include <string.h> -#endif #ifdef RTAI # include <rtai.h> # include <rtai_fifos.h> @@ -164,24 +162,14 @@ void log_getconfig(log_t *g_log) { int logInit (void) { -#ifdef USER_MODE #ifndef RTAI int i; #endif g_log = calloc(1, sizeof(log_t)); -#else - g_log = kmalloc(sizeof(log_t), GFP_KERNEL); -#endif - if (g_log == NULL) { -#ifdef USER_MODE perror ("cannot allocated memory for log generation module \n"); exit(EXIT_FAILURE); -#else - printk("cannot allocated memory for log generation module \n"); - return(-1); -#endif } @@ -519,11 +507,7 @@ int logInit (void) rtf_create (FIFO_PRINTF_NO, FIFO_PRINTF_SIZE); #endif -#ifdef USER_MODE printf("log init done\n"); -#else - printk("log init done\n"); -#endif return 0; } diff --git a/openair2/UTIL/LOG/log.h b/openair2/UTIL/LOG/log.h index 1d795740b6..c21407f6eb 100644 --- a/openair2/UTIL/LOG/log.h +++ b/openair2/UTIL/LOG/log.h @@ -32,7 +32,6 @@ # define __LOG_H__ /*--- INCLUDES ---------------------------------------------------------------*/ -#ifdef USER_MODE #include <unistd.h> #include <stdio.h> #include <stdlib.h> @@ -53,9 +52,6 @@ #define _GNU_SOURCE #endif #include <pthread.h> -#else -#include "rtai_fifos.h" -#endif /*----------------------------------------------------------------------------*/ @@ -282,20 +278,11 @@ void *log_thread_function(void * list); * @ingroup _macro * @brief Macro used to call tr_log_full_ex with file, function and line information * @{*/ -#ifdef USER_MODE -//#define logIt(component, level, format, args...) do {logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args);} while(0); #ifdef LOG_NO_THREAD #define logIt(component, level, format, args...) logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args) #else //default #define logIt(component, level, format, args...) logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args) #endif -#else -#ifdef LOG_NO_THREAD -#define logIt(component, level, format, args...) logRecord_mt(NULL, __FUNCTION__, __LINE__, component, level, format, ##args) -#else // default -#define logIt(component, level, format, args...) logRecord(NULL, __FUNCTION__, __LINE__, component, level, format, ##args) -#endif -#endif /* @}*/ /*----------------macro definitions for reading log configuration from the config module */ @@ -326,7 +313,6 @@ void *log_thread_function(void * list); * @{*/ // debugging macros -#ifdef USER_MODE # if T_TRACER # include "T.h" # define LOG_I(c, x...) T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) @@ -364,17 +350,6 @@ void *log_thread_function(void * list); # define LOG_T(c, x...) logIt(c, LOG_TRACE, x) # endif /*DISABLE_LOG_X*/ # endif /* T_TRACER */ -#else /* USER_MODE */ -# define LOG_G(c, x...) printk(x) -# define LOG_A(c, x...) printk(x) -# define LOG_C(c, x...) printk(x) -# define LOG_E(c, x...) printk(x) -# define LOG_W(c, x...) printk(x) -# define LOG_N(c, x...) printk(x) -# define LOG_I(c, x...) printk(x) -# define LOG_D(c, x...) printk(x) -# define LOG_T(c, x...) printk(x) -#endif /* @}*/ diff --git a/openair2/UTIL/MATH/random.c b/openair2/UTIL/MATH/random.c index 06caa3bc3c..30a6e9b1ab 100644 --- a/openair2/UTIL/MATH/random.c +++ b/openair2/UTIL/MATH/random.c @@ -29,11 +29,7 @@ #include "rtos_header.h" #include "platform_types.h" -#ifdef USER_MODE -# include <sys/time.h> -#else -#include <rtai_sched.h> -#endif +#include <sys/time.h> /* Random generators */ @@ -47,7 +43,6 @@ static int seed; void init_uniform (void) { -#ifdef USER_MODE struct timeval tv; struct timezone tz; @@ -61,9 +56,6 @@ init_uniform (void) #warning TO DO seed = rgId //seed += rgId; #endif -#else - seed = rt_get_time_ns(); -#endif } diff --git a/openair2/UTIL/MEM/mem_block.c b/openair2/UTIL/MEM/mem_block.c index 09f10547cb..9c3a50467a 100644 --- a/openair2/UTIL/MEM/mem_block.c +++ b/openair2/UTIL/MEM/mem_block.c @@ -54,7 +54,7 @@ static pthread_mutex_t mtex = PTHREAD_MUTEX_INITIALIZER; //#define DEBUG_MEM_MNGT_ALLOC_SIZE //#define DEBUG_MEM_MNGT_ALLOC //----------------------------------------------------------------------------- -#if defined(USER_MODE) && defined(DEBUG_MEM_MNGT_ALLOC) +#if defined(DEBUG_MEM_MNGT_ALLOC) uint32_t counters[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; #endif //----------------------------------------------------------------------------- @@ -269,10 +269,8 @@ get_free_mem_block (uint32_t sizeP, const char* caller) #ifdef DEBUG_MEM_MNGT_ALLOC LOG_E (RLC,"[MEM_MNGT][ERROR][MINOR] memory pool %d is empty trying next pool alloc count = %d\n", pool_selected, counters[pool_selected]); -#ifdef USER_MODE // display_mem_load (); // check_mem_area ((void *)&mem_block_var); -#endif #endif } while (pool_selected++ < 12); diff --git a/openair2/UTIL/MEM/mem_block.h b/openair2/UTIL/MEM/mem_block.h index b7e36bf5b3..e967380269 100644 --- a/openair2/UTIL/MEM/mem_block.h +++ b/openair2/UTIL/MEM/mem_block.h @@ -31,9 +31,7 @@ #ifndef __MEM_BLOCK_H__ # define __MEM_BLOCK_H__ -#ifdef USER_MODE #include <stdint.h> -#endif #ifdef MEM_BLOCK_C # define public_mem_block(x) x # define private_mem_block(x) x @@ -63,19 +61,8 @@ public_mem_block(mem_block_t *copy_mem_block (mem_block_t * leP, mem_block_t * d public_mem_block(void display_mem_load (void);) public_mem_block(void check_mem_area (void);) -# ifdef USER_MODE private_mem_block(void check_free_mem_block (mem_block_t * leP);) -# endif -#ifdef USER_MODE -//# define MEM_SCALE MAX_MOBILES_PER_ENB*NB_RB_MAX # define MEM_SCALE MAX_MOBILES_PER_ENB -#else -# ifdef NODE_RG -# define MEM_SCALE 2 -# else -# define MEM_SCALE 1 -# endif -#endif // definition of the size of the allocated memory area # define MEM_MNGT_MB0_BLOCK_SIZE 64 // 64 diff --git a/openair2/UTIL/MEM/mem_mngt.c b/openair2/UTIL/MEM/mem_mngt.c index 49cd310ac9..57c90ea4f9 100644 --- a/openair2/UTIL/MEM/mem_mngt.c +++ b/openair2/UTIL/MEM/mem_mngt.c @@ -49,9 +49,7 @@ // #endif //----------------------------------------------------------------------------- -#ifdef USER_MODE uint32_t counters[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -#endif //----------------------------------------------------------------------------- /* * initialize all ures @@ -227,10 +225,8 @@ get_free_mem_block (uint16_t sizeP, __func__) #ifdef DEBUG_MEM_MNGT_ALLOC msg ("[MEM_MNGT][ERROR][MINOR] memory pool %d is empty trying next pool alloc count = %d\n", pool_selected, counters[pool_selected]); -# ifdef USER_MODE display_mem_load (); check_mem_area (mem); -# endif #endif } while (pool_selected++ < 9); diff --git a/openair2/UTIL/OCG/makefile b/openair2/UTIL/OCG/makefile index 1e531f9494..da28c888d4 100644 --- a/openair2/UTIL/OCG/makefile +++ b/openair2/UTIL/OCG/makefile @@ -7,7 +7,7 @@ OPENAIR2_TOP = ../../../openair2 OPENAIR3_TOP = ../../../openair3 OPENAIR3 = $(OPENAIR3_DIR) -CFLAGS += -DPHYSIM -DNODE_RG -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat +CFLAGS += -DPHYSIM -DNODE_RG -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat CFLAGS += -m32 -DOPENAIR_LTE -DOPENAIR2 #-DOFDMA_ULSCH -DIFFT_FPGA -DIFFT_FPGA_UE diff --git a/openair2/UTIL/OMG/makefile b/openair2/UTIL/OMG/makefile index 319b8296cd..1fb0f3efd9 100644 --- a/openair2/UTIL/OMG/makefile +++ b/openair2/UTIL/OMG/makefile @@ -60,7 +60,7 @@ OPENAIR2_TOP = ../../../openair2 OPENAIR3_TOP = ../../../openair3 OPENAIR3 = $(OPENAIR3_DIR) -CFLAGS += -DPHYSIM -DNODE_RG -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat +CFLAGS += -DPHYSIM -DNODE_RG -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat CFLAGS += -DOPENAIR_LTE -DOPENAIR2 #-DOFDMA_ULSCH -DIFFT_FPGA -DIFFT_FPGA_UE diff --git a/openair2/UTIL/OMG/makefile_old b/openair2/UTIL/OMG/makefile_old index acc89254fb..06d4a6f46f 100644 --- a/openair2/UTIL/OMG/makefile_old +++ b/openair2/UTIL/OMG/makefile_old @@ -62,7 +62,7 @@ OPENAIR2_TOP = ../../../openair2 OPENAIR3_TOP = ../../../openair3 OPENAIR3 = $(OPENAIR3_DIR) -CFLAGS += -DPHYSIM -DNODE_RG -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat +CFLAGS += -DPHYSIM -DNODE_RG -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat CFLAGS += -DOPENAIR_LTE -DOPENAIR2 #-DOFDMA_ULSCH -DIFFT_FPGA -DIFFT_FPGA_UE diff --git a/openair2/UTIL/OMG/makefile_standalone b/openair2/UTIL/OMG/makefile_standalone index 68170543ee..d612c01837 100644 --- a/openair2/UTIL/OMG/makefile_standalone +++ b/openair2/UTIL/OMG/makefile_standalone @@ -8,7 +8,7 @@ OBJsumo = omg.c common.c sumo.c client_traci_OMG.c socket_traci_OMG.c storage_tr OBJ = omg.c common.c static.c job.c rwp.c rwalk.c trace.c steadystaterwp.c sumo.c grid.c mobility_parser.c hashtable.c client_traci_OMG.c socket_traci_OMG.c storage_traci_OMG.c id_manager.c -CFLAGS += -DSTANDALONE -DUSER_MODE -g +CFLAGS += -DSTANDALONE -g .PHONY: help staticOMG rwpOMG clean diff --git a/openair2/UTIL/TRACE/print.h b/openair2/UTIL/TRACE/print.h index 5982d249fa..72c43f20d4 100644 --- a/openair2/UTIL/TRACE/print.h +++ b/openair2/UTIL/TRACE/print.h @@ -28,14 +28,5 @@ ***************************************************************************/ #ifndef __PRINT_H__ # define __PRINT_H__ -# ifdef USER_MODE -# define msg printf -# else -# ifdef FIFO_PRINTF -# include "fifo_printf_proto_extern.h" -# define msg fifo_printf -# else -# define msg fifo_printf_null -# endif -# endif +# define msg printf #endif diff --git a/openair2/X2AP/Makefile.inc b/openair2/X2AP/Makefile.inc index 7369cf8dfa..a301a9934e 100755 --- a/openair2/X2AP/Makefile.inc +++ b/openair2/X2AP/Makefile.inc @@ -28,7 +28,6 @@ CFLAGS = \ -Wall \ -DENB_MODE \ -DENABLE_USE_MME \ - -DUSER_MODE \ -I. \ -I$(ASN1MESSAGESDIR)/ASN1/$(ASN1RELDIR) \ -I$(ASN1MESSAGESDIR) \ diff --git a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/Makefile b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/Makefile index c9c5f82819..77b3d41f25 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/Makefile +++ b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -DUSER_MODE -DEXMIMO -g +CFLAGS = -DEXMIMO -g XTRA_CFLAGS = -msse -msse2 -mssse3 -fPIC #ifndef OPENAIR0_DIR diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 8b62a8e698..446e602f6d 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -283,12 +283,11 @@ int64_t wrap_ts = 0; unsigned int u_sf_mode = 0; // 1=record, 2=replay unsigned int u_sf_record = 0; // record mode unsigned int u_sf_replay = 0; // replay mode -char u_sf_filename[1024]; // subframes file path +char u_sf_filename[1024] = ""; // subframes file path unsigned int u_sf_max = DEF_NB_SF; // max number of recorded subframes unsigned int u_sf_loops = DEF_SF_NB_LOOP; // number of loops in replay mode unsigned int u_sf_read_delay = DEF_SF_DELAY_READ; // read delay in replay mode unsigned int u_sf_write_delay = DEF_SF_DELAY_WRITE; // write delay in replay mode -char *tmp_filename[1]; // use an array of pointer (libconfig does not seems to work with char array yet) char config_opt_sf_file[] = CONFIG_OPT_SF_FILE; char config_def_sf_file[] = DEF_SF_FILE; @@ -837,7 +836,7 @@ int trx_usrp_recplay_config_init(paramdef_t *usrp_recplay_params) { memcpy(usrp_recplay_params[0].optname, config_opt_sf_file, strlen(config_opt_sf_file)); usrp_recplay_params[0].helpstr = config_hlp_sf_file; usrp_recplay_params[0].paramflags=PARAMFLAG_NOFREE; - usrp_recplay_params[0].strptr=(char **)&tmp_filename[0]; + usrp_recplay_params[0].strptr=(char **)&u_sf_filename; usrp_recplay_params[0].defstrval = NULL; usrp_recplay_params[0].type=TYPE_STRING; usrp_recplay_params[0].numelt=sizeof(u_sf_filename); @@ -912,16 +911,13 @@ extern "C" { // end to check memset(usrp_recplay_params, 0, 7*sizeof(paramdef_t)); memset(&u_sf_filename[0], 0, 1024); - tmp_filename[0] = u_sf_filename; if (trx_usrp_recplay_config_init(usrp_recplay_params) != 0) { std::cerr << "USRP device record/replay mode configuration error exiting" << std::endl; return -1; } config_process_cmdline(usrp_recplay_params,sizeof(usrp_recplay_params)/sizeof(paramdef_t),NULL); - if (strlen(tmp_filename[0]) != 0) { - (void) strcpy(u_sf_filename, tmp_filename[0]); - } else { + if (strlen(u_sf_filename) == 0) { (void) strcpy(u_sf_filename, DEF_SF_FILE); } diff --git a/targets/Makefile.common b/targets/Makefile.common index 042a36bf45..ac0771770b 100644 --- a/targets/Makefile.common +++ b/targets/Makefile.common @@ -86,7 +86,6 @@ endif ifeq ($(ENABLE_ITTI),1) COMMON_CFLAGS += -DENABLE_ITTI -COMMON_CFLAGS += -DUSER_MODE COMMON_CFLAGS += -I$(OPENAIR1_DIR) COMMON_CFLAGS += -I$(OPENAIR2_DIR)/NAS COMMON_CFLAGS += $(L2_incl) diff --git a/targets/PROJECTS/E-MBMS/build_all.bash b/targets/PROJECTS/E-MBMS/build_all.bash index 0cbece916e..bac9b33736 100755 --- a/targets/PROJECTS/E-MBMS/build_all.bash +++ b/targets/PROJECTS/E-MBMS/build_all.bash @@ -61,8 +61,8 @@ echo_success "\n###############################" echo_success "# COMPILE oaisim" echo_success "###############################" cd $OPENAIR_TARGETS/SIMU/USER -echo_success "Executing: make oaisim NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 USER_MODE=1 OPENAIR2=1 Rel10=1 -j`grep -c ^processor /proc/cpuinfo `" -make oaisim NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 USER_MODE=1 OPENAIR2=1 Rel10=1 -j`grep -c ^processor /proc/cpuinfo ` +echo_success "Executing: make oaisim NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 OPENAIR2=1 Rel10=1 -j`grep -c ^processor /proc/cpuinfo `" +make oaisim NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 OPENAIR2=1 Rel10=1 -j`grep -c ^processor /proc/cpuinfo ` if [[ $? -eq 2 ]] ; then exit 1 fi diff --git a/targets/RT/USER/Makefile b/targets/RT/USER/Makefile index 8c413d4e2e..ae5e006d06 100644 --- a/targets/RT/USER/Makefile +++ b/targets/RT/USER/Makefile @@ -178,7 +178,7 @@ ifdef SMBV CFLAGS += -DSMBV endif -CFLAGS += -DPHYSIM -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 +CFLAGS += -DPHYSIM -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 CFLAGS += -DOPENAIR_LTE -DENABLE_FXP -DOPENAIR1 #-DDLSCH_THREAD #-DULSCH_THREAD diff --git a/targets/RT/USER/Makefile.agilent b/targets/RT/USER/Makefile.agilent index 061c15a31c..31dd3b6e7f 100644 --- a/targets/RT/USER/Makefile.agilent +++ b/targets/RT/USER/Makefile.agilent @@ -90,7 +90,7 @@ ifdef SMBV CFLAGS += -DSMBV endif -CFLAGS += -DPHYSIM -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 +CFLAGS += -DPHYSIM -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 CFLAGS += -DOPENAIR_LTE -DENABLE_FXP -DOPENAIR1 -DDLSCH_THREAD #-DULSCH_THREAD #only for CBMIMO1 @@ -143,7 +143,7 @@ ifdef USE_MME include $(OPENAIR2_DIR)/S1AP/MESSAGES/Makefile.inc CFLAGS += -DENABLE_USE_MME -DENB_MODE LDFLAGS += -lsctp - CFLAGS_S1AP += -DENB_MODE -DENABLE_USE_MME -DEMIT_ASN_DEBUG=1 -DUSER_MODE + CFLAGS_S1AP += -DENB_MODE -DENABLE_USE_MME -DEMIT_ASN_DEBUG=1 S1AP_BUILT_OBJS += $(S1AP_OBJS) $(addprefix $(OPENAIR2_DIR)/S1AP/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES)) S1AP_BUILT_OBJS += $(OPENAIR3_DIR)/OPENAIRMME/SCTP/sctp_primitives_client.o endif diff --git a/targets/SIMU/USER/Makefile b/targets/SIMU/USER/Makefile index 7de5f9382f..e48b4b62ad 100644 --- a/targets/SIMU/USER/Makefile +++ b/targets/SIMU/USER/Makefile @@ -29,7 +29,7 @@ endif CFLAGS += -Wpointer-sign -CFLAGS += -DUSER_MODE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 $(CPUFLAGS) -I/usr/include/X11 #-Wno-packed-bitfield-compat +CFLAGS += -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 $(CPUFLAGS) -I/usr/include/X11 #-Wno-packed-bitfield-compat ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c index 778f250a78..852b764ed7 100644 --- a/targets/SIMU/USER/oaisim_functions.c +++ b/targets/SIMU/USER/oaisim_functions.c @@ -1566,7 +1566,7 @@ void update_ocm() void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime) { -#if defined(USER_MODE) && defined(OAI_EMU) +#if defined(OAI_EMU) //int rrc_state=0; @@ -1710,7 +1710,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime) void update_otg_UE(module_id_t ue_mod_idP, unsigned int ctime) { -#if defined(USER_MODE) && defined(OAI_EMU) +#if defined(OAI_EMU) int app_id; if (oai_emulation.info.otg_enabled ==1 ) { diff --git a/targets/TEST/AT_COMMANDS/Makefile b/targets/TEST/AT_COMMANDS/Makefile index 2939b30c01..41d079bbcb 100755 --- a/targets/TEST/AT_COMMANDS/Makefile +++ b/targets/TEST/AT_COMMANDS/Makefile @@ -6,7 +6,7 @@ OPENAIR2_TOP = $(OPENAIR2_DIR) OPENAIR3_TOP = $(OPENAIR3_DIR) OPENAIR3 = $(OPENAIR3_DIR) -CFLAGS += -m32 -DPHYSIM -DNODE_RG -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 +CFLAGS += -m32 -DPHYSIM -DNODE_RG -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES diff --git a/targets/TEST/OAI/case01.py b/targets/TEST/OAI/case01.py index cdc3bd9eb4..9595f7e35d 100644 --- a/targets/TEST/OAI/case01.py +++ b/targets/TEST/OAI/case01.py @@ -246,7 +246,7 @@ def execute(oai, user, pw, host, logfile,logdir,debug,timeout): log.start() test = '14' name = 'Compile oai.rel8.itti.ral.make' - conf = 'make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 USER_MODE=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel8=1' + conf = 'make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel8=1' trace = logdir + '/log_' + case + test + '.txt;' tee = ' 2>&1 | tee ' + trace diag = 'check the compilation errors for ITTI Rel8' @@ -254,7 +254,7 @@ def execute(oai, user, pw, host, logfile,logdir,debug,timeout): oai.send('make cleanall;') oai.send('make cleanasn1;') oai.send('rm -f ./oaisim.rel8.itti.ral.'+host) - oai.send_expect_false('make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 USER_MODE=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel8=1 -j4' + tee, makerr1, timeout) + oai.send_expect_false('make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel8=1 -j4' + tee, makerr1, timeout) oai.send('cp ./oaisim ./oaisim.rel8.itti.ral.'+host) except log.err, e: log.fail(case, test, name, conf, e.value, diag, logfile,trace) @@ -265,7 +265,7 @@ def execute(oai, user, pw, host, logfile,logdir,debug,timeout): log.start() test = '15' name = 'Compile oai.rel10.itti.ral.make' - conf = 'make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 USER_MODE=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel10=1' + conf = 'make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel10=1' trace = logdir + '/log_' + case + test + '.txt;' tee = ' 2>&1 | tee ' + trace diag = 'check the compilation errors for ITTI Rel10' @@ -273,7 +273,7 @@ def execute(oai, user, pw, host, logfile,logdir,debug,timeout): oai.send('make cleanall;') oai.send('make cleanasn1;') oai.send('rm -f ./oaisim.rel10.itti.ral.'+host) - oai.send_expect_false('make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 USER_MODE=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel10=1 -j4' + tee, makerr1, timeout) + oai.send_expect_false('make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel10=1 -j4' + tee, makerr1, timeout) oai.send('cp ./oaisim ./oaisim.rel10.itti.ral.'+host) except log.err, e: log.fail(case, test, name, conf, e.value, diag, logfile,trace) diff --git a/targets/TEST/PACKET_TRACER/Makefile b/targets/TEST/PACKET_TRACER/Makefile index 46fa86037c..93e67bc9e2 100755 --- a/targets/TEST/PACKET_TRACER/Makefile +++ b/targets/TEST/PACKET_TRACER/Makefile @@ -6,7 +6,7 @@ OPENAIR2_TOP = $(OPENAIR2_DIR) OPENAIR3_TOP = $(OPENAIR3_DIR) OPENAIR3 = $(OPENAIR3_DIR) -CFLAGS += -m32 -DPHYSIM -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -I/usr/include/X11 +CFLAGS += -m32 -DPHYSIM -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -I/usr/include/X11 ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES diff --git a/targets/TEST/PDCP/Makefile b/targets/TEST/PDCP/Makefile index 66af847af5..12193cbb99 100755 --- a/targets/TEST/PDCP/Makefile +++ b/targets/TEST/PDCP/Makefile @@ -8,7 +8,7 @@ OPENAIR3 = $(OPENAIR3_DIR) EXE_FILE_NAME = test_pdcp -CFLAGS += -m32 -DPHYSIM -DNODE_RG -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 +CFLAGS += -m32 -DPHYSIM -DNODE_RG -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES diff --git a/targets/TEST/PDCP/with_rlc/Makefile.data_bearer b/targets/TEST/PDCP/with_rlc/Makefile.data_bearer index 00f07c1b92..495dcda572 100755 --- a/targets/TEST/PDCP/with_rlc/Makefile.data_bearer +++ b/targets/TEST/PDCP/with_rlc/Makefile.data_bearer @@ -8,7 +8,7 @@ OPENAIR3 = $(OPENAIR3_DIR) EXE_FILE_NAME = test_pdcp_rlc -CFLAGS += -m32 -DPHYSIM -DNODE_RG -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 +CFLAGS += -m32 -DPHYSIM -DNODE_RG -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES diff --git a/targets/TEST/RLC_AM_V9.3.0/Makefile b/targets/TEST/RLC_AM_V9.3.0/Makefile index 9c807cd826..68f520b31d 100755 --- a/targets/TEST/RLC_AM_V9.3.0/Makefile +++ b/targets/TEST/RLC_AM_V9.3.0/Makefile @@ -8,7 +8,7 @@ OPENAIR2_TOP = $(OPENAIR2_DIR) OPENAIR3_TOP = $(OPENAIR3_DIR) OPENAIR3 = $(OPENAIR3_DIR) -CFLAGS += -m32 -DUSER_MODE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -I/usr/include/X11 +CFLAGS += -m32 -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -I/usr/include/X11 ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES diff --git a/targets/TEST/RLC_UM_V9.3.0/Makefile b/targets/TEST/RLC_UM_V9.3.0/Makefile index b01ea156f4..91ad44e08b 100755 --- a/targets/TEST/RLC_UM_V9.3.0/Makefile +++ b/targets/TEST/RLC_UM_V9.3.0/Makefile @@ -8,7 +8,7 @@ OPENAIR2_TOP = $(OPENAIR2_DIR) OPENAIR3_TOP = $(OPENAIR3_DIR) OPENAIR3 = $(OPENAIR3_DIR) -CFLAGS += -m32 -DUSER_MODE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -I/usr/include/X11 +CFLAGS += -m32 -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -I/usr/include/X11 ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES -- GitLab