Commit 8b28e71b authored by matzakos's avatar matzakos

Merge with develop branch of main OAI repository.

parents 6823e3aa be8d32d5
This diff is collapsed.
...@@ -66,6 +66,7 @@ UE_AUTOTEST_TRACE="False" ...@@ -66,6 +66,7 @@ UE_AUTOTEST_TRACE="False"
UE_DEBUG_TRACE="False" UE_DEBUG_TRACE="False"
UE_TIMING_TRACE="False" UE_TIMING_TRACE="False"
DISABLE_LOG_X="False" DISABLE_LOG_X="False"
USRP_REC_PLAY="False"
BUILD_ECLIPSE=0 BUILD_ECLIPSE=0
trap handle_ctrl_c INT trap handle_ctrl_c INT
...@@ -99,8 +100,6 @@ Options ...@@ -99,8 +100,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\")
--RRH
Makes the RRH
-a | --agent -a | --agent
Enables agent for software-defined control of the eNB Enables agent for software-defined control of the eNB
-r | --3gpp-release -r | --3gpp-release
...@@ -158,6 +157,8 @@ Options ...@@ -158,6 +157,8 @@ Options
Disable all LOG_* macros Disable all LOG_* macros
--build-eclipse --build-eclipse
Build eclipse project files. Paths are auto corrected by fixprj.sh Build eclipse project files. Paths are auto corrected by fixprj.sh
--usrp-recplay
Build for I/Q record-playback modes
Usage (first build): Usage (first build):
oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files
...@@ -216,10 +217,6 @@ function main() { ...@@ -216,10 +217,6 @@ function main() {
--UE-gen-nvram) --UE-gen-nvram)
gen_nvram_path=$(readlink -f $2) gen_nvram_path=$(readlink -f $2)
shift 2;; shift 2;;
--RRH)
RRH=1
echo_info "Will compile RRH"
shift;;
-r | --3gpp-release) -r | --3gpp-release)
REL=$2 REL=$2
echo_info "Setting release to: $REL" echo_info "Setting release to: $REL"
...@@ -350,6 +347,10 @@ function main() { ...@@ -350,6 +347,10 @@ function main() {
BUILD_TELNETSRV=1 BUILD_TELNETSRV=1
echo_info "Build embedded telnet server" echo_info "Build embedded telnet server"
shift ;; shift ;;
--usrp-recplay)
USRP_REC_PLAY="True"
echo_info "Enabling USRP record playback mode"
shift 1;;
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
...@@ -364,7 +365,7 @@ function main() { ...@@ -364,7 +365,7 @@ function main() {
echo_info "CMAKE_CMD=$CMAKE_CMD" echo_info "CMAKE_CMD=$CMAKE_CMD"
######################################################### #########################################################
# check validity of HW and TP parameters for RRH and eNB # check validity of HW and TP parameters for eNB
######################################################### #########################################################
# to be discussed # to be discussed
...@@ -380,15 +381,6 @@ function main() { ...@@ -380,15 +381,6 @@ function main() {
fi fi
fi fi
if [ "$RRH" = "1" ] ; then
if [ "$TP" = "None" ] ; then
echo_fatal "A transport protocol (e.g. -t ETHERNET) must be defined!"
fi
if [ "$HW" = "None" ] ; then
echo_info "No radio head has been selected (HW set to $HW)"
fi
fi
echo_info "RF HW set to $HW" echo_info "RF HW set to $HW"
#Now we set flags to enable deadline scheduler settings #Now we set flags to enable deadline scheduler settings
#By default: USRP: disable, #By default: USRP: disable,
...@@ -542,6 +534,7 @@ function main() { ...@@ -542,6 +534,7 @@ function main() {
echo "set (UE_DEBUG_TRACE $UE_DEBUG_TRACE)" >> $cmake_file echo "set (UE_DEBUG_TRACE $UE_DEBUG_TRACE)" >> $cmake_file
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
echo_info "Compiling UE S1 build : enabling Linux and NETLINK" echo_info "Compiling UE S1 build : enabling Linux and NETLINK"
echo "set (LINUX True )" >> $cmake_file echo "set (LINUX True )" >> $cmake_file
...@@ -787,36 +780,6 @@ function main() { ...@@ -787,36 +780,6 @@ function main() {
# oaisim_mme $dbin/oaisim_mme.$REL # oaisim_mme $dbin/oaisim_mme.$REL
fi fi
# RRH compilation
#####################
if [ "$RRH" = "1" ] ; then
rrh_exec=rrh_gw
rrh_build_dir=rrh_gw
echo_info "Compiling $rrh_exec ..."
[ "$CLEAN" = "1" ] && rm -rf $DIR/rrh_gw/build
mkdir -p $DIR/$rrh_build_dir/build
cmake_file=$DIR/$rrh_build_dir/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( ENABLE_ITTI False )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
echo 'set ( PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file
echo "set ( DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >>$cmake_file
echo "set ( CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$rrh_build_dir/build
eval $CMAKE_CMD
compilations \
rrh_gw rrh_gw \
rrh_gw $dbin/rrh_gw
fi
# Telnet server compilation # Telnet server compilation
##################### #####################
if [ "$BUILD_TELNETSRV" = "1" ] ; then if [ "$BUILD_TELNETSRV" = "1" ] ; then
...@@ -835,13 +798,9 @@ function main() { ...@@ -835,13 +798,9 @@ function main() {
fi fi
# build RF device and transport protocol libraries # build RF device and transport protocol libraries
##################################### #####################################
if [ "$eNB" = "1" -o "$UE" = "1" -o "$RRH" = "1" ] ; then if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then build_dir=$lte_build_dir
build_dir=$lte_build_dir
else
build_dir=$rrh_build_dir
fi
# build RF device libraries # build RF device libraries
if [ "$HW" != "None" ] ; then if [ "$HW" != "None" ] ; then
......
...@@ -2,17 +2,13 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,17 +2,13 @@ cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" ) set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ASN_DEBUG False) set ( ASN_DEBUG False)
set ( ADDR_CONF False )
set ( DEBUG_OMG False ) set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False ) set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True ) set ( DRIVER2013 True )
set ( EMOS False )
set ( EMIT_ASN_DEBUG False ) set ( EMIT_ASN_DEBUG False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True ) set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING True ) set ( ENABLE_NAS_UE_LOGGING True )
set ( ENABLE_NEW_MULTICAST True ) set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_SECURITY True ) set ( ENABLE_SECURITY True )
set ( ENABLE_STANDALONE_EPC False) set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True ) set ( ENABLE_USE_CPU_EXECUTION_TIME True )
...@@ -21,7 +17,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True) ...@@ -21,7 +17,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
set ( ENABLE_VCD_FIFO False ) set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True ) set ( ENB_MODE True )
set ( EXMIMO_IOT True ) set ( EXMIMO_IOT True )
set ( HARD_RT False )
set ( JUMBO_FRAME True ) set ( JUMBO_FRAME True )
set ( LARGE_SCALE False ) set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U True) set ( LINK_ENB_PDCP_TO_GTPV1U True)
...@@ -33,7 +28,6 @@ set ( DEADLINE_SCHEDULER False ) ...@@ -33,7 +28,6 @@ set ( DEADLINE_SCHEDULER False )
set ( MAC_CONTEXT 1 ) set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 ) set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False) set ( MESSAGE_CHART_GENERATOR False)
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False ) set ( MSG_PRINT False )
set ( MU_RECEIVER False ) set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False ) set ( NAS_ADDRESS_FIX False )
...@@ -42,38 +36,25 @@ set ( NAS_MME False ) ...@@ -42,38 +36,25 @@ set ( NAS_MME False )
set ( NAS_UE True ) set ( NAS_UE True )
set ( NB_ANTENNAS_RX "2" ) set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" ) set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT True )
set ( NO_RRM True ) set ( NO_RRM True )
set ( OAI_EMU False )
set ( OAISIM False ) set ( OAISIM False )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False ) set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK True ) set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True ) set ( OPENAIR2 True )
set ( OPENAIR_LTE True ) set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "epc_test" ) set ( PACKAGE_NAME "epc_test" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True ) set ( PDCP_USE_NETLINK True )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False ) set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT False ) set ( PHY_CONTEXT False )
set ( PHY_EMUL False ) set ( PHY_EMUL False )
set ( PHYSIM True ) set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD "False" ) set ( RF_BOARD "False" )
set ( RLC_STOP_ON_LOST_PDU False ) set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_ASN1_VERSION "Rel10" ) set ( RRC_ASN1_VERSION "Rel10" )
set ( RRC_DEFAULT_RAB_IS_AM True) set ( RRC_DEFAULT_RAB_IS_AM True)
set ( RRC_MSG_PRINT False ) set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False ) set ( SECU False )
set ( SMBV False ) set ( SMBV False )
set ( TEST_OMG False ) set ( TEST_OMG False )
set ( USE_MME "R10" ) set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT True ) set ( XER_PRINT True )
...@@ -6,9 +6,6 @@ set(XFORMS True) ...@@ -6,9 +6,6 @@ set(XFORMS True)
set(ENABLE_ITTI False) set(ENABLE_ITTI False)
set(DEBUG_PHY False) set(DEBUG_PHY False)
set(MU_RECIEVER False) set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE True)
set(NAS_UE False) set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False) set(MESSAGE_CHART_GENERATOR False)
......
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" ) set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ADDR_CONF False )
set ( DEBUG_OMG False ) set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False ) set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True ) set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True ) set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING True ) set ( ENABLE_NAS_UE_LOGGING True )
set ( ENABLE_NEW_MULTICAST True ) set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL False ) set ( ENABLE_RAL False )
set ( ENABLE_SECURITY True ) set ( ENABLE_SECURITY True )
set ( ENABLE_STANDALONE_EPC False) set ( ENABLE_STANDALONE_EPC False)
...@@ -20,7 +16,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True) ...@@ -20,7 +16,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
set ( ENABLE_VCD_FIFO False ) set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True ) set ( ENB_MODE True )
set ( EXMIMO_IOT True ) set ( EXMIMO_IOT True )
set ( HARD_RT False )
set ( JUMBO_FRAME True ) set ( JUMBO_FRAME True )
set ( LARGE_SCALE False ) set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U True) set ( LINK_ENB_PDCP_TO_GTPV1U True)
...@@ -32,7 +27,6 @@ set ( DEADLINE_SCHEDULER False ) ...@@ -32,7 +27,6 @@ set ( DEADLINE_SCHEDULER False )
set ( MAC_CONTEXT 1 ) set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 ) set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False) set ( MESSAGE_CHART_GENERATOR False)
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False ) set ( MSG_PRINT False )
set ( MU_RECEIVER False ) set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False ) set ( NAS_ADDRESS_FIX False )
...@@ -41,40 +35,26 @@ set ( NAS_MME False ) ...@@ -41,40 +35,26 @@ set ( NAS_MME False )
set ( NAS_UE True ) set ( NAS_UE True )
set ( NB_ANTENNAS_RX "2" ) set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" ) set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT True )
set ( NO_RRM True ) set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAISIM True ) set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False ) set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK True ) set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True ) set ( OPENAIR2 True )
set ( OPENAIR_LTE True ) set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" ) set ( PACKAGE_NAME "oaisim" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True ) set ( PDCP_USE_NETLINK True )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False ) set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT False ) set ( PHY_CONTEXT False )
set ( PHY_EMUL False ) set ( PHY_EMUL False )
set ( PHYSIM True ) set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD "False" ) set ( RF_BOARD "False" )
set ( RLC_STOP_ON_LOST_PDU False ) set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_ASN1_VERSION "Rel10" ) set ( RRC_ASN1_VERSION "Rel10" )
set ( RRC_DEFAULT_RAB_IS_AM True) set ( RRC_DEFAULT_RAB_IS_AM True)
set ( RRC_MSG_PRINT False ) set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False ) set ( SECU False )
set ( SMBV False ) set ( SMBV False )
set ( SPECTRA False )
set ( TEST_OMG False ) set ( TEST_OMG False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" ) set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False ) set ( XER_PRINT False )
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" ) set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ADDR_CONF False )
set ( DEBUG_OMG False ) set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False ) set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 False ) set ( DRIVER2013 False )
set ( EMOS False )
set ( ENABLE_FXP False )
set ( ENABLE_ITTI True ) set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False ) set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST False ) set ( ENABLE_NEW_MULTICAST False )
set ( ENABLE_PGM_TRANSPORT False )
set ( ENABLE_RAL False ) set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False ) set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False ) set ( ENABLE_STANDALONE_EPC False )
...@@ -21,7 +17,6 @@ set ( ENABLE_VCD_FIFO False ) ...@@ -21,7 +17,6 @@ set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE False ) set ( ENB_MODE False )
set ( EPC_BUILD True ) set ( EPC_BUILD True )
set ( EXMIMO_IOT False ) set ( EXMIMO_IOT False )
set ( HARD_RT False )
set ( JUMBO_FRAME False ) set ( JUMBO_FRAME False )
set ( LARGE_SCALE False ) set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U True) set ( LINK_ENB_PDCP_TO_GTPV1U True)
...@@ -32,7 +27,6 @@ set ( LOG_NO_THREAD False ) ...@@ -32,7 +27,6 @@ set ( LOG_NO_THREAD False )
set ( DEADLINE_SCHEDULER False ) set ( DEADLINE_SCHEDULER False )
set ( MAC_CONTEXT 1 ) set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 ) set ( MAX_NUM_CCs 1 )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False ) set ( MSG_PRINT False )
set ( MU_RECEIVER False ) set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False ) set ( NAS_ADDRESS_FIX False )
...@@ -42,42 +36,27 @@ set ( NAS_NETLINK False ) ...@@ -42,42 +36,27 @@ set ( NAS_NETLINK False )
set ( NAS_UE False ) set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" ) set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" ) set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT False )
set ( NO_RRM False ) set ( NO_RRM False )
set ( OAI_EMU False )
set ( OAISIM False ) set ( OAISIM False )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False ) set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK False ) set ( OAI_NW_DRIVER_USE_NETLINK False )
set ( OPENAIR1 False )
set ( OPENAIR2 False ) set ( OPENAIR2 False )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE False ) set ( OPENAIR_LTE False )
set ( PACKAGE_NAME "EPC" ) set ( PACKAGE_NAME "EPC" )
set ( PBS_SIM False )
set ( PC_DSP False )
set ( PC_TARGET False )
set ( PDCP_MSG_PRINT False ) set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION False )
set ( PHY_CONTEXT False ) set ( PHY_CONTEXT False )
set ( PHY_EMUL False ) set ( PHY_EMUL False )
set ( PHYSIM False ) set ( PHYSIM False )
set ( PUCCH False )
set ( RANDOM_BF False )
set ( RF_BOARD "False" ) set ( RF_BOARD "False" )
set ( RRC_ASN1_VERSION "Rel10" ) set ( RRC_ASN1_VERSION "Rel10" )
set ( RLC_STOP_ON_LOST_PDU False ) set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_MSG_PRINT False ) set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False ) set ( SECU False )
set ( SMBV False ) set ( SMBV False )
set ( SPECTRA False )
set ( TEST_OMG False ) set ( TEST_OMG False )
set ( UPDATE_RELEASE_9 True) set ( UPDATE_RELEASE_9 True)
set ( UPDATE_RELEASE_10 True) set ( UPDATE_RELEASE_10 True)
set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" ) set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False ) set ( XER_PRINT False )
set ( XFORMS False ) set ( XFORMS False )
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
set ( ADDR_CONF False )
set ( DEBUG_OMG False ) set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False ) set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True ) set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True ) set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False ) set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST True ) set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL False ) set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False ) set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False) set ( ENABLE_STANDALONE_EPC False)
...@@ -19,7 +15,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False) ...@@ -19,7 +15,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
set ( ENABLE_VCD_FIFO False ) set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True ) set ( ENB_MODE True )
set ( EXMIMO_IOT True ) set ( EXMIMO_IOT True )
set ( HARD_RT False )
set ( JUMBO_FRAME True ) set ( JUMBO_FRAME True )
set ( LARGE_SCALE False ) set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False) set ( LINK_ENB_PDCP_TO_GTPV1U False)
...@@ -33,51 +28,35 @@ set ( MAX_NUM_CCs 1 ) ...@@ -33,51 +28,35 @@ set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False ) set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False ) set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False ) set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False ) set ( MSG_PRINT False )
set ( MU_RECEIVER False ) set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX True ) set ( NAS_ADDRESS_FIX False )
set ( NAS_BUILT_IN_UE False) set ( NAS_BUILT_IN_UE False)
set ( NAS_MME False ) set ( NAS_MME False )
set ( NAS_UE False ) set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" ) set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" ) set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT True )
set ( NO_RRM True ) set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAISIM True ) set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False ) set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK True ) set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True ) set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True ) set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" ) set ( PACKAGE_NAME "oaisim" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True ) set ( PDCP_USE_NETLINK True )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False ) set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT False ) set ( PHY_CONTEXT False )
set ( PHY_EMUL False ) set ( PHY_EMUL False )
set ( PHYSIM True ) set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD "False" ) set ( RF_BOARD "False" )
set ( RRC_ASN1_VERSION "Rel10" ) set ( RRC_ASN1_VERSION "Rel10" )
set ( RLC_STOP_ON_LOST_PDU False ) set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_MSG_PRINT False ) set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False ) set ( SECU False )
set ( SMBV False ) set ( SMBV False )
set ( SPECTRA False )
set ( TEST_OMG False ) set ( TEST_OMG False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" ) set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False ) set ( XER_PRINT False )
set ( DEBUG_PHY False ) set ( DEBUG_PHY False )
set ( DEBUG_PHY_PROC False) set ( DEBUG_PHY_PROC False)
......
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" ) set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ADDR_CONF False )
set ( DEBUG_OMG False ) set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False ) set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True ) set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True ) set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING True ) set ( ENABLE_NAS_UE_LOGGING True )
set ( ENABLE_NEW_MULTICAST True ) set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PDCP_NETLINK_FIFO False ) set ( ENABLE_PDCP_NETLINK_FIFO False )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL False ) set ( ENABLE_RAL False )
set ( ENABLE_SECURITY True ) set ( ENABLE_SECURITY True )
set ( ENABLE_STANDALONE_EPC False) set ( ENABLE_STANDALONE_EPC False)
...@@ -21,7 +17,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True) ...@@ -21,7 +17,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
set ( ENABLE_VCD_FIFO False ) set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True ) set ( ENB_MODE True )
set ( EXMIMO_IOT True ) set ( EXMIMO_IOT True )
set ( HARD_RT False )
set ( JUMBO_FRAME True ) set ( JUMBO_FRAME True )
set ( LARGE_SCALE False ) set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U True) set ( LINK_ENB_PDCP_TO_GTPV1U True)
...@@ -33,7 +28,6 @@ set ( DEADLINE_SCHEDULER False ) ...@@ -33,7 +28,6 @@ set ( DEADLINE_SCHEDULER False )
set ( MAC_CONTEXT 1 ) set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 ) set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False) set ( MESSAGE_CHART_GENERATOR False)
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False ) set ( MSG_PRINT False )
set ( MU_RECEIVER False ) set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False ) set ( NAS_ADDRESS_FIX False )
...@@ -42,44 +36,30 @@ set ( NAS_MME False ) ...@@ -42,44 +36,30 @@ set ( NAS_MME False )
set ( NAS_UE True ) set ( NAS_UE True )
set ( NB_ANTENNAS_RX "2" ) set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" ) set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT True )
set ( NO_RRM True ) set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAISIM True ) set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False ) set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK True ) set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True ) set ( OPENAIR2 True )
set ( OPENAIR_LTE True ) set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" ) set ( PACKAGE_NAME "oaisim" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True ) set ( PDCP_USE_NETLINK True )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False ) set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT False ) set ( PHY_CONTEXT False )
set ( PHY_EMUL False ) set ( PHY_EMUL False )
set ( PHYSIM True ) set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD "False" ) set ( RF_BOARD "False" )
set ( RLC_STOP_ON_LOST_PDU False ) set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_ASN1_VERSION "Rel10" ) set ( RRC_ASN1_VERSION "Rel10" )
set ( RRC_DEFAULT_RAB_IS_AM True) set ( RRC_DEFAULT_RAB_IS_AM True)
set ( RRC_MSG_PRINT False ) set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False ) set ( SECU False )
set ( SMBV False ) set ( SMBV False )
set ( SPECTRA False )
set ( TEST_OMG False ) set ( TEST_OMG False )
set ( TEST_S1C_MME True ) set ( TEST_S1C_MME True )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" ) set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False ) set ( XER_PRINT False )
set ( XFORMS False ) set ( XFORMS False )
...@@ -95,6 +95,8 @@ get_distribution_release() { ...@@ -95,6 +95,8 @@ get_distribution_release() {
check_supported_distribution() { check_supported_distribution() {
local distribution=$(get_distribution_release) local distribution=$(get_distribution_release)
case "$distribution" in case "$distribution" in
"ubuntu17.10") return 0 ;;
"ubuntu17.04") return 0 ;;
"ubuntu16.04") return 0 ;; "ubuntu16.04") return 0 ;;
"ubuntu14.04") return 0 ;; "ubuntu14.04") return 0 ;;
"fedora24") return 0 ;; "fedora24") return 0 ;;
...@@ -480,16 +482,26 @@ check_install_oai_software() { ...@@ -480,16 +482,26 @@ check_install_oai_software() {
fi fi
$SUDO $INSTALLER update -y $SUDO $INSTALLER update -y
if [[ "$OS_DISTRO" == "ubuntu" ]]; then if [[ "$OS_DISTRO" == "ubuntu" ]]; then
local LAPACK_LIBNAME="liblapack.so"
local LAPACK_TARGET="/usr/lib/atlas-base/atlas/liblapack.so"
$SUDO apt install -y software-properties-common $SUDO apt install -y software-properties-common
case "$(get_distribution_release)" in case "$(get_distribution_release)" in
"ubuntu14.04") "ubuntu14.04")
specific_packages="libtasn1-3-dev" specific_packages="libtasn1-3-dev gccxml libgnutls-dev libatlas-dev"
# For iperf3 # For iperf3
$SUDO add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports universe" $SUDO add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports universe"
$SUDO apt-get update $SUDO apt-get update
;; ;;
"ubuntu16.04") "ubuntu16.04")
specific_packages="libtasn1-6-dev" specific_packages="libtasn1-6-dev gccxml libgnutls-dev libatlas-dev"
;;
"ubuntu17.04")
specific_packages="libtasn1-6-dev castxml libgnutls28-dev libatlas-dev"
;;
"ubuntu17.10")
specific_packages="libtasn1-6-dev castxml libgnutls28-dev"
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so"
;; ;;
esac esac
$SUDO apt-get install -y \ $SUDO apt-get install -y \
...@@ -505,7 +517,6 @@ check_install_oai_software() { ...@@ -505,7 +517,6 @@ check_install_oai_software() {
texlive-latex-base \ texlive-latex-base \
ethtool \ ethtool \
flex \ flex \
gccxml \
gdb \ gdb \
git \ git \
graphviz \ graphviz \
...@@ -516,7 +527,6 @@ check_install_oai_software() { ...@@ -516,7 +527,6 @@ check_install_oai_software() {
iptables \ iptables \
iptables-dev \ iptables-dev \
libatlas-base-dev \ libatlas-base-dev \
libatlas-dev \
libblas-dev \ libblas-dev \
libconfig8-dev \ libconfig8-dev \
libffi-dev \ libffi-dev \
...@@ -554,11 +564,9 @@ check_install_oai_software() { ...@@ -554,11 +564,9 @@ check_install_oai_software() {
wget \ wget \
libxpm-dev libxpm-dev
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so $SUDO update-alternatives --set "$LAPACK_LIBNAME" "$LAPACK_TARGET"
$SUDO apt-get install -y nettle-dev nettle-bin
$SUDO apt-get install -y libgnutls-dev $SUDO apt-get install -y nettle-dev nettle-bin
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
if rpm -q epel-release > /dev/null; then if rpm -q epel-release > /dev/null; then
......
...@@ -44,11 +44,11 @@ load_module $OPENAIR_DIR/targets/bin/nasmesh.ko ...@@ -44,11 +44,11 @@ load_module $OPENAIR_DIR/targets/bin/nasmesh.ko
if [ "$1" = "eNB" ]; then if [ "$1" = "eNB" ]; then
echo "bring up oai0 interface for enb" echo "bring up oai0 interface for enb"
sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255 sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.9 -r 1 $OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
else else
if [ "$1" = "UE" ]; then if [ "$1" = "UE" ]; then
echo "bring up oai0 interface for UE" echo "bring up oai0 interface for UE"
sudo ifconfig oai0 10.0.1.9 netmask 255.255.255.0 broadcast 10.0.1.255 sudo ifconfig oai0 10.0.1.9 netmask 255.255.255.0 broadcast 10.0.1.255
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.9 -t 10.0.1.1 -r 1 $OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.2 -t 10.0.1.1 -r 1
fi fi
fi fi
...@@ -59,6 +59,15 @@ char defbool[2]="1"; ...@@ -59,6 +59,15 @@ char defbool[2]="1";
printf("cfgoptions->strptr %p (&emul_iface %p, emul_iface %p)\n",cfgoptions->strptr,&emul_iface,emul_iface); printf("cfgoptions->strptr %p (&emul_iface %p, emul_iface %p)\n",cfgoptions->strptr,&emul_iface,emul_iface);
sprintf(*(cfgoptions->strptr), "%s",tmpval); sprintf(*(cfgoptions->strptr), "%s",tmpval);
printf("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval); printf("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval);
/*=======
if (cfgoptions->numelt == 0 ) {
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval)+1);
sprintf(*(cfgoptions->strptr), "%s",tmpval);
} else {
sprintf( (char *)(cfgoptions->strptr), "%s",tmpval);
}
printf_cmdl("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval);
>>>>>>> main/develop*/
optisset=1; optisset=1;
break; break;
......
...@@ -129,20 +129,21 @@ int i; ...@@ -129,20 +129,21 @@ int i;
/* default */ /* default */
if (cfgparam == NULL) { if (cfgparam == NULL) {
cfgparam = "libconfig:oaisoftmodem.conf"; tmpflags = tmpflags | CONFIG_NOOOPT;
cfgparam = DEFAULT_CFGMODE ":" DEFAULT_CFGFILENAME;
} }
/* parse the config parameters to set the config source */ /* parse the config parameters to set the config source */
i = sscanf(cfgparam,"%m[^':']:%ms",&cfgmode,&modeparams); i = sscanf(cfgparam,"%m[^':']:%ms",&cfgmode,&modeparams);
if (i< 0) { if (i< 0) {
fprintf(stderr,"[CONFIG] %s, %d, sscanf error parsing config source %s: %s\n", __FILE__, __LINE__,cfgparam, strerror(errno)); fprintf(stderr,"[CONFIG] %s, %d, sscanf error parsing config source %s: %s\n", __FILE__, __LINE__,cfgparam, strerror(errno));
cfgmode=strdup("libconfig"); cfgmode=strdup(DEFAULT_CFGMODE);
modeparams = strdup("oaisoftmodem.conf"); modeparams = strdup(DEFAULT_CFGFILENAME);
} }
else if ( i == 1 ) { else if ( i == 1 ) {
/* -O argument doesn't contain ":" separator, assume -O <conf file> option, default cfgmode to libconfig /* -O argument doesn't contain ":" separator, assume -O <conf file> option, default cfgmode to libconfig
with one parameter, the path to the configuration file */ with one parameter, the path to the configuration file */
modeparams=cfgmode; modeparams=cfgmode;
cfgmode=strdup("libconfig"); cfgmode=strdup(DEFAULT_CFGMODE);
} }
cfgptr = malloc(sizeof(configmodule_interface_t)); cfgptr = malloc(sizeof(configmodule_interface_t));
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#define CONFIG_DEBUGCMDLINE 4 // print command line processing messages #define CONFIG_DEBUGCMDLINE 4 // print command line processing messages
#define CONFIG_HELP 8 // print help message #define CONFIG_HELP 8 // print help message
#define CONFIG_ABORT 16 // config failed,abort execution #define CONFIG_ABORT 16 // config failed,abort execution
#define CONFIG_NOOOPT 32 // no -O option found when parsing command line
typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP); typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP);
......
...@@ -50,7 +50,11 @@ configmodule_interface_t *config_get_if(void) ...@@ -50,7 +50,11 @@ configmodule_interface_t *config_get_if(void)
char * config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) char * config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length)
{ {
printf_ptrs("-- %s 0x%08lx %i\n",cfgoptions->optname,(uintptr_t)(*ptr),length); printf_ptrs("[CONFIG] %s ptr: 0x%08lx requested size: %i\n",cfgoptions->optname,(uintptr_t)(ptr),length);
if(cfgoptions->numelt > 0) { /* already allocated */
return *ptr;
}
if (*ptr == NULL) { if (*ptr == NULL) {
*ptr = malloc(length); *ptr = malloc(length);
if ( *ptr != NULL) { if ( *ptr != NULL) {
...@@ -148,3 +152,7 @@ int config_isparamset(paramdef_t *params,int paramidx) ...@@ -148,3 +152,7 @@ int config_isparamset(paramdef_t *params,int paramidx)
return 0; return 0;
} }
} }
int config_getparamval_fromparamdefidx(paramdef_t *cfgoptions,int paramidx) {
return -1;
}
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
extern "C" extern "C"
{ {
#endif #endif
#define DEFAULT_CFGFILENAME "oaisoftmodem.conf"
#define DEFAULT_CFGMODE "libconfig"
#define CONFIG_GETSOURCE ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgmode ) #define CONFIG_GETSOURCE ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgmode )
#define CONFIG_GETNUMP ( (config_get_if()==NULL) ? 0 : config_get_if()->num_cfgP ) #define CONFIG_GETNUMP ( (config_get_if()==NULL) ? 0 : config_get_if()->num_cfgP )
#define CONFIG_GETP(P) ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgP[P] ) #define CONFIG_GETP(P) ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgP[P] )
...@@ -51,6 +54,7 @@ extern int config_get(paramdef_t *params,int numparams, char *prefix); ...@@ -51,6 +54,7 @@ extern int config_get(paramdef_t *params,int numparams, char *prefix);
extern int config_isparamset(paramdef_t *params,int paramidx); extern int config_isparamset(paramdef_t *params,int paramidx);
extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val); extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val);
extern int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix); extern int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix);
extern int config_getparamval_fromparamdefidx(paramdef_t *cfgoptions,int paramidx);
#define config_getlist config_get_if()->getlist #define config_getlist config_get_if()->getlist
#define CONFIG_GETCONFFILE (config_get_if()->cfgP[0]) #define CONFIG_GETCONFFILE (config_get_if()->cfgP[0])
......
...@@ -104,17 +104,28 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) ...@@ -104,17 +104,28 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
cfgpath,str,cfgoptions[i].numelt); cfgpath,str,cfgoptions[i].numelt);
str[strlen(str)-1] = 0; str[strlen(str)-1] = 0;
} }
config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *)); if (cfgoptions[i].numelt == 0 ) {
config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(str)+1); config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
sprintf( *(cfgoptions[i].strptr) , "%s", str); config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(str)+1);
printf_params("[LIBCONFIG] %s: %s\n", cfgpath,*(cfgoptions[i].strptr) ); sprintf( *(cfgoptions[i].strptr) , "%s", str);
printf_params("[LIBCONFIG] %s: %s\n", cfgpath,*(cfgoptions[i].strptr) );
} else {
sprintf( (char *)(cfgoptions[i].strptr) , "%s", str);
printf_params("[LIBCONFIG] %s: %s\n", cfgpath,(char *)cfgoptions[i].strptr );
}
} else { } else {
if( cfgoptions[i].defstrval != NULL) { if( cfgoptions[i].defstrval != NULL) {
defval=1; defval=1;
config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(cfgoptions[i].defstrval)+1); if (cfgoptions[i].numelt == 0 ) {
sprintf(*(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval); config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, *(cfgoptions[i].strptr)); config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(cfgoptions[i].defstrval)+1);
sprintf(*(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval);
printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, *(cfgoptions[i].strptr));
} else {
sprintf((char *)(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval);
printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, (char *)cfgoptions[i].strptr);
}
} else { } else {
notfound=1; notfound=1;
} }
...@@ -183,7 +194,7 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) ...@@ -183,7 +194,7 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
read_intarray(&cfgoptions[i],setting,cfgpath); read_intarray(&cfgoptions[i],setting,cfgpath);
} else { } else {
if( cfgoptions[i].defintarrayval != NULL) { if( cfgoptions[i].defintarrayval != NULL) {
config_check_valptr(&(cfgoptions[i]),(char **)&(cfgoptions[i].iptr), sizeof(int32_t)); config_check_valptr(&(cfgoptions[i]),(char **)&(cfgoptions[i].iptr), sizeof(int32_t*));
cfgoptions[i].iptr=cfgoptions[i].defintarrayval; cfgoptions[i].iptr=cfgoptions[i].defintarrayval;
defval=1; defval=1;
for (int j=0; j<cfgoptions[i].numelt ; j++) { for (int j=0; j<cfgoptions[i].numelt ; j++) {
......
...@@ -29,7 +29,7 @@ typedef struct { ...@@ -29,7 +29,7 @@ typedef struct {
#define T_SHM_FILENAME "/T_shm_segment" #define T_SHM_FILENAME "/T_shm_segment"
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */ /* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS 178 #define VCD_NUM_FUNCTIONS 187
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */ /* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES 128 #define VCD_NUM_VARIABLES 128
......
...@@ -185,6 +185,10 @@ ID = ENB_RRC_CONNECTION_REESTABLISHMENT_REQUEST ...@@ -185,6 +185,10 @@ ID = ENB_RRC_CONNECTION_REESTABLISHMENT_REQUEST
DESC = RRC connection reestablishment request DESC = RRC connection reestablishment request
GROUP = ALL:RRC:ENB GROUP = ALL:RRC:ENB
FORMAT = int,eNB_ID : int,frame : int,subframe : int,rnti FORMAT = int,eNB_ID : int,frame : int,subframe : int,rnti
ID = ENB_RRC_CONNECTION_REESTABLISHMENT
DESC = RRC connection reestablishment
GROUP = ALL:RRC:ENB
FORMAT = int,eNB_ID : int,frame : int,subframe : int,rnti
ID = ENB_RRC_CONNECTION_REESTABLISHMENT_COMPLETE ID = ENB_RRC_CONNECTION_REESTABLISHMENT_COMPLETE
DESC = RRC connection reestablishment complete DESC = RRC connection reestablishment complete
GROUP = ALL:RRC:ENB GROUP = ALL:RRC:ENB
...@@ -2157,3 +2161,39 @@ ID = VCD_FUNCTION_TRX_DECOMPR_IF ...@@ -2157,3 +2161,39 @@ ID = VCD_FUNCTION_TRX_DECOMPR_IF
DESC = VCD function TRX_DECOMPR_IF DESC = VCD function TRX_DECOMPR_IF
GROUP = ALL:VCD:ENB:VCD_FUNCTION GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value FORMAT = int,value
ID = VCD_FUNCTION_NFAPI
DESC = VCD function NFAPI
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
ID = VCD_FUNCTION_GENERATE_PCFICH
DESC = VCD function GENERATE_PCFICH
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
ID = VCD_FUNCTION_GENERATE_DCI0
DESC = VCD function GENERATE_DCI0
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
ID = VCD_FUNCTION_GENERATE_DLSCH
DESC = VCD function GENERATE_DLSCH
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
ID = VCD_FUNCTION_GENERATE_PHICH
DESC = VCD function GENERATE_PHICH
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
ID = VCD_FUNCTION_PDCCH_SCRAMBLING
DESC = VCD function PDCCH_SCRAMBLING
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
ID = VCD_FUNCTION_PDCCH_MODULATION
DESC = VCD function PDCCH_MODULATION
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
ID = VCD_FUNCTION_PDCCH_INTERLEAVING
DESC = VCD function PDCCH_INTERLEAVING
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
ID = VCD_FUNCTION_PDCCH_TX
DESC = VCD function PDCCH_TX
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
This diff is collapsed.
...@@ -27,10 +27,6 @@ ...@@ -27,10 +27,6 @@
#include <sys/epoll.h> #include <sys/epoll.h>
#ifdef RTAI
# include <rtai_sem.h>
#endif
#ifndef INTERTASK_INTERFACE_H_ #ifndef INTERTASK_INTERFACE_H_
#define INTERTASK_INTERFACE_H_ #define INTERTASK_INTERFACE_H_
...@@ -155,12 +151,10 @@ int itti_create_task(task_id_t task_id, ...@@ -155,12 +151,10 @@ int itti_create_task(task_id_t task_id,
void *(*start_routine) (void *), void *(*start_routine) (void *),
void *args_p); void *args_p);
//#ifdef RTAI
/** \brief Mark the task as a real time task /** \brief Mark the task as a real time task
* \param task_id task to mark as real time * \param task_id task to mark as real time
**/ **/
void itti_set_task_real_time(task_id_t task_id); void itti_set_task_real_time(task_id_t task_id);
//#endif
/** \brief Indicates to ITTI if newly created tasks should wait for all tasks to be ready /** \brief Indicates to ITTI if newly created tasks should wait for all tasks to be ready
* \param wait_tasks non 0 to make new created tasks to wait, 0 to let created tasks to run * \param wait_tasks non 0 to make new created tasks to wait, 0 to let created tasks to run
......
...@@ -51,23 +51,14 @@ ...@@ -51,23 +51,14 @@
#include "intertask_interface.h" #include "intertask_interface.h"
#include "intertask_interface_dump.h" #include "intertask_interface_dump.h"
#if defined(OAI_EMU) || defined(RTAI)
#include "vcd_signal_dumper.h"
#endif
#if T_TRACER #if T_TRACER
#include "T.h" #include "T.h"
#endif #endif
static const int itti_dump_debug = 0; // 0x8 | 0x4 | 0x2; static const int itti_dump_debug = 0; // 0x8 | 0x4 | 0x2;
#ifdef RTAI
# define ITTI_DUMP_DEBUG(m, x, args...) do { if ((m) & itti_dump_debug) rt_printk("[ITTI_DUMP][D]"x, ##args); } \
while(0)
#else
# define ITTI_DUMP_DEBUG(m, x, args...) do { if ((m) & itti_dump_debug) fprintf(stdout, "[ITTI_DUMP][D]"x, ##args); } \ # define ITTI_DUMP_DEBUG(m, x, args...) do { if ((m) & itti_dump_debug) fprintf(stdout, "[ITTI_DUMP][D]"x, ##args); } \
while(0) while(0)
#endif
#define ITTI_DUMP_ERROR(x, args...) do { fprintf(stdout, "[ITTI_DUMP][E]"x, ##args); } \ #define ITTI_DUMP_ERROR(x, args...) do { fprintf(stdout, "[ITTI_DUMP][E]"x, ##args); } \
while(0) while(0)
...@@ -99,13 +90,8 @@ typedef struct itti_desc_s { ...@@ -99,13 +90,8 @@ typedef struct itti_desc_s {
int nb_connected; int nb_connected;
#ifndef RTAI
/* Event fd used to notify new messages (semaphore) */ /* Event fd used to notify new messages (semaphore) */
int event_fd; int event_fd;
#else
unsigned long messages_in_queue __attribute__((aligned(8)));
#endif
int itti_listen_socket; int itti_listen_socket;
itti_client_desc_t itti_clients[ITTI_DUMP_MAX_CON]; itti_client_desc_t itti_clients[ITTI_DUMP_MAX_CON];
...@@ -194,9 +180,7 @@ static int itti_dump_fwrite_message(itti_dump_queue_item_t *message) ...@@ -194,9 +180,7 @@ static int itti_dump_fwrite_message(itti_dump_queue_item_t *message)
fwrite (&new_message_header, sizeof(itti_dump_message_t), 1, dump_file); fwrite (&new_message_header, sizeof(itti_dump_message_t), 1, dump_file);
fwrite (message->data, message->data_size, 1, dump_file); fwrite (message->data, message->data_size, 1, dump_file);
fwrite (&itti_dump_message_type_end, sizeof(itti_message_types_t), 1, dump_file); fwrite (&itti_dump_message_type_end, sizeof(itti_message_types_t), 1, dump_file);
// #if !defined(RTAI)
fflush (dump_file); fflush (dump_file);
// #endif
return (1); return (1);
} }
...@@ -280,10 +264,6 @@ static int itti_dump_enqueue_message(itti_dump_queue_item_t *new, uint32_t messa ...@@ -280,10 +264,6 @@ static int itti_dump_enqueue_message(itti_dump_queue_item_t *new, uint32_t messa
int overwrite_flag; int overwrite_flag;
AssertFatal (new != NULL, "Message to queue is NULL!\n"); AssertFatal (new != NULL, "Message to queue is NULL!\n");
#if defined(OAI_EMU) || defined(RTAI)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE, VCD_FUNCTION_IN);
#endif
new->message_type = message_type; new->message_type = message_type;
new->message_size = message_size; new->message_size = message_size;
...@@ -303,9 +283,6 @@ static int itti_dump_enqueue_message(itti_dump_queue_item_t *new, uint32_t messa ...@@ -303,9 +283,6 @@ static int itti_dump_enqueue_message(itti_dump_queue_item_t *new, uint32_t messa
lfds611_ringbuffer_put_write_element(itti_dump_queue.itti_message_queue, new_queue_element); lfds611_ringbuffer_put_write_element(itti_dump_queue.itti_message_queue, new_queue_element);
if (overwrite_flag == 0) { if (overwrite_flag == 0) {
#ifdef RTAI
__sync_fetch_and_add (&itti_dump_queue.messages_in_queue, 1);
#else
{ {
ssize_t write_ret; ssize_t write_ret;
eventfd_t sem_counter = 1; eventfd_t sem_counter = 1;
...@@ -314,25 +291,18 @@ static int itti_dump_enqueue_message(itti_dump_queue_item_t *new, uint32_t messa ...@@ -314,25 +291,18 @@ static int itti_dump_enqueue_message(itti_dump_queue_item_t *new, uint32_t messa
write_ret = write(itti_dump_queue.event_fd, &sem_counter, sizeof(sem_counter)); write_ret = write(itti_dump_queue.event_fd, &sem_counter, sizeof(sem_counter));
AssertFatal (write_ret == sizeof(sem_counter), "Write to dump event failed (%d/%d)!\n", (int) write_ret, (int) sizeof(sem_counter)); AssertFatal (write_ret == sizeof(sem_counter), "Write to dump event failed (%d/%d)!\n", (int) write_ret, (int) sizeof(sem_counter));
} }
#endif
// add one to pending_messages, atomically // add one to pending_messages, atomically
__sync_fetch_and_add (&pending_messages, 1); __sync_fetch_and_add (&pending_messages, 1);
} }
ITTI_DUMP_DEBUG (0x2, " Added element to queue %p %p, pending %u, type %u\n", new_queue_element, new, pending_messages, message_type); ITTI_DUMP_DEBUG (0x2, " Added element to queue %p %p, pending %u, type %u\n", new_queue_element, new, pending_messages, message_type);
#if defined(OAI_EMU) || defined(RTAI)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE, VCD_FUNCTION_OUT);
#endif
return 0; return 0;
} }
static void itti_dump_socket_exit(void) static void itti_dump_socket_exit(void)
{ {
#ifndef RTAI
close(itti_dump_queue.event_fd); close(itti_dump_queue.event_fd);
#endif
close(itti_dump_queue.itti_listen_socket); close(itti_dump_queue.itti_listen_socket);
/* Leave the thread as we detected end signal */ /* Leave the thread as we detected end signal */
...@@ -346,10 +316,6 @@ static int itti_dump_flush_ring_buffer(int flush_all) ...@@ -346,10 +316,6 @@ static int itti_dump_flush_ring_buffer(int flush_all)
int j; int j;
int consumer; int consumer;
#ifdef RTAI
unsigned long number_of_messages;
#endif
/* Check if there is a least one consumer */ /* Check if there is a least one consumer */
consumer = 0; consumer = 0;
...@@ -365,18 +331,6 @@ static int itti_dump_flush_ring_buffer(int flush_all) ...@@ -365,18 +331,6 @@ static int itti_dump_flush_ring_buffer(int flush_all)
} }
if (consumer > 0) { if (consumer > 0) {
#ifdef RTAI
number_of_messages = itti_dump_queue.messages_in_queue;
ITTI_DUMP_DEBUG(0x4, "%lu elements in queue\n", number_of_messages);
if (number_of_messages == 0) {
return (consumer);
}
__sync_sub_and_fetch(&itti_dump_queue.messages_in_queue, number_of_messages);
#endif
do { do {
/* Acquire the ring element */ /* Acquire the ring element */
lfds611_ringbuffer_get_read_element(itti_dump_queue.itti_message_queue, &element); lfds611_ringbuffer_get_read_element(itti_dump_queue.itti_message_queue, &element);
...@@ -419,9 +373,6 @@ static int itti_dump_flush_ring_buffer(int flush_all) ...@@ -419,9 +373,6 @@ static int itti_dump_flush_ring_buffer(int flush_all)
lfds611_ringbuffer_put_read_element(itti_dump_queue.itti_message_queue, element); lfds611_ringbuffer_put_read_element(itti_dump_queue.itti_message_queue, element);
} }
} while(flush_all } while(flush_all
#ifdef RTAI
&& --number_of_messages
#endif
); );
} }
...@@ -478,9 +429,6 @@ static void *itti_dump_socket(void *arg_p) ...@@ -478,9 +429,6 @@ static void *itti_dump_socket(void *arg_p)
struct sockaddr_in servaddr; /* socket address structure */ struct sockaddr_in servaddr; /* socket address structure */
struct timeval *timeout_p = NULL; struct timeval *timeout_p = NULL;
#ifdef RTAI
struct timeval timeout;
#endif
ITTI_DUMP_DEBUG(0x2, " Creating TCP dump socket on port %u\n", ITTI_PORT); ITTI_DUMP_DEBUG(0x2, " Creating TCP dump socket on port %u\n", ITTI_PORT);
...@@ -536,15 +484,11 @@ static void *itti_dump_socket(void *arg_p) ...@@ -536,15 +484,11 @@ static void *itti_dump_socket(void *arg_p)
/* Add the listener */ /* Add the listener */
FD_SET(itti_listen_socket, &read_set); FD_SET(itti_listen_socket, &read_set);
#ifndef RTAI
/* Add the event fd */ /* Add the event fd */
FD_SET(itti_dump_queue.event_fd, &read_set); FD_SET(itti_dump_queue.event_fd, &read_set);
/* Max of both sd */ /* Max of both sd */
max_sd = itti_listen_socket > itti_dump_queue.event_fd ? itti_listen_socket : itti_dump_queue.event_fd; max_sd = itti_listen_socket > itti_dump_queue.event_fd ? itti_listen_socket : itti_dump_queue.event_fd;
#else
max_sd = itti_listen_socket;
#endif
itti_dump_queue.itti_listen_socket = itti_listen_socket; itti_dump_queue.itti_listen_socket = itti_listen_socket;
...@@ -557,14 +501,7 @@ static void *itti_dump_socket(void *arg_p) ...@@ -557,14 +501,7 @@ static void *itti_dump_socket(void *arg_p)
int i; int i;
memcpy(&working_set, &read_set, sizeof(read_set)); memcpy(&working_set, &read_set, sizeof(read_set));
#ifdef RTAI
timeout.tv_sec = 0;
timeout.tv_usec = 100000;
timeout_p = &timeout;
#else
timeout_p = NULL; timeout_p = NULL;
#endif
/* No timeout: select blocks till a new event has to be handled /* No timeout: select blocks till a new event has to be handled
* on sd's. * on sd's.
...@@ -592,8 +529,6 @@ static void *itti_dump_socket(void *arg_p) ...@@ -592,8 +529,6 @@ static void *itti_dump_socket(void *arg_p)
if (FD_ISSET(i, &working_set)) { if (FD_ISSET(i, &working_set)) {
desc_ready -= 1; desc_ready -= 1;
#ifndef RTAI
if (i == itti_dump_queue.event_fd) { if (i == itti_dump_queue.event_fd) {
/* Notification of new element to dump from other tasks */ /* Notification of new element to dump from other tasks */
eventfd_t sem_counter; eventfd_t sem_counter;
...@@ -613,7 +548,6 @@ static void *itti_dump_socket(void *arg_p) ...@@ -613,7 +548,6 @@ static void *itti_dump_socket(void *arg_p)
if (itti_dump_running) { if (itti_dump_running) {
ITTI_DUMP_DEBUG (0x4, " No messages consumers, waiting ...\n"); ITTI_DUMP_DEBUG (0x4, " No messages consumers, waiting ...\n");
usleep(100 * 1000); usleep(100 * 1000);
#ifndef RTAI
{ {
ssize_t write_ret; ssize_t write_ret;
...@@ -622,7 +556,6 @@ static void *itti_dump_socket(void *arg_p) ...@@ -622,7 +556,6 @@ static void *itti_dump_socket(void *arg_p)
write_ret = write(itti_dump_queue.event_fd, &sem_counter, sizeof(sem_counter)); write_ret = write(itti_dump_queue.event_fd, &sem_counter, sizeof(sem_counter));
AssertFatal (write_ret == sizeof(sem_counter), "Failed to write to dump event FD (%d/%d)!\n", (int) write_ret, (int) sem_counter); AssertFatal (write_ret == sizeof(sem_counter), "Failed to write to dump event FD (%d/%d)!\n", (int) write_ret, (int) sem_counter);
} }
#endif
} else { } else {
itti_dump_socket_exit(); itti_dump_socket_exit();
} }
...@@ -630,7 +563,6 @@ static void *itti_dump_socket(void *arg_p) ...@@ -630,7 +563,6 @@ static void *itti_dump_socket(void *arg_p)
ITTI_DUMP_DEBUG(0x1, " Write element to file\n"); ITTI_DUMP_DEBUG(0x1, " Write element to file\n");
} }
} else } else
#endif
if (i == itti_listen_socket) { if (i == itti_listen_socket) {
do { do {
client_socket = accept(itti_listen_socket, NULL, NULL); client_socket = accept(itti_listen_socket, NULL, NULL);
...@@ -719,21 +651,9 @@ int itti_dump_queue_message(task_id_t sender_task, ...@@ -719,21 +651,9 @@ int itti_dump_queue_message(task_id_t sender_task,
AssertFatal (message_name != NULL, "Message name is NULL!\n"); AssertFatal (message_name != NULL, "Message name is NULL!\n");
AssertFatal (message_p != NULL, "Message is NULL!\n"); AssertFatal (message_p != NULL, "Message is NULL!\n");
#if defined(OAI_EMU) || defined(RTAI)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC, VCD_FUNCTION_IN);
#endif
new = itti_malloc(sender_task, TASK_MAX, sizeof(itti_dump_queue_item_t)); new = itti_malloc(sender_task, TASK_MAX, sizeof(itti_dump_queue_item_t));
#if defined(OAI_EMU) || defined(RTAI)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC, VCD_FUNCTION_OUT);
#endif
#if defined(OAI_EMU) || defined(RTAI)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC, VCD_FUNCTION_IN);
#endif
new->data = itti_malloc(sender_task, TASK_MAX, message_size); new->data = itti_malloc(sender_task, TASK_MAX, message_size);
#if defined(OAI_EMU) || defined(RTAI)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC, VCD_FUNCTION_OUT);
#endif
memcpy(new->data, message_p, message_size); memcpy(new->data, message_p, message_size);
new->data_size = message_size; new->data_size = message_size;
...@@ -791,9 +711,6 @@ int itti_dump_init(const char * const messages_definition_xml, const char * cons ...@@ -791,9 +711,6 @@ int itti_dump_init(const char * const messages_definition_xml, const char * cons
AssertFatal (0, " Failed to create ring buffer!\n"); AssertFatal (0, " Failed to create ring buffer!\n");
} }
#ifdef RTAI
itti_dump_queue.messages_in_queue = 0;
#else
itti_dump_queue.event_fd = eventfd(0, EFD_SEMAPHORE); itti_dump_queue.event_fd = eventfd(0, EFD_SEMAPHORE);
if (itti_dump_queue.event_fd == -1) { if (itti_dump_queue.event_fd == -1) {
...@@ -801,8 +718,6 @@ int itti_dump_init(const char * const messages_definition_xml, const char * cons ...@@ -801,8 +718,6 @@ int itti_dump_init(const char * const messages_definition_xml, const char * cons
AssertFatal (0, "eventfd failed: %s!\n", strerror(errno)); AssertFatal (0, "eventfd failed: %s!\n", strerror(errno));
} }
#endif
itti_dump_queue.nb_connected = 0; itti_dump_queue.nb_connected = 0;
for(i = 0; i < ITTI_DUMP_MAX_CON; i++) { for(i = 0; i < ITTI_DUMP_MAX_CON; i++) {
......
...@@ -27,11 +27,7 @@ ...@@ -27,11 +27,7 @@
#ifndef _ITTI_TYPES_H_ #ifndef _ITTI_TYPES_H_
#define _ITTI_TYPES_H_ #define _ITTI_TYPES_H_
#ifdef USER_MODE
#include <stdint.h> #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))
......
...@@ -19,15 +19,8 @@ ...@@ -19,15 +19,8 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#ifdef RTAI
# include <rtai_shm.h>
#endif
#include "assertions.h" #include "assertions.h"
#include "memory_pools.h" #include "memory_pools.h"
#if defined(OAI_EMU) || defined(RTAI)
# include "vcd_signal_dumper.h"
#endif
#if T_TRACER #if T_TRACER
#include <string.h> #include <string.h>
...@@ -37,18 +30,8 @@ ...@@ -37,18 +30,8 @@
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
const static int mp_debug = 0; const static int mp_debug = 0;
#ifdef RTAI
# define MP_DEBUG(x, args...) do { if (mp_debug) rt_printk("[MP][D]"x, ##args); } \
while(0)
#else
# define MP_DEBUG(x, args...) do { if (mp_debug) fprintf(stdout, "[MP][D]"x, ##args); fflush (stdout); } \ # define MP_DEBUG(x, args...) do { if (mp_debug) fprintf(stdout, "[MP][D]"x, ##args); fflush (stdout); } \
while(0) while(0)
#endif
#if defined(OAI_EMU) || defined(RTAI)
uint64_t vcd_mp_alloc;
uint64_t vcd_mp_free;
#endif
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
#ifndef CHARS_TO_UINT32 #ifndef CHARS_TO_UINT32
...@@ -414,11 +397,6 @@ memory_pool_item_handle_t memory_pools_allocate (memory_pools_handle_t memory_po ...@@ -414,11 +397,6 @@ memory_pool_item_handle_t memory_pools_allocate (memory_pools_handle_t memory_po
pool_id_t pool; pool_id_t pool;
items_group_index_t item_index = ITEMS_GROUP_INDEX_INVALID; items_group_index_t item_index = ITEMS_GROUP_INDEX_INVALID;
#if defined(OAI_EMU) || defined(RTAI)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_MP_ALLOC,
__sync_or_and_fetch (&vcd_mp_alloc, 1L << info_0));
#endif
/* Recover memory_pools */ /* Recover memory_pools */
memory_pools = memory_pools_from_handler (memory_pools_handle); memory_pools = memory_pools_from_handler (memory_pools_handle);
AssertError (memory_pools != NULL, {}, "Failed to retrieve memory pool for handle %p!\n", memory_pools_handle); AssertError (memory_pools != NULL, {}, "Failed to retrieve memory pool for handle %p!\n", memory_pools_handle);
...@@ -464,11 +442,6 @@ memory_pool_item_handle_t memory_pools_allocate (memory_pools_handle_t memory_po ...@@ -464,11 +442,6 @@ memory_pool_item_handle_t memory_pools_allocate (memory_pools_handle_t memory_po
MP_DEBUG(" Alloc [--][------]{------}, %3u %3u, %6u, failed!\n", info_0, info_1, item_size); MP_DEBUG(" Alloc [--][------]{------}, %3u %3u, %6u, failed!\n", info_0, info_1, item_size);
} }
#if defined(OAI_EMU) || defined(RTAI)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_MP_ALLOC,
__sync_and_and_fetch (&vcd_mp_alloc, ~(1L << info_0)));
#endif
return memory_pool_item_handle; return memory_pool_item_handle;
} }
...@@ -493,11 +466,6 @@ int memory_pools_free (memory_pools_handle_t memory_pools_handle, memory_pool_it ...@@ -493,11 +466,6 @@ int memory_pools_free (memory_pools_handle_t memory_pools_handle, memory_pool_it
info_1 = memory_pool_item->start.info[1]; info_1 = memory_pool_item->start.info[1];
#if defined(OAI_EMU) || defined(RTAI)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_MP_FREE,
__sync_or_and_fetch (&vcd_mp_free, 1L << info_1));
#endif
/* Recover pool index */ /* Recover pool index */
pool = memory_pool_item->start.pool_id; pool = memory_pool_item->start.pool_id;
AssertFatal (pool < memory_pools->pools_defined, "Pool index is invalid (%u/%u)!\n", pool, memory_pools->pools_defined); AssertFatal (pool < memory_pools->pools_defined, "Pool index is invalid (%u/%u)!\n", pool, memory_pools->pools_defined);
...@@ -531,11 +499,6 @@ int memory_pools_free (memory_pools_handle_t memory_pools_handle, memory_pool_it ...@@ -531,11 +499,6 @@ int memory_pools_free (memory_pools_handle_t memory_pools_handle, memory_pool_it
AssertError (result == EXIT_SUCCESS, {}, "Failed to free memory pool item (pool %u, item %d)!\n", pool, item_index); AssertError (result == EXIT_SUCCESS, {}, "Failed to free memory pool item (pool %u, item %d)!\n", pool, item_index);
#if defined(OAI_EMU) || defined(RTAI)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_MP_FREE,
__sync_and_and_fetch (&vcd_mp_free, ~(1L << info_1)));
#endif
return (result); return (result);
} }
......
...@@ -24,7 +24,7 @@ set(OPENAIR_NFAPIINC $ENV{NFAPI_DIR} ) ...@@ -24,7 +24,7 @@ set(OPENAIR_NFAPIINC $ENV{NFAPI_DIR} )
set(CMAKE_INSTALL_PREFIX $ENV{OPENAIR_TARGETS}) 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_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 -DNO_RRM -DNone=1 -DOAI_NW_DRIVER_USE_NETLINK -DOPENAIR2 -DOPENAIR_LTE -DPHYSIM -DPHY_CONTEXT -DRel10=1 -DS1AP_VERSION=R10 -DTRACE_RLC_MUTEX -DX2AP_VERSION=R11 -DXFORMS -mavx2 -msse4.1 -mssse3)
add_compile_options( -fPIC -march=native -Ofast) 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 include_directories( ./ ${OPENAIR_COMMON_DIR} ${OPENAIR_DIR} ${OPENAIR1_DIR} ${OPENAIR2_DIR} ${OPENAIR2_COMMON_DIR} ${OPENAIR2_DIR}/UTIL/LOG
......
This directory contains the NFAPI code.
It comes in two parts:
1 - open-nFAPI
This is a clone of the github repository
(https://github.com/cisco/open-nFAPI,
commit b3bc579b1697eab829d5d8a2de59c93a61b88fa4).
The patch open-nfapi.oai.patch has then been applied.
2 - oai_integration
This is code written by David Price from Cisco to integrate
open-nFAPI into OpenAirInterface.
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <netdb.h>
#include <pthread.h>
#include <unistd.h>
#if 0
#if 0
//DJP
#include <mutex>
#include <queue>
#include <list>
#endif
//DJP struct phy_pdu
typedef struct
{
#if 0
phy_pdu() : buffer_len(1500), buffer(0), len(0)
{
buffer = (char*) malloc(buffer_len);
}
virtual ~phy_pdu()
{
free(buffer);
}
#endif
unsigned buffer_len;
char* buffer;
unsigned len;
} phy_pdu;
// DJP class fapi_private
typedef struct
{
//std::mutex mutex;
//std::queue<phy_pdu*> rx_buffer;
//std::queue<phy_pdu*> free_store;
#if 0
public:
fapi_private()
: byte_count(0), tick(0), first_dl_config(false)
{
}
phy_pdu* allocate_phy_pdu()
{
phy_pdu* pdu = 0;
mutex.lock();
if(free_store.empty())
{
pdu = new phy_pdu();
}
else
{
pdu = free_store.front();
free_store.pop();
}
mutex.unlock();
return pdu;
}
void release_phy_pdu(phy_pdu* pdu)
{
mutex.lock();
free_store.push(pdu);
mutex.unlock();
}
bool rx_buffer_empty()
{
bool empty;
mutex.lock();
empty = rx_buffer.empty();
mutex.unlock();
return empty;
}
void push_rx_buffer(phy_pdu* buff)
{
mutex.lock();
rx_buffer.push(buff);
mutex.unlock();
}
phy_pdu* pop_rx_buffer()
{
phy_pdu* buff = 0;
mutex.lock();
if(!rx_buffer.empty())
{
buff = rx_buffer.front();
rx_buffer.pop();
}
mutex.unlock();
return buff;
}
#endif
uint32_t byte_count;
uint32_t tick;
uint8_t first_dl_config;
} fapi_private ;
#if defined(__cplusplus)
extern "C"
{
#endif
typedef struct fapi_internal
{
fapi_t _public;
fapi_cb_t callbacks;
uint8_t state;
fapi_config_t config;
int rx_sock;
int tx_sock;
struct sockaddr_in tx_addr;
uint32_t tx_byte_count;
uint32_t tick;
fapi_private* fapi;
} fapi_internal_t;
#if defined(__cplusplus)
}
#endif
#endif
void set_thread_priority(int priority)
{
//printf("%s(priority:%d)\n", __FUNCTION__, priority);
pthread_attr_t ptAttr;
struct sched_param schedParam;
schedParam.__sched_priority = priority; //79;
if(sched_setscheduler(0, SCHED_RR, &schedParam) != 0)
{
printf("Failed to set scheduler to SCHED_RR\n");
}
if(pthread_attr_setschedpolicy(&ptAttr, SCHED_RR) != 0)
{
printf("Failed to set pthread sched policy SCHED_RR\n");
}
pthread_attr_setinheritsched(&ptAttr, PTHREAD_EXPLICIT_SCHED);
struct sched_param thread_params;
thread_params.sched_priority = 20;
if(pthread_attr_setschedparam(&ptAttr, &thread_params) != 0)
{
printf("failed to set sched param\n");
}
}
#if !defined(NFAPI_PNF_H__)
#define NFAPI_PNF_H__
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
#endif
#if !defined(NFAPI_VNF_H__)
#define NFAPI_VNF_H__
void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port);
#endif
...@@ -19,31 +19,33 @@ ...@@ -19,31 +19,33 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#ifndef _IOCTL_H
#define _IOCTL_H
#include <sys/ioctl.h>
#include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <pthread.h>
#include <net/if.h>
#include <linux/ipv6.h> void set_thread_priority(int priority)
#include <linux/in.h> {
#include <linux/in6.h> //printf("%s(priority:%d)\n", __FUNCTION__, priority);
//#include <linux/netdevice.h>
pthread_attr_t ptAttr;
//#include <graal_constant.h> struct sched_param schedParam;
//#define GRAAL_STATE_IDLE 0 schedParam.__sched_priority = priority; //79;
//#define GRAAL_STATE_CONNECTED 1 if(sched_setscheduler(0, SCHED_RR, &schedParam) != 0)
//#define GRAAL_STATE_ESTABLISHMENT_REQUEST 2 {
//#define GRAAL_STATE_ESTABLISHMENT_FAILURE 3 printf("Failed to set scheduler to SCHED_RR\n");
//#define GRAAL_STATE_RELEASE_FAILURE 4 }
typedef unsigned char uint8_t; if(pthread_attr_setschedpolicy(&ptAttr, SCHED_RR) != 0)
typedef unsigned short uint16_t; {
typedef unsigned int uint32_t; printf("Failed to set pthread sched policy SCHED_RR\n");
}
extern int inet_pton(int af, const char *src, void *dst); pthread_attr_setinheritsched(&ptAttr, PTHREAD_EXPLICIT_SCHED);
extern char *inet_ntop(int af, const void *src, char *dst, size_t sise);
#endif //_IOCTL_H struct sched_param thread_params;
thread_params.sched_priority = 20;
if(pthread_attr_setschedparam(&ptAttr, &thread_params) != 0)
{
printf("failed to set sched param\n");
}
}
...@@ -19,20 +19,9 @@ ...@@ -19,20 +19,9 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#ifndef PGM_LINK_H_ #if !defined(NFAPI_PNF_H__)
#define PGM_LINK_H_ #define NFAPI_PNF_H__
/* Define prototypes only if enabled */ void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
#if defined(ENABLE_PGM_TRANSPORT)
void bypass_tx_nack(unsigned int frame, unsigned int next_slot);
int pgm_oai_init(char *if_name);
int pgm_recv_msg(int group, uint8_t *buffer, uint32_t length,
unsigned int frame, unsigned int next_slot);
int pgm_link_send_msg(int group, uint8_t *data, uint32_t len);
#endif #endif
#endif /* PGM_LINK_H_ */
...@@ -19,26 +19,9 @@ ...@@ -19,26 +19,9 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file rtai_mem.h #if !defined(NFAPI_VNF_H__)
* \brief a wrapper for Unified RTAI real-time memory management. #define NFAPI_VNF_H__
* \author Florian Kaltenberger
* \date 2011-04-06
* \version 0.1
* \company Eurecom
* \email: florian.kaltenberger@eurecom.fr
* \note
* \bug
* \warning
*/
/* void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port);
void* rt_alloc_wrapper(int size);
int rt_free_wrapper(void* ptr);
void* rt_realloc_wrapper(void* oldptr, int size);
*/
void* rt_realloc(void* oldptr, int size);
void* rt_calloc(int nmemb, int size); #endif
/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _VENDOR_EXT_H_
#define _VENDOR_EXT_H_
#include "nfapi_interface.h"
typedef enum {
P5_VENDOR_EXT_REQ = NFAPI_VENDOR_EXT_MSG_MIN,
P5_VENDOR_EXT_RSP,
P7_VENDOR_EXT_REQ,
P7_VENDOR_EXT_IND
} vendor_ext_message_id_e;
typedef struct {
nfapi_p4_p5_message_header_t header;
uint16_t dummy1;
uint16_t dummy2;
} vendor_ext_p5_req;
typedef struct {
nfapi_p4_p5_message_header_t header;
uint16_t error_code;
} vendor_ext_p5_rsp;
typedef struct {
nfapi_p7_message_header_t header;
uint16_t dummy1;
uint16_t dummy2;
} vendor_ext_p7_req;
typedef struct {
nfapi_p7_message_header_t header;
uint16_t error_code;
} vendor_ext_p7_ind;
typedef struct {
nfapi_tl_t tl;
uint32_t dummy;
} vendor_ext_tlv_1;
#define VENDOR_EXT_TLV_1_TAG 0xF001
typedef struct {
nfapi_tl_t tl;
uint32_t dummy;
} vendor_ext_tlv_2;
#define VENDOR_EXT_TLV_2_TAG 0xF002
#endif // _VENDOR_EXT_
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "oNj8JhGBN/zjzrAU7y2Nn/wxSxA/MDp2Y8fVLLp6fhx+y2mWdlMZhgCjeKSpdbGtroUnxErX1P8t+8EPz2+mMoq+G809Q9t7eJjd1+6nkVhEEfDXN83BmJkvIylC0/IKJiT2wCa8LzbdhpQUFyZ1Gk1WKZozAW5HotfFjm6/NFi/GX4uA7S0tU5E4yC3r4yqH9cLZ+arWMOEY/X0lrx0n6tLjDe921kFwkZQGFzAzrbXN2fZXKQ3xFcpREWEgEWsY7H2n4T7oJI3nEPY4P/4kvCjeQMjnlATEwtcciBiUbHRew4WWSTndF54crRlqFlzFcEf/Ouz27U/d2xYHJWcWNi88l+/qsb+V0uobwhiGUJGbVhf9IkgEO3tr/zbwkPDFrXpa/1xuSoc6jDm8i61gKQkcBhQsRFXlciPvwLhiL07gzeAfZD1Yke3tE+0geHPbEA0czzwtHe35jorAKYWsFXOXmcoK9t9SpnvBRFz6JuEsHPooafze43sTJg3qkgBszkU+U38CneeAVwo/uTA3Zw1ZrtOQv56v0UvAHze/VAF5z3rFJPl1oJl60OI8V5UBg4yIa2bySKhO//zwd4MGmsBpcWwDuu2BHUVasfk0vaetVxVVtdXG/2BuBP+IXinpJtI48NSFs6PT82dHz4cDF/iLDs0hPC6sbV258PY8F0="
language: cpp
dist: trusty
sudo: required
compiler:
- g++
before_install:
- sudo apt-get install doxygen
- sudo apt-get install libcunit1-dev
- sudo apt-get install libz-dev
- sudo apt-get install libsctp-dev
- sudo apt-get install libboost-all-dev
- autoreconf -i
addons:
coverity_scan:
project:
name: cisco-open-nFAPI
version: 1.0
description: Build submitted via Travis CI
notification_email: xxx@cisco.com
build_command_prepend: ./configure
build_command: make
branch_pattern: coverity_scan
script:
- ./configure && make && make check
This diff is collapsed.
ACLOCAL_AMFLAGS = -I m4
SUBDIRS =common/ \
sim_common/ \
nfapi/ \
pnf/ \
vnf/ \
nfapi/tests \
pnf/tests \
vnf/tests \
pnf_sim/ \
vnf_sim/ \
integration_tests/ \
docs/ \
$(NULL)
[![Build Status](https://travis-ci.org/cisco/open-nFAPI.svg?branch=master)](https://travis-ci.org/cisco/open-nFAPI)
[![Coverity Status](https://scan.coverity.com/projects/11791/badge.svg)](https://scan.coverity.com/projects/cisco-open-nfapi)
# open-nFAPI
Open-nFAPI is implementation of the Small Cell Forum's network functional API or nFAPI for short.
nFAPI defines a network protocol that is used to connect a Physical Network Function (PNF)
running LTE Layer 1 to a Virtual Network Function (VNF) running LTE layer 2 and above. The specification
can be found at http://scf.io/documents/082.
The aim of open-nFAPI is to provide an open interface between LTE layer 1 and layer 2 to allow for
interoperability between the PNF and VNF & also to facilitate the sharing of PNF's between
different VNF's
Open-nFAPI implements the P4, P5 and P7 interfaces as defined by the nFAPI specification.
* The P5 interface allows the VNF to query and configure the 'resources' of the PNF; i.e slice it into
1 or more PHY instances.
* The P7 interface is used to send the subframe information between the PNF and VNF for a PHY instance
* The P4 interface allows the VNF to request the PNF PHY instance to perform measurements of the surrounding network
The remaining interfaces are currently outside of the scope of this project.
Supports release 082.09.05 of the nFAPI specification
**The Small Cell Forum cordially requests that any derivative work that looks to
extend the nFAPI libraries use the specified vendor extension techniques,
so ensuring the widest interoperability of the baseline nFAPI specification
in those derivative works.**
## Awards
The Open-nFAPI project has won the Small Cell Forum Judges Choice award 2017. (http://www.smallcellforum.org/awards-2/winners-2017/)
## Licensing
The open-nFAPI libraries are release by CISCO under an Apache 2 license. See `LICENSE.md` file for details
## Downloading
The open-nFAPI project can be pulled from git hub
```
git clone https://github.com/cisco/open-nFAPI.git nfapi
```
The following dependencies are required. These are based on a fresh ubuntu installation.
```
sudo apt-get install autoconf
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install libtool
sudo apt-get install make
sudo apt-get install doxygen
sudo apt-get install libcunit1-dev
sudo apt-get install libz-dev
sudo apt-get install libsctp-dev
sudo apt-get install libboost-all-dev
```
## Building
To build the open-nFAPI project
```
autoreconf -i
./configure
make
```
To run the unit and integration tests
```
make check
```
You may notice in the console output of the final integration tests the following
```
*** Missing subframe 123 125
```
Out of the box the machine on which you are running has not be configured for real time operation as a result
the vnf may not be scheduled at the correct times and hence it may risk 'missing' subframe opportunities. This
warning indicates this has happened.
## Running the simulator
The vnf and pnf simulator can be run using the following commands. The pnf and vnf simulator support sourcing and sinking
data over udp. Review the xml configuration files for the details of the port and address to configure. Console logging will show
which address:port is being used
Note : Pinning the simulators to unused cores will produce more consistent behaviour.
Note : You may have to run the processes with sudo to be able to set the real time scheduling and priority
### vnf simulator
To run the vnf simulator you need to specify the port the vnf will listen for p5 connection request upon and also the xml configuration file
```
vnfsim <port> <xml config file>
```
### pnf simulator
To run the vnf simulator you need to specify the addrss & port the pnf will connect to the vnf on and also the xml configuration file
```
pnfsim <address> <port> <xml config file>
```
## Directory structure
```
docs doxgen documentation
common common code used by the nfapi libraries
nfapi the nfapi library including message definitions & encode/decode functions
pnf the pnf library for p4, p5, & p7 interfaces
vnf the vnf library for p4, p5, & p7 interfaces
sim_common common simulation for used by the vnf and pnf sim
vnf_sim a vnf simulator including a stub mac implementation
pnf_sim a pnf simualtor including a fapi interface defintion and stub implementation
xml xml configuration files for the vnf and pnf simulator
wireshark code for a wireshark dissector for the nFAPI protocol
```
## Coverity
Coverity runs on the coverity-scan branch. Changes must be merged to the coverity-scan branch to be checked.
## eNB Integration - Open Air Interface
The open-nFAPI implementation has been integrated with the Open Air Interface solution here (https://gitlab.eurecom.fr/oai/openairinterface5g) and is (at the time of writing) here (https://gitlab.eurecom.fr/daveprice/openairinterface5g/tree/nfapi-ru-rau-split). The open-nFAPI implementation is integrated with the source eNB implementation with any changes required applied as a patch on top of the baseline open-nFAPI library. Any extensions required must be implemented through the vendor extensions as specified by the Small Cell Forum documentation. Any integration wrapping of functionality must be done within the target environment as shown in the Open Air Interface implementation nfapi directory which is defined by the $NFAPI_DIR location at the top level.
#
# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
AM_CPPFLAGS = -I$(top_srcdir)/common/public_inc -g -Wall -Werror
noinst_LIBRARIES =libnfapi_common.a
libnfapi_common_a_SOURCES = src/debug.c
libnfapi_common_a_CFLAGS =$(AM_CFLAGS)
lib_LTLIBRARIES =libnfapi_common.la
libnfapi_common_la_SOURCES = src/debug.c
/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _DEBUG_H_
#define _DEBUG_H_
/*! The trace levels used by the nfapi libraries */
typedef enum nfapi_trace_level
{
NFAPI_TRACE_ERROR = 1,
NFAPI_TRACE_WARN,
NFAPI_TRACE_NOTE,
NFAPI_TRACE_INFO,
NFAPI_TRACE_LEVEL_MAX
} nfapi_trace_level_t;
/*! The trace function pointer */
typedef void (*nfapi_trace_fn_t)(nfapi_trace_level_t level, const char* format, ...);
/*! Global trace function */
extern nfapi_trace_fn_t nfapi_trace_g;
/*! Global trace level */
extern nfapi_trace_level_t nfapi_trace_level_g;
/*! NFAPI trace macro */
//#define NFAPI_TRACE(level, format, ...) { if(nfapi_trace_g && ((nfapi_trace_level_t)level <= nfapi_trace_level_g)) (*nfapi_trace_g)(level, format, ##__VA_ARGS__); }
#define NFAPI_TRACE(level, format, ...) { if (nfapi_trace_g) (*nfapi_trace_g)(level, format, ##__VA_ARGS__); }
/*! Function to change the trace level
* \param new_level The modified trace level
*/
void nfapi_set_trace_level(nfapi_trace_level_t new_level);
#endif /* _DEBUG_H_ */
/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/types.h>
#include <pthread.h>
#include <syslog.h>
#include <debug.h>
#define MAX_MSG_LENGTH 2096
#define TRACE_HEADER_LENGTH 44
void nfapi_trace_dbg(nfapi_trace_level_t level, const char *format, ...);
// initialize the trace function to 0
void (*nfapi_trace_g)(nfapi_trace_level_t level, const char* format, ...) = &nfapi_trace_dbg;
nfapi_trace_level_t nfapi_trace_level_g = NFAPI_TRACE_INFO;
//nfapi_trace_level_t nfapi_trace_level_g = NFAPI_TRACE_WARN;
void nfapi_set_trace_level(nfapi_trace_level_t new_level)
{
nfapi_trace_level_g = new_level;
}
void nfapi_trace_dbg(nfapi_trace_level_t level, const char *format, ...)
{
char trace_buff[MAX_MSG_LENGTH + TRACE_HEADER_LENGTH];
uint32_t num_chars;
va_list p_args;
struct timeval tv;
pthread_t tid = pthread_self();
(void)gettimeofday(&tv, NULL);
num_chars = (uint32_t)snprintf(trace_buff, TRACE_HEADER_LENGTH, "%04u.%06u: 0x%02x: %10u: ", ((uint32_t)tv.tv_sec) & 0x1FFF, (uint32_t)tv.tv_usec, (uint32_t)level, (uint32_t)tid);
if (num_chars > TRACE_HEADER_LENGTH)
{
printf("trace_dbg: Error, num_chars is too large: %d", num_chars);
return;
}
va_start(p_args, format);
if ((num_chars = (uint32_t)vsnprintf(&trace_buff[num_chars], MAX_MSG_LENGTH, format, p_args)))
{
if (level <= NFAPI_TRACE_WARN)
{
printf("%s", trace_buff);
}
printf("%s", trace_buff);
}
va_end(p_args);
}
AC_INIT([open-nFAPI], [1.0])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign serial-tests])
AM_PROG_AR
LT_INIT([shared static])
# Dependencies
AC_PROG_CC
AC_PROG_CXX
AC_PROG_AWK
AC_CONFIG_HEADERS([config.h])
AC_PROG_LIBTOOL
AC_CHECK_FILE([/usr/include/CUnit/CUnit.h],
[CFLAGS_CUNIT=-I/usr/include/CUnit AC_SUBST(CFLAGS_CUNIT)],
[AC_MSG_NOTICE([Have cunit *************])])
# Need doxygen
AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN";
then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
fi
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile])])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_CONFIG_FILES([Makefile
sim_common/Makefile
common/Makefile
nfapi/Makefile
pnf/Makefile
vnf/Makefile
nfapi/tests/Makefile
pnf/tests/Makefile
vnf/tests/Makefile
pnf_sim/Makefile
vnf_sim/Makefile
integration_tests/Makefile
docs/Makefile
])
AC_OUTPUT
This diff is collapsed.
This diff is collapsed.
#
# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if HAVE_DOXYGEN
directory = $(top_srcdir)/docs/man/man3/
dist_man_MANS = $(directory)/man_page_1.3 $(directory)/man_page_2.3
$(directory)/man_page_1.3: doxyfile.stamp
$(directory)/man_page_2.3: doxyfile.stamp
doxyfile.stamp:
$(DOXYGEN) Doxyfile
echo Timestamp > doxyfile.stamp
CLEANFILES = doxyfile.stamp
all-local: doxyfile.stamp
clean-local:
rm -rf $(top_srcdir)/docs/man
rm -rf $(top_srcdir)/docs/html
rm -rf $(top_srcdir)/docs/latex
endif
This diff is collapsed.
#
# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#vnf unit test
AM_CPPFLAGS = -I../nfapi/inc -I../nfapi/public_inc -I../common/public_inc -I../vnf/public_inc $(CFLAGS_CUNIT) -Wall -Werror
export LD_LIBRARY_PATH=/opt/gcc-4.7.3/lib
check_PROGRAMS= nfapi_integration_tests
nfapi_integration_tests_SOURCES = main.cpp ../common/src/debug.c
nfapi_integration_tests_LDADD= -L$(libdir) -lpthread -lrt -lcunit
LOG_DRIVER = $(top_srcdir)/tap-driver.sh
TESTS=nfapi_integration_tests
EXTRA_DIST=$(TESTS)
This diff is collapsed.
#
# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
AUTOMAKE_OPTIONS=subdir-objects
AM_CPPFLAGS = -I$(top_srcdir)/nfapi/inc -I$(top_srcdir)/nfapi/public_inc -I$(top_srcdir)/common/public_inc -I$(top_srcdir)/pnf/public_inc $(BOOST_CPPFLAGS) -Wall -Werror -g
noinst_LIBRARIES = libnfapi.a
libnfapi_a_SOURCES = src/nfapi.c src/nfapi_p5.c src/nfapi_p7.c src/nfapi_p4.c
libnfapi_a_CFLAGS =$(AM_CFLAGS)
lib_LTLIBRARIES = libnfapi.la
libnfapi_la_SOURCES = src/nfapi.c src/nfapi_p5.c src/nfapi_p7.c src/nfapi_p4.c
LDADD= ../pnf/src/libnfapi_pnf.a ../vnf/src/libnfapi_vnf.a ../common/bin/libnfapi_common.a
/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _NFAPI_H_
#define _NFAPI_H_
#if defined(__cplusplus)
extern "C" {
#endif
// todo : move to public_inc so can be used by vendor extensions
#define MAX_BAD_TAG 3
uint8_t push8(uint8_t in, uint8_t **out, uint8_t *end);
uint8_t pushs8(int8_t in, uint8_t **out, uint8_t *end);
uint8_t push16(uint16_t in, uint8_t **out, uint8_t *end);
uint8_t pushs16(int16_t in, uint8_t **out, uint8_t *end);
uint8_t push32(uint32_t in, uint8_t **out, uint8_t *end);
uint8_t pushs32(int32_t in, uint8_t **out, uint8_t *end);
uint8_t pull8(uint8_t **in, uint8_t *out, uint8_t *end);
uint8_t pulls8(uint8_t **in, int8_t *out, uint8_t *end);
uint8_t pull16(uint8_t **in, uint16_t *out, uint8_t *end);
uint8_t pulls16(uint8_t **in, int16_t *out, uint8_t *end);
uint8_t pull32(uint8_t **in, uint32_t *out, uint8_t *end);
uint8_t pulls32(uint8_t **in, int32_t *out, uint8_t *end);
uint32_t pullarray8(uint8_t **in, uint8_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pullarray16(uint8_t **in, uint16_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pullarrays16(uint8_t **in, int16_t out[], uint32_t max_len, uint32_t len, uint8_t *end);
uint32_t pusharray8(uint8_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
uint32_t pusharray16(uint16_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
uint32_t pusharrays16(int16_t in[], uint32_t max_len, uint32_t len, uint8_t **out, uint8_t *end);
typedef uint8_t (*pack_array_elem_fn)(void* elem, uint8_t **ppWritePackedMsg, uint8_t *end);
uint8_t packarray(void* array, uint16_t elem_size, uint16_t max_count, uint16_t count, uint8_t **ppWritePackedMsg, uint8_t *end, pack_array_elem_fn fn);
typedef uint8_t (*unpack_array_elem_fn)(void* elem, uint8_t **ppReadPackedMsg, uint8_t *end);
uint8_t unpackarray(uint8_t **ppReadPackedMsg, void* array, uint16_t elem_size, uint16_t max_count, uint16_t count, uint8_t *end, unpack_array_elem_fn fn);
uint8_t pack_tl(nfapi_tl_t *tl, uint8_t **ppWritePackedMsg, uint8_t *end);
uint8_t unpack_tl(uint8_t **ppReadPackedMsg, nfapi_tl_t *tl, uint8_t *end);
typedef uint8_t (*pack_tlv_fn)(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end);
uint8_t pack_tlv(uint16_t tag, void *tlv, uint8_t **ppWritePackedMsg, uint8_t *end, pack_tlv_fn fn);
uint32_t pack_vendor_extension_tlv(nfapi_tl_t* ve, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t* config);
int unpack_vendor_extension(nfapi_tl_t* tl, uint8_t **ppReadPackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t* config, nfapi_tl_t** ve_tlv);
typedef uint8_t (*unpack_tlv_fn)(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end);
typedef struct
{
uint16_t tag;
void* tlv;
unpack_tlv_fn unpack_func;
} unpack_tlv_t;
int unpack_tlv_list(unpack_tlv_t unpack_fns[], uint16_t size, uint8_t **ppReadPackedMsg, uint8_t* packedMsgEnd, nfapi_p4_p5_codec_config_t* config, nfapi_tl_t** ve);
uint32_t pack_p7_vendor_extension_tlv(nfapi_tl_t *ve, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t* config);
typedef uint8_t (*unpack_p7_tlv_fn)(void* tlv, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t*);
typedef struct
{
uint16_t tag;
void* tlv;
unpack_p7_tlv_fn unpack_func;
} unpack_p7_tlv_t;
int unpack_p7_tlv_list(unpack_p7_tlv_t unpack_fns[], uint16_t size, uint8_t **ppReadPackedMsg, uint8_t* packedMsgEnd, nfapi_p7_codec_config_t* config, nfapi_tl_t** ve);
#if defined(__cplusplus)
}
#endif
#endif /* _NFAPI_H_ */
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#define NFAPI_MAX_NUM_ANTENNAS 8 #define NFAPI_MAX_NUM_ANTENNAS 8
#define NFAPI_MAX_NUM_SUBBANDS 13 #define NFAPI_MAX_NUM_SUBBANDS 13
#define NFAPI_MAX_BF_VECTORS 8 #define NFAPI_MAX_BF_VECTORS 8
#define NFAPI_MAX_CC 2 #define NFAPI_MAX_CC 1
#define NFAPI_MAX_NUM_PHYSICAL_ANTENNAS 8 #define NFAPI_MAX_NUM_PHYSICAL_ANTENNAS 8
#define NFAPI_MAX_RSSI 8 #define NFAPI_MAX_RSSI 8
#define NFAPI_MAX_PSC_LIST 32 #define NFAPI_MAX_PSC_LIST 32
...@@ -1689,7 +1689,7 @@ typedef struct { ...@@ -1689,7 +1689,7 @@ typedef struct {
uint16_t number_pdu; uint16_t number_pdu;
uint8_t number_pdsch_rnti; uint8_t number_pdsch_rnti;
uint16_t transmission_power_pcfich; uint16_t transmission_power_pcfich;
nfapi_dl_config_request_pdu_t* dl_config_pdu_list; nfapi_dl_config_request_pdu_t* dl_config_pdu_list;
} nfapi_dl_config_request_body_t; } nfapi_dl_config_request_body_t;
#define NFAPI_DL_CONFIG_REQUEST_BODY_TAG 0x2000 #define NFAPI_DL_CONFIG_REQUEST_BODY_TAG 0x2000
...@@ -1962,7 +1962,7 @@ typedef struct { ...@@ -1962,7 +1962,7 @@ typedef struct {
} nfapi_ul_config_harq_information_rel8_fdd_t; } nfapi_ul_config_harq_information_rel8_fdd_t;
#define NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL8_FDD_TAG 0x2019 #define NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL8_FDD_TAG 0x2019
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint8_t harq_size; uint8_t harq_size;
uint8_t ack_nack_mode; uint8_t ack_nack_mode;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#
# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#nfapi unit test
AUTOMAKE_OPTIONS=subdir-objects
AM_CPPFLAGS = -I$(top_srcdir)/nfapi/inc -I$(top_srcdir)/nfapi/public_inc -I$(top_srcdir)/common/public_inc -I$(top_srcdir)pnf/public_inc $(CFLAGS_CUNIT) -Wall -Werror
AM_CFLAGS = -I$(top_srcdir)/nfapi/inc -I$(top_srcdir)/nfapi/public_inc -I$(top_srcdir)/common/public_inc -I$(top_srcdir)/pnf/public_inc $(CFLAGS_CUNIT) -Wall -Werror
check_PROGRAMS= test_nfapi
test_nfapi_SOURCES = nfapi_cunit_main.c ../src/nfapi.c ../src/nfapi_p7.c ../../common/src/debug.c ../src/nfapi_p5.c ../src/nfapi_p4.c
test_nfapi_LDADD=$(top_builddir)/pnf/libnfapi_pnf.a -L$(libdir) -lpthread -lrt -lsctp -lz -lcunit
#jTEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh --ingore-exit
#TEST_ENVIRONMENT = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh
#AM_TESTS_ENVIRONMENT = env AM_TAP_AWK='$(AWK)' $(SHELL);
LOG_DRIVER = $(top_srcdir)/tap-driver.sh
#AM_LOG_FLAGS = -- test_nfapi
TESTS=$(check_PROGRAMS)
EXTRA_DIST = $(TESTS)
This diff is collapsed.
#
# Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
AUTOMAKE_OPTIONS=subdir-objects
AM_CPPFLAGS = -I$(top_srcdir)/pnf/inc -I$(top_srcdir)/pnf/public_inc -I$(top_srcdir)/nfapi/public_inc -I$(top_srcdir)/common/public_inc -g -Wall -Werror
noinst_LIBRARIES = libnfapi_pnf.a
libnfapi_pnf_a_SOURCES = src/pnf.c\
src/pnf_interface.c\
src/pnf_p7.c\
src/pnf_p7_interface.c
LDADD = -lsctp
/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _PNF_H_
#define _PNF_H_
#include "nfapi_pnf_interface.h"
#define NFAPI_MAX_PACKED_MESSAGE_SIZE 8192
typedef struct {
nfapi_pnf_config_t _public;
int p5_sock;
uint8_t tx_message_buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE];
uint8_t sctp;
uint8_t terminate;
} pnf_t;
int pnf_connect(pnf_t *pnf);
int pnf_message_pump(pnf_t *pnf);
int pnf_pack_and_send_p5_message(pnf_t* pnf, nfapi_p4_p5_message_header_t* msg, uint32_t msg_len);
int pnf_pack_and_send_p4_message(pnf_t* pnf, nfapi_p4_p5_message_header_t* msg, uint32_t msg_len);
int pnf_send_message(pnf_t* pnf, uint8_t* msg, uint32_t msg_len, uint16_t stream_id);
nfapi_pnf_phy_config_t* nfapi_pnf_phy_config_find(nfapi_pnf_config_t* config, uint16_t phy_id);
#endif // _PNF_H_
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment