Commit 714e9bb6 authored by navid's avatar navid

* Add PRINT_STATS for oaisim in addition to XFORMS

* Add RLC stats to openair2_proc
* fix the autotests failure
* some other cleanup


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7699 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b368c44f
...@@ -174,6 +174,8 @@ add_boolean_option(PDCP_MSG_PRINT False "print PDCP messages") ...@@ -174,6 +174,8 @@ add_boolean_option(PDCP_MSG_PRINT False "print PDCP messages")
add_boolean_option(TEST_OMG False "???") add_boolean_option(TEST_OMG False "???")
add_boolean_option(DEBUG_OMG False "???") add_boolean_option(DEBUG_OMG False "???")
add_boolean_option(XFORMS False "This adds the possibility to see the signal oscilloscope") add_boolean_option(XFORMS False "This adds the possibility to see the signal oscilloscope")
add_boolean_option(PRINT_STATS False "This adds the possibility to see the status")
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
add_boolean_option(ENABLE_ITTI True "ITTI is internal messaging, should remain enabled for most targets") add_boolean_option(ENABLE_ITTI True "ITTI is internal messaging, should remain enabled for most targets")
......
...@@ -21,10 +21,10 @@ test_compile() { ...@@ -21,10 +21,10 @@ test_compile() {
} > $tdir/log/$1.txt 2>&1 } > $tdir/log/$1.txt 2>&1
if [ -s $3 ] ; then if [ -s $3 ] ; then
cp $3 $tdir/bin/`basename $3`.$1 cp $3 $tdir/bin/`basename $3`.$1
echo_success "$1 test compiled" echo_success "$1 $3 $5 compiled"
xUnit_success "compilation" $1 xUnit_success "compilation" $1
else else
echo_error "$1 test compilation failed" echo_error "$1 $3 $5 compilation failed"
xUnit_fail "compilation" $1 xUnit_fail "compilation" $1
fi fi
} }
...@@ -40,16 +40,16 @@ fi ...@@ -40,16 +40,16 @@ fi
cd $tdir cd $tdir
test_compile \ test_compile \
test.0101 oaisim \ test.0101 oaisim_nos1 \
oaisim $tdir/bin/oaisim.r8 oaisim_nos1 $tdir/bin/oaisim.r8 rel8.nos1
test_compile \ test_compile \
test.0102 oaisim \ test.0102 oaisim_nos1 \
oaisim $tdir/bin/oaisim.r8.nas oaisim_nos1 $tdir/bin/oaisim.r8.nas rel8.nos1.nas
test_compile \ test_compile \
test.0103 lte-softmodem \ test.0103 lte-softmodem \
lte-softmodem $tdir/bin/lte-softmodem.r8.rf lte-softmodem $tdir/bin/lte-softmodem.r8.rf rel8.rf
test_compile \ test_compile \
test.0104 dlsim \ test.0104 dlsim \
...@@ -61,19 +61,19 @@ test_compile \ ...@@ -61,19 +61,19 @@ test_compile \
test_compile \ test_compile \
test.0106 oaisim \ test.0106 oaisim \
oaisim $tdir/bin/oaisim.r8.itti oaisim $tdir/bin/oaisim.r8.itti rel8.itti
test_compile \ test_compile \
test.0107 oaisim \ test.0107 oaisim_nos1 \
oaisim $tdir/bin/oaisim.r10 oaisim_nos1 $tdir/bin/oaisim.r10 rel10.nos1
test_compile \ test_compile \
test.0108 oaisim \ test.0108 oaisim \
oaisim $tdir/bin/oaisim.r10.itti oaisim $tdir/bin/oaisim.r10.itti rel10.itti
test_compile \ test_compile \
test.0114 oaisim \ test.0114 oaisim \
oaisim $tdir/bin/oaisim.r8.itti.ral oaisim $tdir/bin/oaisim.r8.itti.ral rel8.itti.ral
test_compile \ test_compile \
test.0115 oaisim \ test.0115 oaisim \
...@@ -81,7 +81,7 @@ test_compile \ ...@@ -81,7 +81,7 @@ test_compile \
test_compile \ test_compile \
test.0120 nasmesh \ test.0120 nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko
# write the test results into a file # write the test results into a file
xUnit_write "$tdir/log/compilation_autotests.xml" xUnit_write "$tdir/log/compilation_autotests.xml"
...@@ -16,9 +16,9 @@ set ( ENABLE_SECURITY False ) ...@@ -16,9 +16,9 @@ set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False ) set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True ) set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False ) set ( ENABLE_USE_MME False )
set ( ENABLE_VCD_FIFO True ) set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True ) set ( ENB_MODE True )
set ( EPC_BUILD False )
set ( HARD_RT False ) set ( HARD_RT False )
set ( JUMBO_FRAME True ) set ( JUMBO_FRAME True )
set ( LARGE_SCALE False ) set ( LARGE_SCALE False )
...@@ -52,7 +52,7 @@ set ( OAI_EMU True ) ...@@ -52,7 +52,7 @@ set ( OAI_EMU True )
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 ( OAISIM True ) set ( OAISIM True )
set ( OPENAIR1 False ) set ( OPENAIR1 True )
set ( OPENAIR2 True ) set ( OPENAIR2 True )
set ( OPENAIR_EMU False ) set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True ) set ( OPENAIR_LTE True )
...@@ -69,7 +69,7 @@ set ( PHY_EMUL False ) ...@@ -69,7 +69,7 @@ set ( PHY_EMUL False )
set ( PHYSIM False ) set ( PHYSIM False )
set ( PUCCH True ) set ( PUCCH True )
set ( RANDOM_BF False ) 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 Rel8 ) set ( RRC_ASN1_VERSION Rel8 )
set ( RRC_DEFAULT_RAB_IS_AM False ) set ( RRC_DEFAULT_RAB_IS_AM False )
...@@ -99,8 +99,8 @@ set ( TRACE_RLC_UM_RX False ) ...@@ -99,8 +99,8 @@ set ( TRACE_RLC_UM_RX False )
set ( TRACE_RLC_UM_SEGMENT False ) set ( TRACE_RLC_UM_SEGMENT False )
set ( TRACE_RLC_UM_TX_STATUS False ) set ( TRACE_RLC_UM_TX_STATUS False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME False ) set ( USE_MME "R8" )
set ( USER_MODE True ) set ( USER_MODE True )
set ( XER_PRINT True ) set ( XER_PRINT True )
set ( XFORMS False ) set ( XFORMS False )
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
\ No newline at end of file
...@@ -41,6 +41,7 @@ source $THIS_SCRIPT_PATH/tools/build_helper ...@@ -41,6 +41,7 @@ source $THIS_SCRIPT_PATH/tools/build_helper
MSC_GEN="False" MSC_GEN="False"
XFORMS="False" XFORMS="False"
PRINT_STATS="False"
VCD_TIMING="False" VCD_TIMING="False"
REL="Rel10" REL="Rel10"
HW="EXMIMO" HW="EXMIMO"
...@@ -81,7 +82,7 @@ Options ...@@ -81,7 +82,7 @@ Options
EXMIMO (Default), USRP, BLADERF, None EXMIMO (Default), USRP, BLADERF, None
Adds this RF board support (in external packages installation and in compilation) Adds this RF board support (in external packages installation and in compilation)
--oaisim --oaisim
Makes the oaisim simulator Makes the oaisim simulator. Hardware will be defaulted to "NONE".
--phy_simulators --phy_simulators
Makes the unitary tests Layer 1 simulators Makes the unitary tests Layer 1 simulators
--core_simulators --core_simulators
...@@ -91,13 +92,18 @@ Options ...@@ -91,13 +92,18 @@ Options
-V | --vcd -V | --vcd
Adds a debgging facility to the binary files: GUI with major internal synchronization events Adds a debgging facility to the binary files: GUI with major internal synchronization events
-x | --xforms -x | --xforms
Adds a software oscilloscope feature to the produced binaries Adds a software oscilloscope feature to the produced binaries. If oaisim, then enable PRINT_STATS.
--install-system-files --install-system-files
Install OpenArInterface required files in Linux system Install OpenArInterface required files in Linux system
(will ask root password) (will ask root password)
Usage: Usage (first build):
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files
NI/ETTUS B201 + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files -w USRP' NI/ETTUS B201 + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files -w USRP
Usage (Regular):
oaisim : ./build_oai --oaisim -x
Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x
NI/ETTUS B201 + OAI ENB : ./build_oai --eNB -x -w USRP'
} }
...@@ -176,7 +182,7 @@ function main() { ...@@ -176,7 +182,7 @@ function main() {
EXE_ARGUMENTS="$EXE_ARGUMENTS -V" EXE_ARGUMENTS="$EXE_ARGUMENTS -V"
shift;; shift;;
-x | --xforms) -x | --xforms)
XFORMS=1 XFORMS="True"
EXE_ARGUMENTS="$EXE_ARGUMENTS -d" EXE_ARGUMENTS="$EXE_ARGUMENTS -d"
echo_info "Will generate the software oscilloscope features" echo_info "Will generate the software oscilloscope features"
shift;; shift;;
...@@ -245,6 +251,16 @@ function main() { ...@@ -245,6 +251,16 @@ function main() {
check_install_additional_tools check_install_additional_tools
fi fi
if [ "$oaisim" = "1" ] ; then
if [ "$HW" != "ETHERNET" ] ; then
HW="NONE"
fi
if [ "$XFORMS" == "True" ] ; then
PRINT_STATS="True"
fi
fi
echo_info "3. building the compilation directives ..." echo_info "3. building the compilation directives ..."
DIR=$OPENAIR_DIR/cmake_targets DIR=$OPENAIR_DIR/cmake_targets
...@@ -256,10 +272,10 @@ function main() { ...@@ -256,10 +272,10 @@ function main() {
mkdir -p $DIR/lte_build_oai/build mkdir -p $DIR/lte_build_oai/build
cmake_file=$DIR/lte_build_oai/CMakeLists.txt cmake_file=$DIR/lte_build_oai/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set(XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set(RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set(RF_BOARD \"${HW}\")" >> $cmake_file echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo 'set(PACKAGE_NAME "\"lte-softmodem\"")' >> $cmake_file echo 'set(PACKAGE_NAME "\"lte-softmodem\"")' >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/lte_build_oai/build cd $DIR/lte_build_oai/build
...@@ -376,9 +392,10 @@ function main() { ...@@ -376,9 +392,10 @@ function main() {
if [ "$oaisim" = "1" ] ; then if [ "$oaisim" = "1" ] ; then
dconf=$OPENAIR_DIR/targets/bin dconf=$OPENAIR_DIR/targets/bin
echo_info "Compiling at_nas_ue"
[ "$CLEAN" = "1" ] && rm -rf $DIR/at_commands/build [ "$CLEAN" = "1" ] && rm -rf $DIR/at_commands/build
echo_info "Compiling at_nas_ue"
mkdir -p $DIR/at_commands/build mkdir -p $DIR/at_commands/build
cd $DIR/at_commands/build cd $DIR/at_commands/build
cmake .. cmake ..
...@@ -389,9 +406,10 @@ function main() { ...@@ -389,9 +406,10 @@ function main() {
echo_info "Compiling oaisim" echo_info "Compiling oaisim"
cmake_file=$DIR/oaisim_build_oai/CMakeLists.txt cmake_file=$DIR/oaisim_build_oai/CMakeLists.txt
cp $DIR/oaisim_build_oai/CMakeLists.template $cmake_file cp $DIR/oaisim_build_oai/CMakeLists.template $cmake_file
echo "set(XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set(RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_build_oai/build [ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_build_oai/build
mkdir -p $DIR/oaisim_build_oai/build mkdir -p $DIR/oaisim_build_oai/build
...@@ -428,9 +446,10 @@ function main() { ...@@ -428,9 +446,10 @@ function main() {
echo_info "Compiling oaisim_nos1" echo_info "Compiling oaisim_nos1"
cmake_file=$DIR/oaisim_noS1_build_oai/CMakeLists.txt cmake_file=$DIR/oaisim_noS1_build_oai/CMakeLists.txt
cp $DIR/oaisim_noS1_build_oai/CMakeLists.template $cmake_file cp $DIR/oaisim_noS1_build_oai/CMakeLists.template $cmake_file
echo "set(XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set(RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_noS1_build_oai/build [ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_noS1_build_oai/build
mkdir -p $DIR/oaisim_noS1_build_oai/build mkdir -p $DIR/oaisim_noS1_build_oai/build
...@@ -446,12 +465,12 @@ function main() { ...@@ -446,12 +465,12 @@ function main() {
# nasmesh driver compilation # nasmesh driver compilation
compilations \ compilations \
oaisim_noS1_build_oai nasmesh \ oaisim_noS1_build_oai nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
#oai_nw_drv #oai_nw_drv
compilations \ compilations \
oaisim_noS1_build_oai oai_nw_drv \ oaisim_noS1_build_oai oai_nw_drv \
CMakeFiles/oai_nw_drv/oai_nw_drv.ko $dbin/oai_nw_drv.ko CMakeFiles/oai_nw_drv/oai_nw_drv.ko $dbin/oai_nw_drv.ko
cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt
cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file
...@@ -471,28 +490,28 @@ function main() { ...@@ -471,28 +490,28 @@ function main() {
# EPC compilation # EPC compilation
################## ##################
if [ "$EPC" = "1" ] ; then if [ "$EPC" = "1" ] ; then
echo_info "Compiling EPC" echo_info "Compiling EPC"
# Example HSS and EPC run on the same host # Example HSS and EPC run on the same host
if [ "$CLEAN" = "1" ]; then if [ "$CLEAN" = "1" ]; then
$OPENAIR_DIR/cmake_targets/tools/build_epc --clean --debug --transport-tcp-only --transport-prefer-tcp --s6a-server $OPENAIR_DIR/cmake_targets/tools/build_epc --clean --debug --transport-tcp-only --transport-prefer-tcp --s6a-server
$OPENAIR_DIR/cmake_targets/tools/build_hss --clean --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn` $OPENAIR_DIR/cmake_targets/tools/build_hss --clean --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn`
else else
$OPENAIR_DIR/cmake_targets/tools/build_epc --debug --transport-tcp-only --transport-prefer-tcp --s6a-server $OPENAIR_DIR/cmake_targets/tools/build_epc --debug --transport-tcp-only --transport-prefer-tcp --s6a-server
$OPENAIR_DIR/cmake_targets/tools/build_hss --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn` $OPENAIR_DIR/cmake_targets/tools/build_hss --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn`
fi fi
# if [ "$INSTALL_SYSTEM_FILES" = "1" ] ;then # if [ "$INSTALL_SYSTEM_FILES" = "1" ] ;then
# if [ -f $dbin/hss.conf ] ; then # if [ -f $dbin/hss.conf ] ; then
# sed -e 's/ *= */=/' $dbin/hss.conf > $dconf/hss.conf.nospace # sed -e 's/ *= */=/' $dbin/hss.conf > $dconf/hss.conf.nospace
# source $dconf/hss.conf.nospace # source $dconf/hss.conf.nospace
# rm -f $dconf/hss.conf.nospace # rm -f $dconf/hss.conf.nospace
# create_hss_database root linux "$MYSQL_user" "$MYSQL_pass" "$MYSQL_db" # create_hss_database root linux "$MYSQL_user" "$MYSQL_pass" "$MYSQL_db"
# else # else
# echo_warning "not created HSS database: config not found" # echo_warning "not created HSS database: config not found"
# fi # fi
# fi # fi
fi fi
# Auto-tests # Auto-tests
##################### #####################
if [ "$OAI_TEST" = "1" ]; then if [ "$OAI_TEST" = "1" ]; then
......
...@@ -78,4 +78,3 @@ set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) ...@@ -78,4 +78,3 @@ set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" ) set ( USE_MME "R10" )
set ( USER_MODE True ) set ( USER_MODE True )
set ( XER_PRINT False ) set ( XER_PRINT False )
set ( XFORMS False )
...@@ -80,4 +80,3 @@ set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) ...@@ -80,4 +80,3 @@ set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" ) set ( USE_MME "R10" )
set ( USER_MODE True ) set ( USER_MODE True )
set ( XER_PRINT False ) set ( XER_PRINT False )
set ( XFORMS False )
...@@ -108,6 +108,7 @@ rlc_op_status_t rlc_stat_req ( ...@@ -108,6 +108,7 @@ rlc_op_status_t rlc_stat_req (
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP, const srb_flag_t srb_flagP,
const rb_id_t rb_idP, const rb_id_t rb_idP,
unsigned int* stat_rlc_mode,
unsigned int* stat_tx_pdcp_sdu, unsigned int* stat_tx_pdcp_sdu,
unsigned int* stat_tx_pdcp_bytes, unsigned int* stat_tx_pdcp_bytes,
unsigned int* stat_tx_pdcp_sdu_discarded, unsigned int* stat_tx_pdcp_sdu_discarded,
...@@ -154,7 +155,7 @@ rlc_op_status_t rlc_stat_req ( ...@@ -154,7 +155,7 @@ rlc_op_status_t rlc_stat_req (
if (h_rc == HASH_TABLE_OK) { if (h_rc == HASH_TABLE_OK) {
rlc_mode = rlc_union_p->mode; rlc_mode = rlc_union_p->mode;
} }
*stat_rlc_mode = rlc_mode;
switch (rlc_mode) { switch (rlc_mode) {
case RLC_MODE_NONE: case RLC_MODE_NONE:
*stat_tx_pdcp_sdu = 0; *stat_tx_pdcp_sdu = 0;
......
...@@ -540,7 +540,8 @@ public_rlc(void rlc_data_conf( ...@@ -540,7 +540,8 @@ public_rlc(void rlc_data_conf(
const protocol_ctxt_t* const ctxtP, const protocol_ctxt_t* const ctxtP,
const srb_flag_t srb_flagP, const srb_flag_t srb_flagP,
const rb_id_t rb_idP, const rb_id_t rb_idP,
unsigned int* stat_tx_pdcp_sdu, unsigned int* stat_rlc_mode,
unsigned int* stat_tx_pdcp_sdu,
unsigned int* stat_tx_pdcp_bytes, unsigned int* stat_tx_pdcp_bytes,
unsigned int* stat_tx_pdcp_sdu_discarded, unsigned int* stat_tx_pdcp_sdu_discarded,
unsigned int* stat_tx_pdcp_bytes_discarded, unsigned int* stat_tx_pdcp_bytes_discarded,
...@@ -572,6 +573,7 @@ public_rlc(void rlc_data_conf( ...@@ -572,6 +573,7 @@ public_rlc(void rlc_data_conf(
* \param[in] ctxtP Running context. * \param[in] ctxtP Running context.
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0). * \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
* \param[in] rb_idP . * \param[in] rb_idP .
* \param[out] stat_rlc_mode RLC mode
* \param[out] stat_tx_pdcp_sdu Number of SDUs coming from upper layers. * \param[out] stat_tx_pdcp_sdu Number of SDUs coming from upper layers.
* \param[out] stat_tx_pdcp_bytes Number of bytes coming from upper layers. * \param[out] stat_tx_pdcp_bytes Number of bytes coming from upper layers.
* \param[out] stat_tx_pdcp_sdu_discarded Number of discarded SDUs coming from upper layers. * \param[out] stat_tx_pdcp_sdu_discarded Number of discarded SDUs coming from upper layers.
...@@ -605,7 +607,8 @@ public_rlc(rlc_op_status_t rlc_stat_req ( ...@@ -605,7 +607,8 @@ public_rlc(rlc_op_status_t rlc_stat_req (
const protocol_ctxt_t* const ctxtP, const protocol_ctxt_t* const ctxtP,
const srb_flag_t srb_flagP, const srb_flag_t srb_flagP,
const rb_id_t rb_idP, const rb_id_t rb_idP,
unsigned int* const stat_tx_pdcp_sdu, unsigned int* const stat_rlc_mode,
unsigned int* const stat_tx_pdcp_sdu,
unsigned int* const stat_tx_pdcp_bytes, unsigned int* const stat_tx_pdcp_bytes,
unsigned int* const stat_tx_pdcp_sdu_discarded, unsigned int* const stat_tx_pdcp_sdu_discarded,
unsigned int* const stat_tx_pdcp_bytes_discarded, unsigned int* const stat_tx_pdcp_bytes_discarded,
......
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
*******************************************************************************/ *******************************************************************************/
/****************************************************************************** /******************************************************************************
\file openair2_proc \file openair2_proc
# \brief print openair2 statistics # \brief print openair2 overall statistics
# \author Navid Nikaein # \author Navid Nikaein
# \date 2013 # \date 2013-2015
# \version 0.1 # \version 0.2
# \email navid.nikaein@eurecom.fr # \email navid.nikaein@eurecom.fr
# @ingroup _mac # @ingroup _openair2
*/ */
#ifdef USER_MODE #ifdef USER_MODE
...@@ -59,10 +59,12 @@ ...@@ -59,10 +59,12 @@
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
static mapping rrc_status_names[] = { static mapping rrc_status_names[] = {
{"RRC_IDLE", 0}, {"RRC_INACTIVE", 0},
{"RRC_SI_RECEIVED",1}, {"RRC_IDLE", 1},
{"RRC_CONNECTED",2}, {"RRC_SI_RECEIVED",2},
{"RRC_RECONFIGURED",3}, {"RRC_CONNECTED",3},
{"RRC_RECONFIGURED",4},
{"RRC_HO_EXECUTION",5},
{NULL, -1} {NULL, -1}
}; };
...@@ -72,7 +74,37 @@ int dump_eNB_l2_stats(char *buffer, int length) ...@@ -72,7 +74,37 @@ int dump_eNB_l2_stats(char *buffer, int length)
int eNB_id,UE_id,number_of_cards; int eNB_id,UE_id,number_of_cards;
int len= length; int len= length;
int CC_id=0; int CC_id=0;
int i; int i,j;
protocol_ctxt_t ctxt;
rlc_op_status_t rlc_status;
unsigned int stat_rlc_mode;
unsigned int stat_tx_pdcp_sdu;
unsigned int stat_tx_pdcp_bytes;
unsigned int stat_tx_pdcp_sdu_discarded;
unsigned int stat_tx_pdcp_bytes_discarded;
unsigned int stat_tx_data_pdu;
unsigned int stat_tx_data_bytes;
unsigned int stat_tx_retransmit_pdu_by_status;
unsigned int stat_tx_retransmit_bytes_by_status;
unsigned int stat_tx_retransmit_pdu;
unsigned int stat_tx_retransmit_bytes;
unsigned int stat_tx_control_pdu;
unsigned int stat_tx_control_bytes;
unsigned int stat_rx_pdcp_sdu;
unsigned int stat_rx_pdcp_bytes;
unsigned int stat_rx_data_pdus_duplicate;
unsigned int stat_rx_data_bytes_duplicate;
unsigned int stat_rx_data_pdu;
unsigned int stat_rx_data_bytes;
unsigned int stat_rx_data_pdu_dropped;
unsigned int stat_rx_data_bytes_dropped;
unsigned int stat_rx_data_pdu_out_of_window;
unsigned int stat_rx_data_bytes_out_of_window;
unsigned int stat_rx_control_pdu;
unsigned int stat_rx_control_bytes;
unsigned int stat_timer_reordering_timed_out;
unsigned int stat_timer_poll_retransmit_timed_out;
unsigned int stat_timer_status_prohibit_timed_out;
#ifdef EXMIMO #ifdef EXMIMO
number_of_cards=1; number_of_cards=1;
...@@ -141,7 +173,7 @@ int dump_eNB_l2_stats(char *buffer, int length) ...@@ -141,7 +173,7 @@ int dump_eNB_l2_stats(char *buffer, int length)
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_bitrate=((UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS*8)/((eNB->frame + 1)*10)); UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_bitrate=((UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS*8)/((eNB->frame + 1)*10));
UE_list->eNB_UE_stats[CC_id][UE_id].total_ulsch_bitrate= ((UE_list->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes_rx*8)/((eNB->frame + 1)*10)); UE_list->eNB_UE_stats[CC_id][UE_id].total_ulsch_bitrate= ((UE_list->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes_rx*8)/((eNB->frame + 1)*10));
len += sprintf(&buffer[len],"UE %d %s (DLSCH), RNTI %x : CQI %d, MCS1 %d, MCS2 %d, RB (tx %d, retx %d, total %d), ncce (tx %d, retx %d) \n", len += sprintf(&buffer[len],"[MAC] UE %d (DLSCH),status %s, RNTI %x : CQI %d, MCS1 %d, MCS2 %d, RB (tx %d, retx %d, total %d), ncce (tx %d, retx %d) \n",
UE_id, UE_id,
map_int_to_str(rrc_status_names, UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status), map_int_to_str(rrc_status_names, UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status),
UE_list->eNB_UE_stats[CC_id][UE_id].crnti, UE_list->eNB_UE_stats[CC_id][UE_id].crnti,
...@@ -169,7 +201,7 @@ int dump_eNB_l2_stats(char *buffer, int length) ...@@ -169,7 +201,7 @@ int dump_eNB_l2_stats(char *buffer, int length)
UE_list->eNB_UE_stats[CC_id][UE_id].avg_overhead_bytes UE_list->eNB_UE_stats[CC_id][UE_id].avg_overhead_bytes
); );
len += sprintf(&buffer[len],"UE %d %s (ULSCH), RNTI %x : rx power (normalized %d, target %d), MCS (pre %d, post %d), RB (rx %d, retx %d, total %d), Current TBS %d \n", len += sprintf(&buffer[len],"[MAC] UE %d (ULSCH), Status %d, RNTI %x : rx power (normalized %d, target %d), MCS (pre %d, post %d), RB (rx %d, retx %d, total %d), Current TBS %d \n",
UE_id, UE_id,
map_int_to_str(rrc_status_names, UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status), map_int_to_str(rrc_status_names, UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status),
UE_list->eNB_UE_stats[CC_id][UE_id].crnti, UE_list->eNB_UE_stats[CC_id][UE_id].crnti,
...@@ -192,17 +224,182 @@ int dump_eNB_l2_stats(char *buffer, int length) ...@@ -192,17 +224,182 @@ int dump_eNB_l2_stats(char *buffer, int length)
UE_list->eNB_UE_stats[CC_id][UE_id].total_num_pdus_rx, UE_list->eNB_UE_stats[CC_id][UE_id].total_num_pdus_rx,
UE_list->eNB_UE_stats[CC_id][UE_id].num_errors_rx); UE_list->eNB_UE_stats[CC_id][UE_id].num_errors_rx);
len+= sprintf(&buffer[len],"Received PHR PH = %d (db)\n", UE_list->UE_template[CC_id][UE_id].phr_info); len+= sprintf(&buffer[len],"[MAC] Received PHR PH = %d (db)\n", UE_list->UE_template[CC_id][UE_id].phr_info);
len+= sprintf(&buffer[len],"Received BSR LCGID[0][1][2][3] = %u %u %u %u\n", len+= sprintf(&buffer[len],"[MAC] Received BSR LCGID[0][1][2][3] = %u %u %u %u\n",
UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID0], UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID0],
UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID1], UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID1],
UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID2], UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID2],
UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID3] UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID3]
); );
} }
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt,
eNB_id,
ENB_FLAG_YES,
UE_list->eNB_UE_stats[UE_PCCID(eNB_id,UE_id)][UE_id].crnti,
eNB->frame,
eNB->subframe,
eNB_id);
rlc_status = rlc_stat_req(&ctxt,
SRB_FLAG_YES,
DCCH,
&stat_rlc_mode,
&stat_tx_pdcp_sdu,
&stat_tx_pdcp_bytes,
&stat_tx_pdcp_sdu_discarded,
&stat_tx_pdcp_bytes_discarded,
&stat_tx_data_pdu,
&stat_tx_data_bytes,
&stat_tx_retransmit_pdu_by_status,
&stat_tx_retransmit_bytes_by_status,
&stat_tx_retransmit_pdu,
&stat_tx_retransmit_bytes,
&stat_tx_control_pdu,
&stat_tx_control_bytes,
&stat_rx_pdcp_sdu,
&stat_rx_pdcp_bytes,
&stat_rx_data_pdus_duplicate,
&stat_rx_data_bytes_duplicate,
&stat_rx_data_pdu,
&stat_rx_data_bytes,
&stat_rx_data_pdu_dropped,
&stat_rx_data_bytes_dropped,
&stat_rx_data_pdu_out_of_window,
&stat_rx_data_bytes_out_of_window,
&stat_rx_control_pdu,
&stat_rx_control_bytes,
&stat_timer_reordering_timed_out,
&stat_timer_poll_retransmit_timed_out,
&stat_timer_status_prohibit_timed_out);
if (rlc_status == RLC_OP_STATUS_OK) {
len+=sprintf(&buffer[len],"[RLC] DCCH Mode %s, NB_SDU_TO_TX = %d (bytes %d)\tNB_SDU_TO_TX_DISC %d (bytes %d)\n",
(stat_rlc_mode==RLC_MODE_AM)? "AM": (stat_rlc_mode==RLC_MODE_UM)?"UM":"NONE",
stat_tx_pdcp_sdu,
stat_tx_pdcp_bytes,
stat_tx_pdcp_sdu_discarded,
stat_tx_pdcp_bytes_discarded);
len+=sprintf(&buffer[len],"[RLC] DCCH Mode %s, NB_TX_DATA = %d (bytes %d)\tNB_TX_CONTROL %d (bytes %d)\tNB_TX_RETX %d (bytes %d)\tNB_TX_RETX_BY_STATUS = %d (bytes %d)\n",
(stat_rlc_mode==RLC_MODE_AM)? "AM": (stat_rlc_mode==RLC_MODE_UM)?"UM":"NONE",
stat_tx_data_pdu,
stat_tx_data_bytes,
stat_tx_control_pdu,
stat_tx_control_bytes,
stat_tx_retransmit_pdu,
stat_tx_retransmit_bytes,
stat_tx_retransmit_pdu_by_status,
stat_tx_retransmit_bytes_by_status);
len+=sprintf(&buffer[len],"[RLC] DCCH Mode %s, NB_RX_DATA = %d (bytes %d)\tNB_RX_CONTROL %d (bytes %d)\tNB_RX_DUPL %d (bytes %d)\tNB_RX_DROP = %d (bytes %d)\tNB_RX_OUT_OF_WINDOW = %d (bytes %d)\n",
(stat_rlc_mode==RLC_MODE_AM)? "AM": (stat_rlc_mode==RLC_MODE_UM)?"UM":"NONE",
stat_rx_data_pdu,
stat_rx_data_bytes,
stat_rx_control_pdu,
stat_rx_control_bytes,
stat_rx_data_pdus_duplicate,
stat_rx_data_bytes_duplicate,
stat_rx_data_pdu_dropped,
stat_rx_data_bytes_dropped,
stat_rx_data_pdu_out_of_window,
stat_rx_data_bytes_out_of_window);
len+=sprintf(&buffer[len],"[RLC] DCCH Mode %s, RX_REODERING_TIMEOUT = %d\tRX_POLL_RET_TIMEOUT %d\tRX_PROHIBIT_TIME_OUT %d\n",
(stat_rlc_mode==RLC_MODE_AM)? "AM": (stat_rlc_mode==RLC_MODE_UM)?"UM":"NONE",
stat_timer_reordering_timed_out,
stat_timer_poll_retransmit_timed_out,
stat_timer_status_prohibit_timed_out);
len+=sprintf(&buffer[len],"[RLC] DCCH Mode %s, NB_SDU_TO_RX = %d (bytes %d)\n",
(stat_rlc_mode==RLC_MODE_AM)? "AM": (stat_rlc_mode==RLC_MODE_UM)?"UM":"NONE",
stat_rx_pdcp_sdu,
stat_rx_pdcp_bytes);
}
rlc_status = rlc_stat_req(&ctxt,
SRB_FLAG_NO,
DTCH-2, // DRB_IDENTITY
&stat_rlc_mode,
&stat_tx_pdcp_sdu,
&stat_tx_pdcp_bytes,
&stat_tx_pdcp_sdu_discarded,
&stat_tx_pdcp_bytes_discarded,
&stat_tx_data_pdu,
&stat_tx_data_bytes,
&stat_tx_retransmit_pdu_by_status,
&stat_tx_retransmit_bytes_by_status,
&stat_tx_retransmit_pdu,
&stat_tx_retransmit_bytes,
&stat_tx_control_pdu,
&stat_tx_control_bytes,
&stat_rx_pdcp_sdu,
&stat_rx_pdcp_bytes,
&stat_rx_data_pdus_duplicate,
&stat_rx_data_bytes_duplicate,
&stat_rx_data_pdu,
&stat_rx_data_bytes,
&stat_rx_data_pdu_dropped,
&stat_rx_data_bytes_dropped,
&stat_rx_data_pdu_out_of_window,
&stat_rx_data_bytes_out_of_window,
&stat_rx_control_pdu,
&stat_rx_control_bytes,
&stat_timer_reordering_timed_out,
&stat_timer_poll_retransmit_timed_out,
&stat_timer_status_prohibit_timed_out);
if (rlc_status == RLC_OP_STATUS_OK) {
len+=sprintf(&buffer[len],"[RLC] DTCH Mode %s, NB_SDU_TO_TX = %d (bytes %d)\tNB_SDU_TO_TX_DISC %d (bytes %d)\n",
(stat_rlc_mode==RLC_MODE_AM)? "AM": (stat_rlc_mode==RLC_MODE_UM)?"UM":"NONE",
stat_tx_pdcp_sdu,
stat_tx_pdcp_bytes,
stat_tx_pdcp_sdu_discarded,
stat_tx_pdcp_bytes_discarded);
len+=sprintf(&buffer[len],"[RLC] DTCH Mode %s, NB_TX_DATA = %d (bytes %d)\tNB_TX_CONTROL %d (bytes %d)\tNB_TX_RETX %d (bytes %d)\tNB_TX_RETX_BY_STATUS = %d (bytes %d)\n",
(stat_rlc_mode==RLC_MODE_AM)? "AM": (stat_rlc_mode==RLC_MODE_UM)?"UM":"NONE",
stat_tx_data_pdu,
stat_tx_data_bytes,
stat_tx_control_pdu,
stat_tx_control_bytes,
stat_tx_retransmit_pdu,
stat_tx_retransmit_bytes,
stat_tx_retransmit_pdu_by_status,
stat_tx_retransmit_bytes_by_status);
len+=sprintf(&buffer[len],"[RLC] DTCH Mode %s, NB_RX_DATA = %d (bytes %d)\tNB_RX_CONTROL %d (bytes %d)\tNB_RX_DUPL %d (bytes %d)\tNB_RX_DROP = %d (bytes %d)\tNB_RX_OUT_OF_WINDOW = %d (bytes %d)\n",
(stat_rlc_mode==RLC_MODE_AM)? "AM": (stat_rlc_mode==RLC_MODE_UM)?"UM":"NONE",
stat_rx_data_pdu,
stat_rx_data_bytes,
stat_rx_control_pdu,
stat_rx_control_bytes,
stat_rx_data_pdus_duplicate,
stat_rx_data_bytes_duplicate,
stat_rx_data_pdu_dropped,
stat_rx_data_bytes_dropped,
stat_rx_data_pdu_out_of_window,
stat_rx_data_bytes_out_of_window);
len+=sprintf(&buffer[len],"[RLC] DTCH Mode %s, RX_REODERING_TIMEOUT = %d\tRX_POLL_RET_TIMEOUT %d\tRX_PROHIBIT_TIME_OUT %d\n",
(stat_rlc_mode==RLC_MODE_AM)? "AM": (stat_rlc_mode==RLC_MODE_UM)?"UM":"NONE",
stat_timer_reordering_timed_out,
stat_timer_poll_retransmit_timed_out,
stat_timer_status_prohibit_timed_out);
len+=sprintf(&buffer[len],"[RLC] DTCH Mode %s, NB_SDU_TO_RX = %d (bytes %d)\n",
(stat_rlc_mode==RLC_MODE_AM)? "AM": (stat_rlc_mode==RLC_MODE_UM)?"UM":"NONE",
stat_rx_pdcp_sdu,
stat_rx_pdcp_bytes);
}
} }
} }
return len + 1 /* SR: for trailing \0 */; return len + 1 /* SR: for trailing \0 */;
} }
......
...@@ -134,6 +134,7 @@ place_static_node (node_struct * node) ...@@ -134,6 +134,7 @@ place_static_node (node_struct * node)
LOG_I (OMG, LOG_I (OMG,
"[STATIC] Initial position of node ID: %d type(%d: %s): (X = %.2f, Y = %.2f) speed = 0.0\n", "[STATIC] Initial position of node ID: %d type(%d: %s): (X = %.2f, Y = %.2f) speed = 0.0\n",
node->id, node->type, (node->type==eNB)?"eNB":(node->type==UE)?"UE":"Relay", node->x_pos, node->y_pos); node->id, node->type, (node->type==eNB)?"eNB":(node->type==UE)?"UE":"Relay", node->x_pos, node->y_pos);
node_vector_end[node->type] = node_vector_end[node->type] =
(node_list *) add_entry (node, node_vector_end[node->type]); (node_list *) add_entry (node, node_vector_end[node->type]);
......
...@@ -458,7 +458,7 @@ int olg_config(void) ...@@ -458,7 +458,7 @@ int olg_config(void)
set_comp_log(RRC, LOG_DEBUG, 0x15,1); set_comp_log(RRC, LOG_DEBUG, 0x15,1);
set_comp_log(OCM, LOG_ERR, 0x15,20); set_comp_log(OCM, LOG_ERR, 0x15,20);
set_comp_log(OTG, LOG_DEBUG, 0x15,1); set_comp_log(OTG, LOG_DEBUG, 0x15,1);
set_comp_log(OMG, LOG_INFO, 0x15,1); set_comp_log(OMG, LOG_NOTICE, 0x15,1);
set_comp_log(OPT, LOG_ERR, 0x15,1); set_comp_log(OPT, LOG_ERR, 0x15,1);
......
...@@ -115,7 +115,7 @@ double **ShaF = NULL; ...@@ -115,7 +115,7 @@ double **ShaF = NULL;
double **s_re, **s_im, **r_re, **r_im, **r_re0, **r_im0; double **s_re, **s_im, **r_re, **r_im, **r_re0, **r_im0;
node_list* ue_node_list = NULL; node_list* ue_node_list = NULL;
node_list* enb_node_list = NULL; node_list* enb_node_list = NULL;
int omg_period = 0; int omg_period = 10000;
int pdcp_period = 0; int pdcp_period = 0;
int cba_backoff = 30; int cba_backoff = 30;
// time calibration for soft realtime mode // time calibration for soft realtime mode
......
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