Commit 014010e5 authored by gauthier's avatar gauthier

modified version of message chart generator (msc), now events are stored in a...

modified version of message chart generator (msc), now events are stored in a contention-free and concurency-free collection (lfds611), resulting in a uniq dump file per executable.
MSC is using an ITTI timer (bad dependancy for executables that are not yet "ITTIzed").


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7620 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 738aadeb
......@@ -398,7 +398,7 @@ add_boolean_option(OAISIM False "specific to oaisim")
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
add_boolean_option(USE_MME False "this flag is used only one time in lte-softmodem.c")
add_list_string_option(PACKAGE_NAME "NotDefined" "As per attribute name")
add_boolean_option(MESSAGE_CHART_GENERATOR True "For generating sequence diagrams")
add_boolean_option(MESSAGE_CHART_GENERATOR False "For generating 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")
########################
......@@ -1327,7 +1327,7 @@ set(lfds ${OPENAIR2_DIR}/UTIL/LFDS/liblfds6.1.1/liblfds611/src/)
file(GLOB lfds_queue ${lfds}/lfds611_queue/*.c)
file(GLOB lfds_ring ${lfds}/lfds611_ringbuffer/*.c)
file(GLOB lfds_slist ${lfds}/lfds611_slist/*.c)
file(GLOB lfds_stack ${lfds}/lfds611_stack/*.c/)
file(GLOB lfds_stack ${lfds}/lfds611_stack/*.c)
file(GLOB lfds_freelist ${lfds}/lfds611_freelist/*.c)
include_directories(${lfds})
......@@ -1462,16 +1462,21 @@ add_executable(lte-softmodem
${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM}
)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} ${NAS_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
else (MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${RAL_LIB} ${NAS_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
endif(MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES})
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (lte-softmodem MSC)
endif()
# EPC is ??? nodes implementation in one process
################################
......@@ -1483,15 +1488,21 @@ add_executable(mme_gw
${OPENAIRCN_DIR}/SCTP/sctp_primitives_server.c
${OPENAIRCN_DIR}/NAS/nas_main.c
)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (mme_gw
-Wl,--start-group
NAS S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A SGW MME_APP LFDS MSC ${ITTI_LIB} CN_UTILS HASHTABLE
-Wl,--end-group
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
)
else (MESSAGE_CHART_GENERATOR)
target_link_libraries (mme_gw
-Wl,--start-group
NAS S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A SGW MME_APP LFDS ${ITTI_LIB} CN_UTILS HASHTABLE
-Wl,--end-group
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (mme_gw MSC)
endif()
endif(MESSAGE_CHART_GENERATOR)
# Default parameters
# Does not work on simple install (fqdn in /etc/hosts 127.0.1.1)
......@@ -1572,15 +1583,21 @@ add_executable(oai_sgw
${OPENAIRCN_DIR}/OAI_SGW/oai_sgw_log.c
${OPENAIRCN_DIR}/OAI_SGW/oai_sgw.c
)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (oai_sgw
-Wl,--start-group
GTPV1U SECU_CN SECU_OSA S6A SGW CN_UTILS LFDS MSC ${ITTI_LIB}
-Wl,--end-group
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
)
else (MESSAGE_CHART_GENERATOR)
target_link_libraries (oai_sgw
-Wl,--start-group
GTPV1U SECU_CN SECU_OSA S6A SGW CN_UTILS LFDS ${ITTI_LIB}
-Wl,--end-group
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (oai_sgw MSC)
endif()
endif(MESSAGE_CHART_GENERATOR)
# USIM process
#################
......@@ -1632,18 +1649,23 @@ add_executable(oaisim
${XFORMS_SOURCE}
)
target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} ${NAS_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
else(MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${RAL_LIB} ${NAS_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
endif(MESSAGE_CHART_GENERATOR)
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 ${option_HW_lib}
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
#Force link with forms, regardless XFORMS option
target_link_libraries (oaisim forms)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim MSC)
endif()
# A all in one network simulator
......@@ -1668,18 +1690,22 @@ add_executable(oaisim_nos1
${XFORMS_SOURCE}
)
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim_nos1
-Wl,--start-group
RRC_LIB SECU_CN UTIL HASHTABLE UDP SCHED_LIB PHY LFDS MSC L2 ${RAL_LIB} ${NAS_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
else(MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim_nos1
-Wl,--start-group
RRC_LIB SECU_CN UTIL HASHTABLE UDP SCHED_LIB PHY LFDS L2 ${RAL_LIB} ${NAS_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
endif(MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
target_link_libraries (oaisim_nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib}
${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES})
#Force link with forms, regardless XFORMS option
target_link_libraries (oaisim_nos1 forms)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim_nos1 MSC)
endif()
# Unitary tests for each piece of L1: example, mbmssim is MBMS L1 simulator
......@@ -1721,13 +1747,21 @@ add_executable(test_s1c_mme
${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c.c
${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_scenario.h
${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_scenario1.c
${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_scenario.c
${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_scenario.h
${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_s1ap.c
${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_s1ap.h
${OPENAIR2_DIR}/ENB_APP/enb_config.c
${OPENAIR2_DIR}/ENB_APP/enb_config.h
${s1ap_h}
${OPENAIR2_DIR}/COMMON/commonDef.h
${OPENAIR2_DIR}/COMMON/messages_def.h
${OPENAIR2_DIR}/COMMON/messages_types.h
${OPENAIRCN_DIR}/S1AP/s1ap_eNB_defs.h
${S1AP_DIR}/s1ap_eNB_management_procedures.c
${OPENAIR_BIN_DIR}/messages_xml.h
)
target_link_libraries (test_s1c_mme
-Wl,--start-group SECU_CN S1AP_LIB S1AP_ENB SCTP_CLIENT UTIL LFDS ${ITTI_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
-Wl,--start-group SECU_CN S1AP_LIB SCTP_CLIENT UTIL LFDS ${ITTI_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
)
......@@ -1738,21 +1772,18 @@ target_link_libraries (test_s1c_mme
# ???
###########################
add_executable(oaisim_mme
${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIRCN_DIR}/OAISIM_MME/oai_mme_log.c
${OPENAIRCN_DIR}/OAISIM_MME/oaisim_mme.c
${OPENAIRCN_DIR}/NAS/nas_main.c
)
target_link_libraries (oaisim_mme
-Wl,--start-group
NAS S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A S11 SGW MME_APP LFDS MSC ${ITTI_LIB} CN_UTILS HASHTABLE
-Wl,--end-group
pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
)
if (MESSAGE_CHART_GENERATOR)
target_link_libraries (oaisim_mme MSC)
endif()
#add_executable(oaisim_mme
# ${OPENAIR_BIN_DIR}/messages_xml.h
# ${OPENAIRCN_DIR}/OAISIM_MME/oai_mme_log.c
# ${OPENAIRCN_DIR}/OAISIM_MME/oaisim_mme.c
# ${OPENAIRCN_DIR}/NAS/nas_main.c
#)
#target_link_libraries (oaisim_mme
# -Wl,--start-group
# NAS S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A S11 SGW MME_APP LFDS MSC ${ITTI_LIB} CN_UTILS HASHTABLE
# -Wl,--end-group
# pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
#)
##################################################
# Generated specific cases is not regular code
......
......@@ -15,11 +15,7 @@ set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_GTPU_IN_KERNEL False )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
set ( ENABLE_USE_PCAP_FOR_SGI False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
set ( ENABLE_VCD_FIFO True )
set ( ENB_MODE True )
set ( EPC_BUILD False )
......@@ -28,7 +24,6 @@ set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
set ( LINK_PDCP_TO_GTPV1U False )
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
......@@ -36,6 +31,9 @@ set ( LOG_NO_THREAD True )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
......
......@@ -15,11 +15,7 @@ set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_GTPU_IN_KERNEL False )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
set ( ENABLE_USE_PCAP_FOR_SGI False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
set ( ENABLE_VCD_FIFO True )
set ( ENB_MODE True )
set ( EPC_BUILD False )
......@@ -28,7 +24,6 @@ set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
set ( LINK_PDCP_TO_GTPV1U False )
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
......@@ -36,6 +31,9 @@ set ( LOG_NO_THREAD True )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
......
......@@ -15,11 +15,7 @@ set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_GTPU_IN_KERNEL False )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
set ( ENABLE_USE_PCAP_FOR_SGI False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
set ( ENABLE_VCD_FIFO True )
set ( ENB_MODE True )
set ( EPC_BUILD False )
......@@ -28,7 +24,6 @@ set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
set ( LINK_PDCP_TO_GTPV1U False )
set ( LINUX False )
set ( LINUX_LIST False )
set ( LOCALIZATION False )
......@@ -36,6 +31,9 @@ set ( LOG_NO_THREAD True )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
......
......@@ -10,4 +10,8 @@ set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE True)
set(MESSAGE_CHART_GENERATOR False)
set(MESSAGE_CHART_GENERATOR_RLC_MAC False)
set(MESSAGE_CHART_GENERATOR_PHY False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
......@@ -17,7 +17,7 @@ set(ENABLE_VCD_FIFO True)
set(HARD_RT False)
set(JUMBO_FRAME True)
set(LARGE_SCALE False)
set(LINK_PDCP_TO_GTPV1U False)
set(LINK_ENB_PDCP_TO_GTPV1U False)
set(LINUX_LIST False)
set(LINUX True)
set(LOCALIZATION False)
......@@ -25,6 +25,9 @@ set(LOG_NO_THREAD True)
set(LOWLATENCY False)
set(MAC_CONTEXT 1)
set(MAX_NUM_CCs 1)
set(MESSAGE_CHART_GENERATOR False )
set(MESSAGE_CHART_GENERATOR_RLC_MAC False )
set(MESSAGE_CHART_GENERATOR_PHY False )
set(MIH_C_MEDIEVAL_EXTENSIONS True)
set(MSG_PRINT False)
set(MU_RECEIVER False)
......
......@@ -15,11 +15,7 @@ set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_GTPU_IN_KERNEL False )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
set ( ENABLE_USE_PCAP_FOR_SGI False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
set ( ENABLE_VCD_FIFO True )
set ( ENB_MODE True )
set ( EPC_BUILD False )
......@@ -28,7 +24,6 @@ set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
set ( LINK_PDCP_TO_GTPV1U False )
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
......@@ -36,6 +31,9 @@ set ( LOG_NO_THREAD True )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
......
......@@ -17,7 +17,7 @@ set(ENABLE_VCD_FIFO True)
set(HARD_RT False)
set(JUMBO_FRAME True)
set(LARGE_SCALE False)
set(LINK_PDCP_TO_GTPV1U False)
set(LINK_ENB_PDCP_TO_GTPV1U False)
set(LINUX_LIST False)
set(LINUX True)
set(LOCALIZATION False)
......@@ -25,6 +25,9 @@ set(LOG_NO_THREAD True)
set(LOWLATENCY False)
set(MAC_CONTEXT 1)
set(MAX_NUM_CCs 1)
set(MESSAGE_CHART_GENERATOR False)
set(MESSAGE_CHART_GENERATOR_RLC_MAC False)
set(MESSAGE_CHART_GENERATOR_PHY False)
set(MIH_C_MEDIEVAL_EXTENSIONS True)
set(MSG_PRINT False)
set(MU_RECEIVER False)
......@@ -34,7 +37,6 @@ set(NAS_UE True)
set(NEW_FFT True)
set(NO_RRM True)
set(OAI_EMU True)
set(OAI_EMU True)
set(OAI_NW_DRIVER_TYPE_ETHERNET False)
set(OPENAIR1 False)
set(OPENAIR2 True)
......
......@@ -17,7 +17,7 @@ set(ENABLE_VCD_FIFO True)
set(HARD_RT False)
set(JUMBO_FRAME True)
set(LARGE_SCALE False)
set(LINK_PDCP_TO_GTPV1U False)
set(LINK_ENB_PDCP_TO_GTPV1U False)
set(LINUX_LIST False)
set(LINUX True)
set(LOCALIZATION False)
......
......@@ -15,11 +15,7 @@ set ( ENABLE_RAL True )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_GTPU_IN_KERNEL False )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
set ( ENABLE_USE_PCAP_FOR_SGI False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
set ( ENABLE_VCD_FIFO True )
set ( ENB_MODE True )
set ( EPC_BUILD False )
......@@ -28,7 +24,6 @@ set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
set ( LINK_PDCP_TO_GTPV1U False )
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
......@@ -36,6 +31,9 @@ set ( LOG_NO_THREAD True )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
......
......@@ -15,11 +15,7 @@ set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_GTPU_IN_KERNEL False )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_NETFILTER_FOR_SGI False )
set ( ENABLE_USE_PCAP_FOR_SGI False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False )
set ( ENABLE_VCD_FIFO True )
set ( ENB_MODE True )
set ( EPC_BUILD False )
......@@ -28,7 +24,6 @@ set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
set ( LINK_PDCP_TO_GTPV1U False )
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
......@@ -36,6 +31,9 @@ set ( LOG_NO_THREAD True )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS True )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
......
......@@ -459,13 +459,13 @@ function main() {
echo "set(RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_mme_build_oai/build
mkdir -p $DIR/oaisim_mme_build_oai/build
cd $DIR/oaisim_mme_build_oai/build
cmake ..
compilations \
oaisim_mme_build_oai oaisim_mme \
oaisim_mme $dbin/oaisim_mme.$REL
#[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_mme_build_oai/build
#mkdir -p $DIR/oaisim_mme_build_oai/build
#cd $DIR/oaisim_mme_build_oai/build
#cmake ..
#compilations \
# oaisim_mme_build_oai oaisim_mme \
# oaisim_mme $dbin/oaisim_mme.$REL
fi
# EPC compilation
......
......@@ -26,7 +26,7 @@ set ( FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT False)
set ( HARD_RT False )
set ( JUMBO_FRAME False )
set ( LARGE_SCALE False )
set ( LINK_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINUX_LIST False )
set ( LINUX False )
set ( LOCALIZATION False )
......
......@@ -31,9 +31,9 @@ set ( LOG_NO_THREAD 1 )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR True )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC True )
set ( MESSAGE_CHART_GENERATOR_PHY True )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
......
......@@ -130,7 +130,6 @@ function main()
-m | --mscgen)
MSC_DIR=$2
# can omit file name if last arg on the line
if [ -d "$MSC_DIR" ]; then
echo "setting mscgen log files to dir: $MSC_DIR"
run_mscgen=1
......@@ -146,10 +145,10 @@ function main()
exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
shift ;
;;
-W | ----wireshark-l2)
-W | --wireshark-l2)
echo "setting l2 pcap dump output"
exe_arguments="$exe_arguments -P wireshark"
shift 2;
shift 1;
;;
*)
echo "Unknown option $1"
......@@ -196,11 +195,11 @@ function main()
fi
if [ $run_gdb -eq 0 ]; then
exec $SUDO $OPENAIR_DIR/targets/bin/oaisim_nos1 $exe_arguments | tee /tmp/enb_ue_nos1.log.txt
exec $SUDO $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel10 $exe_arguments | tee /tmp/enb_ue_nos1.log.txt
else
touch ~/.gdb_enb_ue_nos1
chmod 777 ~/.gdb_enb_ue_nos1
echo "file $OPENAIR_DIR/targets/bin/oaisim_nos1" > ~/.gdb_enb_ue_nos1
echo "file $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel10" > ~/.gdb_enb_ue_nos1
echo "set args $exe_arguments" >> ~/.gdb_enb_ue_nos1
echo "run" >> ~/.gdb_enb_ue_nos1
cat ~/.gdb_enb_ue_nos1
......
......@@ -880,7 +880,7 @@ int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_i
ret = lfds611_queue_new(&itti_desc.tasks[task_id].message_queue, itti_desc.tasks_info[task_id].queue_size);
if (ret < 0) {
if (0 == ret) {
AssertFatal (0, "lfds611_queue_new failed for task %s!\n", itti_get_task_name(task_id));
}
}
......
......@@ -93,7 +93,8 @@ int timer_handle_signal(siginfo_t *info)
/* Get back pointer to timer list element */
timer_p = (struct timer_elm_s *)info->si_ptr;
TMR_DEBUG("Timer with id 0x%lx has expired\n", (long)timer_p->timer);
// LG: To many traces for msc timer:
// TMR_DEBUG("Timer with id 0x%lx has expired\n", (long)timer_p->timer);
task_id = timer_p->task_id;
instance = timer_p->instance;
......
......@@ -27,7 +27,7 @@
*******************************************************************************/
/*! \file msc.c
* \brief Message chart generator logging utility (generated files to processed by a scrip to produce a mscgen input file for generating a sequence diagram document)
* \brief Message chart generator logging utility (generated files to processed by a script to produce a mscgen input file for generating a sequence diagram document)
* \author Lionel GAUTHIER
* \date 2015
* \email: lionel.gauthier@eurecom.fr
......@@ -38,523 +38,543 @@
#include <string.h>
#include <stdint.h>
#include <inttypes.h>
#include "liblfds611.h"
#include "intertask_interface.h"
#include "timer.h"
#include "msc.h"
#include "assertions.h"
//-------------------------------
#define MSC_MAX_QUEUE_ELEMENTS 1024
#define MSC_MAX_PROTO_NAME_LENGTH 16
#define MSC_MAX_MESSAGE_LENGTH 512
//-------------------------------
FILE* msc_fd[MAX_MSC_PROTOS]; // may need to split in more files to avoid overwrites (want to avoid mutexes)
char msc_proto2str[MAX_MSC_PROTOS][MSC_MAX_PROTO_NAME_LENGTH];
uint64_t msc_event_counter = 0;
FILE* g_msc_fd;
char g_msc_proto2str[MAX_MSC_PROTOS][MSC_MAX_PROTO_NAME_LENGTH];
typedef unsigned long msc_message_number_t;
typedef struct msc_queue_item_s {
char *message_str;
uint32_t message_str_size;
uint8_t *message_bin;
uint32_t message_bin_size;
} msc_queue_item_t;
msc_message_number_t g_message_number = 0;
struct lfds611_queue_state *g_msc_message_queue_p;
struct lfds611_stack_state *g_msc_memory_stack_p;
//------------------------------------------------------------------------------
int msc_init(msc_env_t envP)
void *msc_task(void *args_p)
//------------------------------------------------------------------------------
{
int i;
int rv;
MessageDef *received_message_p = NULL;
const char *msg_name = NULL;
instance_t instance = 0;
long timer_id;
itti_mark_task_ready(TASK_MSC);
msc_start_use();
timer_setup(0, // seconds
50000, // usec
TASK_MSC,
INSTANCE_DEFAULT,
TIMER_PERIODIC,
NULL,
&timer_id);
while(1) {
itti_receive_msg(TASK_MSC, &received_message_p);
if (received_message_p != NULL) {
msg_name = ITTI_MSG_NAME (received_message_p);
instance = ITTI_MSG_INSTANCE (received_message_p);
switch (ITTI_MSG_ID(received_message_p)) {
case TIMER_HAS_EXPIRED: {
msc_flush_messages();
}
break;
case TERMINATE_MESSAGE: {
timer_remove(timer_id);
msc_end();
itti_exit_task();
}
break;
case MESSAGE_TEST: {
}
break;
default: {
}
break;
}
}
}
fprintf(stderr, "Task MSC exiting\n");
return NULL;
}
//------------------------------------------------------------------------------
int msc_init(const msc_env_t envP, const int max_threadsP)
//------------------------------------------------------------------------------
{
int i;
int rv;
void *pointer_p;
char msc_filename[256];
fprintf(stderr, "Initializing MSC logs\n");
rv = snprintf(msc_filename, 256, "/tmp/openair.msc.%u.log", envP); // TODO NAME
if ((0 >= rv) || (256 < rv)){
fprintf(stderr, "Error in MSC log file name");
}
g_msc_fd = fopen(msc_filename,"w");
AssertFatal(g_msc_fd != NULL, "Could not open MSC log file %s : %s", msc_filename, strerror(errno));
rv = lfds611_stack_new(&g_msc_memory_stack_p, (lfds611_atom_t)max_threadsP + 2);
if (0 >= rv) {
AssertFatal (0, "lfds611_stack_new failed!\n");
}
rv = lfds611_queue_new(&g_msc_message_queue_p, (lfds611_atom_t)MSC_MAX_QUEUE_ELEMENTS);
AssertFatal (rv, "lfds611_queue_new failed!\n");
msc_start_use();
for (i=0; i < max_threadsP * 30; i++) {
pointer_p = malloc(MSC_MAX_MESSAGE_LENGTH);
AssertFatal (pointer_p, "malloc failed!\n");
rv = lfds611_stack_guaranteed_push( g_msc_memory_stack_p, pointer_p );
AssertFatal (rv, "lfds611_stack_guaranteed_push failed for item %u\n", i);
}
for (i = MIN_MSC_PROTOS; i < MAX_MSC_PROTOS; i++) {
msc_fd[i] = NULL;
switch (i) {
switch (i) {
case MSC_IP_UE:
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "IP_UE");
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "IP_UE");
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.ip_ue.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.ip_ue.log : %s", strerror(errno));
msc_log_declare_proto(i);
}
break;
case MSC_IP_ENB:
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "IP_ENB");
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "IP_ENB");
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if (envP == MSC_E_UTRAN_LIPA) {
msc_fd[i] = fopen("/tmp/openair.msc.ip_enb.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.ip_enb.log : %s", strerror(errno));
msc_log_declare_proto(i);
}
break;
case MSC_NAS_UE:
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_UE");
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
rv = snprintf(&g_msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_UE");
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {g_msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {