Commit da83df84 authored by knopp's avatar knopp

Merge remote-tracking branch 'origin/develop' into dlsim-ulsim-fix

Conflicts:
	openair1/PHY/INIT/lte_init.c
parents a1dc9972 5357ef20
...@@ -599,8 +599,6 @@ add_boolean_option(MESSAGE_CHART_GENERATOR False "For generating sequenc ...@@ -599,8 +599,6 @@ add_boolean_option(MESSAGE_CHART_GENERATOR False "For generating sequenc
add_boolean_option(MESSAGE_CHART_GENERATOR_RLC_MAC False "trace RLC-MAC exchanges in sequence diagrams") add_boolean_option(MESSAGE_CHART_GENERATOR_RLC_MAC False "trace RLC-MAC exchanges in sequence diagrams")
add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchanges in sequence diagrams") add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchanges in sequence diagrams")
add_boolean_option(FLEXRAN_AGENT_SB_IF False "enable FlexRAN agent to inteface with a SDN controller")
######################## ########################
# Include order # Include order
########################## ##########################
...@@ -766,6 +764,8 @@ include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/") ...@@ -766,6 +764,8 @@ include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/")
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS") include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS")
include_directories("${OPENAIR2_DIR}/ENB_APP") include_directories("${OPENAIR2_DIR}/ENB_APP")
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC") include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC")
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC")
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP")
include_directories("${OPENAIR2_DIR}/UTIL/OSA") include_directories("${OPENAIR2_DIR}/UTIL/OSA")
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds6.1.1/liblfds611/inc") include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds6.1.1/liblfds611/inc")
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds7.0.0/liblfds700/inc") include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds7.0.0/liblfds700/inc")
...@@ -787,92 +787,94 @@ include_directories("${OPENAIR_DIR}") ...@@ -787,92 +787,94 @@ include_directories("${OPENAIR_DIR}")
# Utilities Library # Utilities Library
################ ################
if (FLEXRAN_AGENT_SB_IF) # set the version of protobuf messages, V3 not supported yet
# set the version of protobuf messages, V3 not supported yet add_list1_option(FLPT_VERSION V2 "FLPT MSG protobuf grammar version" V2 V3)
add_list1_option(FLPT_VERSION V2 "FLPT MSG protobuf grammar version" V2 V3)
if (${FLPT_VERSION} STREQUAL "V2")
if (${FLPT_VERSION} STREQUAL "V2") set (FLPTDIR V2)
set (FLPTDIR V2) elseif (${FLPT_VERSION} STREQUAL "V3")
elseif (${FLPT_VERSION} STREQUAL "V3") set (FLPTDIR V3)
set (FLPTDIR V3) endif(${FLPT_VERSION} STREQUAL "V2")
endif(${FLPT_VERSION} STREQUAL "V2")
set(FLPT_MSG_DIR ${OPENAIR2_DIR}/ENB_APP/MESSAGES/${FLPTDIR} )
set(FLPT_MSG_DIR ${OPENAIR2_DIR}/ENB_APP/MESSAGES/${FLPTDIR} ) set(FLPT_MSG_FILES
set(FLPT_MSG_FILES ${FLPT_MSG_DIR}/header.proto
${FLPT_MSG_DIR}/header.proto ${FLPT_MSG_DIR}/flexran.proto
${FLPT_MSG_DIR}/flexran.proto ${FLPT_MSG_DIR}/stats_common.proto
${FLPT_MSG_DIR}/stats_common.proto ${FLPT_MSG_DIR}/stats_messages.proto
${FLPT_MSG_DIR}/stats_messages.proto ${FLPT_MSG_DIR}/time_common.proto
${FLPT_MSG_DIR}/time_common.proto ${FLPT_MSG_DIR}/controller_commands.proto
${FLPT_MSG_DIR}/controller_commands.proto ${FLPT_MSG_DIR}/mac_primitives.proto
${FLPT_MSG_DIR}/mac_primitives.proto ${FLPT_MSG_DIR}/config_messages.proto
${FLPT_MSG_DIR}/config_messages.proto ${FLPT_MSG_DIR}/config_common.proto
${FLPT_MSG_DIR}/config_common.proto ${FLPT_MSG_DIR}/control_delegation.proto
${FLPT_MSG_DIR}/control_delegation.proto )
)
set(FLPT_C_DIR ${protobuf_generated_dir}/${FLPTDIR}) set(FLPT_C_DIR ${protobuf_generated_dir}/${FLPTDIR})
#message("calling protoc_call=${protoc_call} FLPT_C_DIR=${FLPT_C_DIR} FLPT_MSG_FILES=${FLPT_MSG_FILES}") #message("calling protoc_call=${protoc_call} FLPT_C_DIR=${FLPT_C_DIR} FLPT_MSG_FILES=${FLPT_MSG_FILES}")
execute_process(COMMAND ${protoc_call} ${FLPT_C_DIR} ${FLPT_MSG_DIR} ${FLPT_MSG_FILES}) execute_process(COMMAND ${protoc_call} ${FLPT_C_DIR} ${FLPT_MSG_DIR} ${FLPT_MSG_FILES})
file(GLOB FLPT_source ${FLPT_C_DIR}/*.c) file(GLOB FLPT_source ${FLPT_C_DIR}/*.c)
set(FLPT_OAI_generated set(FLPT_OAI_generated
${FLPT_C_DIR}/header.pb-c.c ${FLPT_C_DIR}/header.pb-c.c
${FLPT_C_DIR}/flexran.pb-c.c ${FLPT_C_DIR}/flexran.pb-c.c
${FLPT_C_DIR}/stats_common.pb-c.c ${FLPT_C_DIR}/stats_common.pb-c.c
${FLPT_C_DIR}/stats_messages.pb-c.c ${FLPT_C_DIR}/stats_messages.pb-c.c
${FLPT_C_DIR}/time_common.pb-c.c ${FLPT_C_DIR}/time_common.pb-c.c
${FLPT_C_DIR}/controller_commands.pb-c.c ${FLPT_C_DIR}/controller_commands.pb-c.c
${FLPT_C_DIR}/mac_primitives.pb-c.c ${FLPT_C_DIR}/mac_primitives.pb-c.c
${FLPT_C_DIR}/config_messages.pb-c.c ${FLPT_C_DIR}/config_messages.pb-c.c
${FLPT_C_DIR}/config_common.pb-c.c ${FLPT_C_DIR}/config_common.pb-c.c
${FLPT_C_DIR}/control_delegation.pb-c.c ${FLPT_C_DIR}/control_delegation.pb-c.c
) )
file(GLOB flpt_h ${FLPT_C_DIR}/*.h) file(GLOB flpt_h ${FLPT_C_DIR}/*.h)
set(flpt_h ${flpt_h} ) set(flpt_h ${flpt_h} )
add_library(FLPT_MSG add_library(FLPT_MSG
${FLPT_OAI_generated} ${FLPT_OAI_generated}
${FLPT_source} ${FLPT_source}
) )
set(FLPT_MSG_LIB FLPT_MSG) set(FLPT_MSG_LIB FLPT_MSG)
#message("prpt c dir is : ${FLPT_C_DIR}") #message("prpt c dir is : ${FLPT_C_DIR}")
include_directories (${FLPT_C_DIR}) include_directories (${FLPT_C_DIR})
add_library(ASYNC_IF add_library(ASYNC_IF
${OPENAIR2_DIR}/UTIL/ASYNC_IF/socket_link.c ${OPENAIR2_DIR}/UTIL/ASYNC_IF/socket_link.c
${OPENAIR2_DIR}/UTIL/ASYNC_IF/link_manager.c ${OPENAIR2_DIR}/UTIL/ASYNC_IF/link_manager.c
${OPENAIR2_DIR}/UTIL/ASYNC_IF/message_queue.c ${OPENAIR2_DIR}/UTIL/ASYNC_IF/message_queue.c
${OPENAIR2_DIR}/UTIL/ASYNC_IF/ringbuffer_queue.c ${OPENAIR2_DIR}/UTIL/ASYNC_IF/ringbuffer_queue.c
) )
set(ASYNC_IF_LIB ASYNC_IF) set(ASYNC_IF_LIB ASYNC_IF)
include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF) include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF)
add_library(FLEXRAN_AGENT add_library(FLEXRAN_AGENT
${OPENAIR2_DIR}/ENB_APP/flexran_agent_handler.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_handler.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_common.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_common.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_common_internal.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api.c
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_timer.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_common_internal.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_task_manager.c ${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_net_comm.c ${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_async.c ${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent.c
) ${OPENAIR2_DIR}/ENB_APP/flexran_agent_task_manager.c
set(FLEXRAN_AGENT_LIB FLEXRAN_AGENT) ${OPENAIR2_DIR}/ENB_APP/flexran_agent_net_comm.c
#include_directories(${OPENAIR2_DIR}/ENB_APP) ${OPENAIR2_DIR}/ENB_APP/flexran_agent_async.c
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
)
set(FLEXRAN_AGENT_LIB FLEXRAN_AGENT)
#include_directories(${OPENAIR2_DIR}/ENB_APP)
set(PROTOBUF_LIB "protobuf-c") set(PROTOBUF_LIB "protobuf-c")
FIND_PATH(LIBYAML_INCLUDE_DIR NAMES yaml.h) FIND_PATH(LIBYAML_INCLUDE_DIR NAMES yaml.h)
FIND_LIBRARY(LIBYAML_LIBRARIES NAMES yaml libyaml) FIND_LIBRARY(LIBYAML_LIBRARIES NAMES yaml libyaml)
INCLUDE(FindPackageHandleStandardArgs) INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Yaml DEFAULT_MSG LIBYAML_LIBRARIES LIBYAML_INCLUDE_DIR) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Yaml DEFAULT_MSG LIBYAML_LIBRARIES LIBYAML_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBYAML_INCLUDE_DIR LIBYAML_LIBRARIES) MARK_AS_ADVANCED(LIBYAML_INCLUDE_DIR LIBYAML_LIBRARIES)
#set(PROTOBUF_LIB "protobuf") #for Cpp #set(PROTOBUF_LIB "protobuf") #for Cpp
endif()
add_library(HASHTABLE add_library(HASHTABLE
...@@ -1369,17 +1371,6 @@ set (MAC_SRC_UE ...@@ -1369,17 +1371,6 @@ set (MAC_SRC_UE
${MAC_DIR}/config_ue.c ${MAC_DIR}/config_ue.c
) )
if (FLEXRAN_AGENT_SB_IF)
set (MAC_SRC ${MAC_SRC}
${MAC_DIR}/flexran_agent_scheduler_dlsch_ue.c
${MAC_DIR}/flexran_agent_scheduler_dataplane.c
${MAC_DIR}/flexran_agent_scheduler_dlsch_ue_remote.c
)
endif()
set (ENB_APP_SRC set (ENB_APP_SRC
${OPENAIR2_DIR}/ENB_APP/enb_app.c ${OPENAIR2_DIR}/ENB_APP/enb_app.c
${OPENAIR2_DIR}/ENB_APP/enb_config.c ${OPENAIR2_DIR}/ENB_APP/enb_config.c
...@@ -1399,14 +1390,6 @@ add_library(L2_UE ...@@ -1399,14 +1390,6 @@ add_library(L2_UE
include_directories(${NFAPI_USER_DIR}) include_directories(${NFAPI_USER_DIR})
if (FLEXRAN_AGENT_SB_IF)
#Test for adding a shared library
add_library(default_sched SHARED ${MAC_DIR}/flexran_agent_scheduler_dlsch_ue.c)
add_library(remote_sched SHARED ${MAC_DIR}/flexran_agent_scheduler_dlsch_ue_remote.c)
endif()
# L3 Libs # L3 Libs
########################## ##########################
...@@ -1880,6 +1863,16 @@ if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h") ...@@ -1880,6 +1863,16 @@ if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
endif() endif()
list(APPEND ATLAS_LIBRARIES lapack) list(APPEND ATLAS_LIBRARIES lapack)
# for ubuntu 17.10, directories are different
elseif(EXISTS "/usr/include/x86_64-linux-gnu/cblas.h")
include_directories("/usr/include/x86_64-linux-gnu")
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
list(APPEND ATLAS_LIBRARIES cblas)
list(APPEND ATLAS_LIBRARIES atlas)
list(APPEND ATLAS_LIBRARIES lapack)
else() else()
message("No Blas/Atlas libs found, some targets will fail") message("No Blas/Atlas libs found, some targets will fail")
endif() endif()
...@@ -2065,7 +2058,6 @@ add_executable(oaisim ...@@ -2065,7 +2058,6 @@ add_executable(oaisim
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${GTPU_need_ITTI}
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c ${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
${XFORMS_SOURCE} ${XFORMS_SOURCE}
${T_SOURCE} ${T_SOURCE}
...@@ -2077,14 +2069,13 @@ add_executable(oaisim ...@@ -2077,14 +2069,13 @@ add_executable(oaisim
target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER) target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim target_link_libraries (oaisim
-Wl,-ldl,--start-group -Wl,-ldl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_UE_LIB PHY_UE LFDS L2 ${MSC_LIB} LIB_NAS_UE SIMU SECU_OSA ${ITTI_LIB} ${MIH_LIB} RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_UE_LIB PHY_UE LFDS L2_UE ${MSC_LIB} LIB_NAS_UE SIMU SECU_OSA ${ITTI_LIB} ${MIH_LIB}
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
NFAPI_USER_LIB
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (oaisim ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES}) target_link_libraries (oaisim ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
target_link_libraries (oaisim pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp z target_link_libraries (oaisim pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp z
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES} ) ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
#Force link with forms, regardless XFORMS option #Force link with forms, regardless XFORMS option
target_link_libraries (oaisim forms) target_link_libraries (oaisim forms)
target_link_libraries (oaisim ${T_LIB}) target_link_libraries (oaisim ${T_LIB})
...@@ -2298,7 +2289,7 @@ add_custom_command ( ...@@ -2298,7 +2289,7 @@ add_custom_command (
# retrieve the compiler options to send it to gccxml # retrieve the compiler options to send it to gccxml
get_directory_property(DirDefs COMPILE_DEFINITIONS ) get_directory_property(DirDefs COMPILE_DEFINITIONS )
foreach( d ${DirDefs} ) foreach( d ${DirDefs} )
set(module_cc_opt_tmp "${module_cc_opt_tmp} -D${d}") set(module_cc_opt "${module_cc_opt} -D${d}")
endforeach() endforeach()
get_directory_property( DirDefs INCLUDE_DIRECTORIES ) get_directory_property( DirDefs INCLUDE_DIRECTORIES )
foreach( d ${DirDefs} ) foreach( d ${DirDefs} )
......
...@@ -42,7 +42,6 @@ conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf ...@@ -42,7 +42,6 @@ conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
MSC_GEN="False" MSC_GEN="False"
XFORMS="True" XFORMS="True"
FLEXRAN_AGENT_SB_IF="True"
PRINT_STATS="False" PRINT_STATS="False"
VCD_TIMING="False" VCD_TIMING="False"
DEADLINE_SCHEDULER_FLAG_USER="False" DEADLINE_SCHEDULER_FLAG_USER="False"
...@@ -100,8 +99,6 @@ Options ...@@ -100,8 +99,6 @@ Options
Specify conf_nvram_path (default \"$conf_nvram_path\") Specify conf_nvram_path (default \"$conf_nvram_path\")
--UE-gen-nvram [output path] --UE-gen-nvram [output path]
Specify gen_nvram_path (default \"$gen_nvram_path\") Specify gen_nvram_path (default \"$gen_nvram_path\")
-a | --agent
Enables agent for software-defined control of the eNB
-r | --3gpp-release -r | --3gpp-release
default is Rel14, default is Rel14,
Rel8 limits the implementation to 3GPP Release 8 version Rel8 limits the implementation to 3GPP Release 8 version
...@@ -204,8 +201,7 @@ function main() { ...@@ -204,8 +201,7 @@ function main() {
echo_info "Will compile eNB" echo_info "Will compile eNB"
shift;; shift;;
-a | --agent) -a | --agent)
FLEXRAN_AGENT=1 echo_info "FlexRAN support is always compiled into the eNB"
echo_info "Will compile eNB with agent support"
shift;; shift;;
--UE) --UE)
UE=1 UE=1
...@@ -465,11 +461,9 @@ function main() { ...@@ -465,11 +461,9 @@ function main() {
flash_firmware_bladerf flash_firmware_bladerf
fi fi
fi fi
if [ "$FLEXRAN_AGENT" == "1" ] ; then echo_info "installing protobuf/protobuf-c for flexran agent support"
echo_info "installing protobuf/protobuf-c for flexran agent support" install_protobuf_from_source
install_protobuf_from_source install_protobuf_c_from_source
install_protobuf_c_from_source
fi
fi fi
if [ "$INSTALL_OPTIONAL" = "1" ] ; then if [ "$INSTALL_OPTIONAL" = "1" ] ; then
...@@ -517,9 +511,6 @@ function main() { ...@@ -517,9 +511,6 @@ function main() {
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
if [ "$FLEXRAN_AGENT" = "1" ] ; then
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
fi
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
...@@ -679,9 +670,6 @@ function main() { ...@@ -679,9 +670,6 @@ function main() {
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
if [ "$FLEXRAN_AGENT" = "1" ] ; then
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
fi
echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
...@@ -762,9 +750,6 @@ function main() { ...@@ -762,9 +750,6 @@ function main() {
cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
if [ "$FLEXRAN_AGENT" = "1" ] ; then
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
fi
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
#include "PHY/impl_defs_lte.h" #include "PHY/impl_defs_lte.h"
#include "RRC/LITE/defs.h" #include "RRC/LITE/defs.h"
#include "flexran_agent_defs.h"
#include "gtpv1u.h" #include "gtpv1u.h"
#include "NwGtpv1u.h" #include "NwGtpv1u.h"
...@@ -64,6 +65,8 @@ typedef struct { ...@@ -64,6 +65,8 @@ typedef struct {
int *nb_L1_CC; int *nb_L1_CC;
/// Number of RU instances in this node /// Number of RU instances in this node
int nb_RU; int nb_RU;
/// FlexRAN context variables
flexran_agent_info_t **flexran;
/// eNB context variables /// eNB context variables
struct PHY_VARS_eNB_s ***eNB; struct PHY_VARS_eNB_s ***eNB;
/// RRC context variables /// RRC context variables
......
...@@ -637,6 +637,19 @@ void itti_mark_task_ready(task_id_t task_id) ...@@ -637,6 +637,19 @@ void itti_mark_task_ready(task_id_t task_id)
void itti_exit_task(void) void itti_exit_task(void)
{ {
task_id_t task_id = itti_get_current_task_id();
thread_id_t thread_id = TASK_GET_THREAD_ID(task_id);
#if defined(OAI_EMU) || defined(RTAI)
if (task_id > TASK_UNKNOWN) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_RECV_MSG,
__sync_and_and_fetch (&itti_desc.vcd_receive_msg, ~(1L << task_id)));
}
#endif
itti_desc.threads[thread_id].task_state = TASK_STATE_NOT_CONFIGURED;
itti_desc.created_tasks--;
ITTI_DEBUG(ITTI_DEBUG_EXIT, "Thread for task %s (%d) exits\n", itti_get_task_name(task_id), task_id);
pthread_exit (NULL); pthread_exit (NULL);
} }
......
...@@ -27,7 +27,18 @@ ...@@ -27,7 +27,18 @@
#ifndef _ITTI_TYPES_H_ #ifndef _ITTI_TYPES_H_
#define _ITTI_TYPES_H_ #define _ITTI_TYPES_H_
#include <stdint.h> /* The current file is included in the ue_ip.ko compilation.
* For it to work we need to include linux/types.h and
* not stdint.h.
* A solution to this problem is to use #ifndef __KERNEL__.
* Maybe a better solution would be to clean things up
* so that ue_ip.ko does not include the current file.
*/
#ifndef __KERNEL__
# include <stdint.h>
#else
# include <linux/types.h>
#endif
#define CHARS_TO_UINT32(c1, c2, c3, c4) (((c4) << 24) | ((c3) << 16) | ((c2) << 8) | (c1)) #define CHARS_TO_UINT32(c1, c2, c3, c4) (((c4) << 24) | ((c3) << 16) | ((c2) << 8) | (c1))
......
...@@ -99,6 +99,7 @@ void *msc_task(void *args_p) ...@@ -99,6 +99,7 @@ void *msc_task(void *args_p)
break; break;
case TERMINATE_MESSAGE: { case TERMINATE_MESSAGE: {
fprintf(stderr, " *** Exiting MSC thread\n");
timer_remove(timer_id); timer_remove(timer_id);
msc_end(); msc_end();
itti_exit_task(); itti_exit_task();
......
...@@ -830,10 +830,10 @@ void free_td16avx2(void) ...@@ -830,10 +830,10 @@ void free_td16avx2(void)
int ind; int ind;
for (ind=0; ind<188; ind++) { for (ind=0; ind<188; ind++) {
free(pi2tab16avx2[ind]); free_and_zero(pi2tab16avx2[ind]);
free(pi5tab16avx2[ind]); free_and_zero(pi5tab16avx2[ind]);
free(pi4tab16avx2[ind]); free_and_zero(pi4tab16avx2[ind]);
free(pi6tab16avx2[ind]); free_and_zero(pi6tab16avx2[ind]);
} }
} }
......
...@@ -1907,6 +1907,18 @@ void compute_ext(llr_t* alpha,llr_t* beta,llr_t* m_11,llr_t* m_10,llr_t* ext, ll ...@@ -1907,6 +1907,18 @@ void compute_ext(llr_t* alpha,llr_t* beta,llr_t* m_11,llr_t* m_10,llr_t* ext, ll
//int pi2[n],pi3[n+8],pi5[n+8],pi4[n+8],pi6[n+8], //int pi2[n],pi3[n+8],pi5[n+8],pi4[n+8],pi6[n+8],
int *pi2tab[188],*pi5tab[188],*pi4tab[188],*pi6tab[188]; int *pi2tab[188],*pi5tab[188],*pi4tab[188],*pi6tab[188];
void free_td()
{
int ind;
for (ind = 0; ind < 188; ind++) {
free_and_zero(pi2tab[ind]);
free_and_zero(pi5tab[ind]);
free_and_zero(pi4tab[ind]);
free_and_zero(pi6tab[ind]);
}
}
void init_td() void init_td()
{ {
......
...@@ -1117,10 +1117,10 @@ void free_td16(void) ...@@ -1117,10 +1117,10 @@ void free_td16(void)
int ind; int ind;
for (ind=0; ind<188; ind++) { for (ind=0; ind<188; ind++) {
free(pi2tab16[ind]); free_and_zero(pi2tab16[ind]);
free(pi5tab16[ind]); free_and_zero(pi5tab16[ind]);
free(pi4tab16[ind]); free_and_zero(pi4tab16[ind]);
free(pi6tab16[ind]); free_and_zero(pi6tab16[ind]);
} }
} }
......
...@@ -838,10 +838,10 @@ void free_td8(void) ...@@ -838,10 +838,10 @@ void free_td8(void)
int ind; int ind;
for (ind=0; ind<188; ind++) { for (ind=0; ind<188; ind++) {
free(pi2tab8[ind]); free_and_zero(pi2tab8[ind]);