From 428f3596807198560b5e46a2ad0dd774128ca6dc Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Mon, 2 May 2016 17:03:57 +0200 Subject: [PATCH 01/57] fix for race conditions in OPT/Wireshark tracing tool --- openair2/UTIL/OPT/probe.c | 141 ++++++++++++++------------------------ 1 file changed, 52 insertions(+), 89 deletions(-) diff --git a/openair2/UTIL/OPT/probe.c b/openair2/UTIL/OPT/probe.c index 28bad4d6c9..eef98ae729 100644 --- a/openair2/UTIL/OPT/probe.c +++ b/openair2/UTIL/OPT/probe.c @@ -137,27 +137,15 @@ typedef guint8 gboolean; //static unsigned char g_PDUBuffer[1600]; //static unsigned int g_PDUOffset; -#ifdef JUMBO_FRAME -static unsigned char g_frameBuffer[9000]; -#else -static unsigned char g_frameBuffer[1600]; -#endif -//static unsigned char g_fileBuffer[1600]; -static unsigned int g_frameOffset; + char in_ip[40]; char in_path[100]; -static uint16_t in_port; FILE *file_fd = NULL; trace_mode_t opt_type = OPT_NONE; static radio_type_t radio_type; static unsigned int subframesSinceCaptureStart; -// double timing_perf[250]; -// clock_t timing_in[250]; -// clock_t timing_out[250]; -int test=0; -int init_value=0; static int g_socksd = -1;/* UDP socket used for sending frames */ static struct sockaddr_in g_serv_addr; @@ -277,66 +265,73 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType, guint8 oob_event, guint8 oob_event_value, uint8_t *pdu_buffer, unsigned int pdu_buffer_size) { + #ifdef JUMBO_FRAME + static unsigned char frameBuffer[9000]; + #else + static unsigned char frameBuffer[1600]; + #endif + static unsigned int frameOffset; + ssize_t bytesSent; - g_frameOffset = 0; + frameOffset = 0; uint16_t tmp16; /********************************************************************/ /* Fixed start to each frame (allowing heuristic dissector to work) */ /* Not NULL terminated */ - memset(g_frameBuffer+g_frameOffset, 0, sizeof(mac_lte_info)+pdu_buffer_size + 8); + memset(frameBuffer+frameOffset, 0, sizeof(mac_lte_info)+pdu_buffer_size + 8); - memcpy(g_frameBuffer+g_frameOffset, MAC_LTE_START_STRING, + memcpy(frameBuffer+frameOffset, MAC_LTE_START_STRING, strlen(MAC_LTE_START_STRING)); - g_frameOffset += strlen(MAC_LTE_START_STRING); + frameOffset += strlen(MAC_LTE_START_STRING); /******************************************************************************/ /* Now write out fixed fields (the mandatory elements of struct mac_lte_info) */ - g_frameBuffer[g_frameOffset++] = radioType; - g_frameBuffer[g_frameOffset++] = direction; - g_frameBuffer[g_frameOffset++] = rntiType; + frameBuffer[frameOffset++] = radioType; + frameBuffer[frameOffset++] = direction; + frameBuffer[frameOffset++] = rntiType; /*************************************/ /* Now optional fields */ /* RNTI */ - g_frameBuffer[g_frameOffset++] = MAC_LTE_RNTI_TAG; + frameBuffer[frameOffset++] = MAC_LTE_RNTI_TAG; tmp16 = htons(rnti); - memcpy(g_frameBuffer+g_frameOffset, &tmp16, 2); - g_frameOffset += 2; + memcpy(frameBuffer+frameOffset, &tmp16, 2); + frameOffset += 2; /* UEId */ - g_frameBuffer[g_frameOffset++] = MAC_LTE_UEID_TAG; + frameBuffer[frameOffset++] = MAC_LTE_UEID_TAG; tmp16 = htons(ueid); - memcpy(g_frameBuffer+g_frameOffset, &tmp16, 2); - g_frameOffset += 2; + memcpy(frameBuffer+frameOffset, &tmp16, 2); + frameOffset += 2; /* Subframe number */ - g_frameBuffer[g_frameOffset++] = MAC_LTE_SUBFRAME_TAG; + frameBuffer[frameOffset++] = MAC_LTE_SUBFRAME_TAG; tmp16 = htons(subframeNumber); // frame counter : this will give an expert info as wireshark expects SF and not F - memcpy(g_frameBuffer+g_frameOffset, &tmp16, 2); - g_frameOffset += 2; + memcpy(frameBuffer+frameOffset, &tmp16, 2); + frameOffset += 2; - g_frameBuffer[g_frameOffset++] = MAC_LTE_CRC_STATUS_TAG; - g_frameBuffer[g_frameOffset++] = crcStatus; + frameBuffer[frameOffset++] = MAC_LTE_CRC_STATUS_TAG; + frameBuffer[frameOffset++] = crcStatus; #ifdef WIRESHARK_DEV - g_frameOffset += 2; + frameOffset += 2; tmp16 = htons(subframeNumber); // subframe - memcpy(g_frameBuffer+g_frameOffset, &tmp16, 2); - g_frameOffset += 2; + memcpy(frameBuffer+frameOffset, &tmp16, 2); + frameOffset += 2; #endif /***********************************************************/ /* For these optional fields, no need to encode if value is default */ if (!isPredefinedData) { - g_frameBuffer[g_frameOffset++] = MAC_LTE_PREDEFINED_DATA_TAG; - g_frameBuffer[g_frameOffset++] = isPredefinedData; + frameBuffer[frameOffset++] = MAC_LTE_PREDEFINED_DATA_TAG; + frameBuffer[frameOffset++] = isPredefinedData; } if (retx != 0) { - g_frameBuffer[g_frameOffset++] = MAC_LTE_RETX_TAG; - g_frameBuffer[g_frameOffset++] = retx; + frameBuffer[frameOffset++] = MAC_LTE_RETX_TAG; + frameBuffer[frameOffset++] = retx; } #ifdef WIRESHARK_DEV @@ -347,19 +342,19 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType, switch (oob_event) { case ltemac_send_preamble : LOG_D(OPT,"oob event %d %d\n",ltemac_send_preamble ); - //g_frameBuffer[g_frameOffset++]=0; - //g_frameBuffer[g_frameOffset++]=0; - //g_frameBuffer[g_frameOffset++]=0; - g_frameBuffer[g_frameOffset++] = MAC_LTE_OOB_EVENT_TAG; - g_frameBuffer[g_frameOffset++]=ltemac_send_preamble; - g_frameBuffer[g_frameOffset++]=rnti; // is the preamble - g_frameBuffer[g_frameOffset++]=oob_event_value; + //frameBuffer[frameOffset++]=0; + //frameBuffer[frameOffset++]=0; + //frameBuffer[frameOffset++]=0; + frameBuffer[frameOffset++] = MAC_LTE_OOB_EVENT_TAG; + frameBuffer[frameOffset++]=ltemac_send_preamble; + frameBuffer[frameOffset++]=rnti; // is the preamble + frameBuffer[frameOffset++]=oob_event_value; break; case ltemac_send_sr: - g_frameBuffer[g_frameOffset++]=ltemac_send_sr; - g_frameOffset+=2; - g_frameBuffer[g_frameOffset++]=oob_event_value; + frameBuffer[frameOffset++]=ltemac_send_sr; + frameOffset+=2; + frameBuffer[frameOffset++]=oob_event_value; break; case ltemac_sr_failure: @@ -372,23 +367,23 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType, #endif /***************************************/ /* Now write the MAC PDU */ - g_frameBuffer[g_frameOffset++] = MAC_LTE_PAYLOAD_TAG; + frameBuffer[frameOffset++] = MAC_LTE_PAYLOAD_TAG; /* Append actual PDU */ - //memcpy(g_frameBuffer+g_frameOffset, g_PDUBuffer, g_PDUOffset); - //g_frameOffset += g_PDUOffset; + //memcpy(frameBuffer+frameOffset, g_PDUBuffer, g_PDUOffset); + //frameOffset += g_PDUOffset; if (pdu_buffer != NULL) { - memcpy(g_frameBuffer+g_frameOffset, (void*)pdu_buffer, pdu_buffer_size); - g_frameOffset += pdu_buffer_size; + memcpy(frameBuffer+frameOffset, (void*)pdu_buffer, pdu_buffer_size); + frameOffset += pdu_buffer_size; } /* Send out the data over the UDP socket */ - bytesSent = sendto(g_socksd, g_frameBuffer, g_frameOffset, 0, + bytesSent = sendto(g_socksd, frameBuffer, frameOffset, 0, (const struct sockaddr *)&g_serv_addr, sizeof(g_serv_addr)); - if (bytesSent != g_frameOffset) { + if (bytesSent != frameOffset) { LOG_W(OPT, "sendto() failed (not a thread-safe func)- expected %d bytes, got %d (errno=%d)\n", - g_frameOffset, bytesSent, errno); + frameOffset, bytesSent, errno); //exit(1); } } @@ -509,6 +504,7 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size, /*---------------------------------------------------*/ int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p) { + uint16_t in_port; subframesSinceCaptureStart = 0; if (path != NULL) { @@ -612,37 +608,4 @@ void terminate_opt(void) break; } } -/* -double *timing_analyzer(int index, int direction ){ -// -int i; -if (direction==0)// in -{ - timing_in[index]=clock(); - //if(timing_out[index+100]>timing_in[index+100]); - //timing_perf[index+100] +=(double)((double)(timing_out[index+100]-timing_in[index+100])/(double)CLOCKS_PER_SEC); -} -else -{ - timing_out[index]=clock(); - if(index==5)timing_perf[index]=0; - timing_perf[index] +=(double)((double)(timing_out[index]-timing_in[index])/(((double)CLOCKS_PER_SEC)/1000000)); - //LOG_I(OPT,"timing_analyser index %d =%f\n",index,timing_perf[index]); - init_value++; - if(init_value==500) - { - for(i=0;i<6;i++) - { - LOG_I(OPT,"timing_analyser index %d =%f\n",i,timing_perf[i]); - } - init_value=0; - } - - return(&timing_perf[0]); - -} - -} - -*/ From 34801af904f5e819dacdab0f09966c20d4f65a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Tue, 7 Jun 2016 10:48:48 +0200 Subject: [PATCH 02/57] build_oai: exit early on error There are a lot of case where the build scripts fails. Despite this, the build script happily continue to the end and tells "Successfully built xxxx". This fix ensure the build stops early with the first error message on the bottom of the log. --- cmake_targets/build_oai | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index d1306b804b..42bd6c82d7 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -33,6 +33,7 @@ # brief OAI automated build tool that can be used to install, compile, run OAI. # author Navid Nikaein, Lionel GAUTHIER, Laurent Thomas +set -e ################################ # include helper functions From 51b5fcd4896ebbcc20fc17ff12ebc5863243993b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Thu, 9 Jun 2016 13:19:45 +0200 Subject: [PATCH 03/57] build_helper: tell where the log will be written in compilations() build_helper exits early on error. compilations() tells where the compilation logs can be found after compiling it. So in case of error, it was never displayed. Add a log info before compiling --- cmake_targets/tools/build_helper | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 00f6842ffd..b48f33d282 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -109,6 +109,7 @@ clean_all_files() { compilations() { cd $OPENAIR_DIR/cmake_targets/$1/build + echo_info "Log file for compilation written in: $dlog/$2.$REL.txt" { rm -f $3 if [ "$VERBOSE_COMPILE" == "1" ]; then From 67eb92cda9604c95ce62b6f4230834a31f6ca6b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Mon, 13 Jun 2016 08:50:39 +0200 Subject: [PATCH 04/57] Check if the distribution is supported Thank to Thomas Laurent for refactorize get_distribution_released --- cmake_targets/tools/build_helper | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index b48f33d282..b5c7a86d71 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -67,7 +67,33 @@ echo_warning() { cecho "$*" $yellow ;} echo_success() { cecho "$*" $green ;} echo_info() { cecho "$*" $blue ;} +######################## +# distribution helpers # +######################## +# This function return a string to identify the distribution we are running +# If we can't check the distribution, it returns "Unknown" +# This function return always true as exit code by design +# Examples: +# Ubuntu16.04 +# Debian8.5 +get_distribution_release() { + local distributor + if distributor=$(lsb_release -si 2>/dev/null) ; then + echo $distributor$(lsb_release -sr) + else + echo Unknown + fi +} + +check_supported_distribution() { + local distribution=$(get_distribution_release) + case "$distribution" in + "Ubuntu16.04") return 0 ;; + "Ubuntu14.04") return 0 ;; + esac + return 1 +} ########################### # Cleaners @@ -231,6 +257,10 @@ check_install_additional_tools (){ } check_install_oai_software() { + if ! check_supported_distribution; then + echo_error "Your distribution $(get_distribution_release) is not supported by oai !" + exit 1 + fi $SUDO apt-get update $SUDO apt-get install -y \ autoconf \ From 1c81ad97b3b4fd6feff6f37ef7a5eca32300669d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Fri, 10 Jun 2016 15:17:23 +0200 Subject: [PATCH 05/57] add missing package software-properties-common This package is needed for the command add-apt-repository --- cmake_targets/tools/build_helper | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index b5c7a86d71..cb5ff0bba0 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -262,6 +262,8 @@ check_install_oai_software() { exit 1 fi $SUDO apt-get update + $SUDO apt install -y software-properties-common + # Now, we can add new repository here if needed $SUDO apt-get install -y \ autoconf \ automake \ From 02d321f9648a1f53b2e058039fdf45d42b896f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Wed, 15 Jun 2016 08:42:46 +0200 Subject: [PATCH 06/57] fix iperf3 installation for Ubuntu 14.04 --- cmake_targets/tools/build_helper | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index cb5ff0bba0..9ff34c2dd6 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -263,7 +263,12 @@ check_install_oai_software() { fi $SUDO apt-get update $SUDO apt install -y software-properties-common - # Now, we can add new repository here if needed + case "$(get_distribution_release)" in + "Ubuntu14.04") + # For iperf3 + $SUDO add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports universe" + $SUDO apt-get update + esac $SUDO apt-get install -y \ autoconf \ automake \ From 6b2247f12c03030cbcba344b3bccfd9f49a2ab9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Wed, 15 Jun 2016 12:37:37 +0200 Subject: [PATCH 07/57] build_helper: fix package version according to distribution --- cmake_targets/tools/build_helper | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 9ff34c2dd6..938e3fb9cb 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -257,6 +257,7 @@ check_install_additional_tools (){ } check_install_oai_software() { + local specific_packages="" if ! check_supported_distribution; then echo_error "Your distribution $(get_distribution_release) is not supported by oai !" exit 1 @@ -265,11 +266,17 @@ check_install_oai_software() { $SUDO apt install -y software-properties-common case "$(get_distribution_release)" in "Ubuntu14.04") + specific_packages="libtasn1-3-dev" # For iperf3 $SUDO add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports universe" $SUDO apt-get update + ;; + "Ubuntu16.04") + specific_packages="libtasn1-6-dev" + ;; esac $SUDO apt-get install -y \ + $specific_packages \ autoconf \ automake \ bison \ @@ -310,7 +317,6 @@ check_install_oai_software() { libsctp1 \ libsctp-dev \ libssl-dev \ - libtasn1-3-dev \ libtool \ libusb-1.0-0-dev \ libxml2 \ From 2b98daec1b82cb13e10fb6d81be7fa4b866b8c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Thu, 9 Jun 2016 09:32:36 +0200 Subject: [PATCH 08/57] build_helper: add missing package in check_install_oai_software --- cmake_targets/tools/build_helper | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 938e3fb9cb..7c7b792762 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -303,6 +303,7 @@ check_install_oai_software() { libblas3gf \ libblas-dev \ libconfig8-dev \ + libffi-dev \ libforms-bin \ libforms-dev \ libgcrypt11-dev \ @@ -314,6 +315,7 @@ check_install_oai_software() { liboctave-dev \ libpgm-5.1 \ libpgm-dev \ + libpython2.7-dev \ libsctp1 \ libsctp-dev \ libssl-dev \ @@ -333,6 +335,7 @@ check_install_oai_software() { xmlstarlet \ python-pip \ pydb \ + wget \ wvdial \ python-numpy \ sshpass \ From 12c0ec833486f366b2a0c50e6cb1429ba3780379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Wed, 15 Jun 2016 10:56:11 +0200 Subject: [PATCH 09/57] build_helper: remove libblas3gf for ubuntu 16.04 liblas3gf have been replaced by libblas3 on 16.04 liblas3* will be pulled by libblas-dev, so we don't need to add it to package list --- cmake_targets/tools/build_helper | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 7c7b792762..a8284313ca 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -300,7 +300,6 @@ check_install_oai_software() { iptables-dev \ libatlas-base-dev \ libatlas-dev \ - libblas3gf \ libblas-dev \ libconfig8-dev \ libffi-dev \ From 5710c1c3adc19be4f8208bd78c4f84def2d1bc37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Mon, 13 Jun 2016 08:56:59 +0200 Subject: [PATCH 10/57] build_helper: replace dependency on libpgm-5.x.0 in check_install_oai_software libpgm-dev will add the dependency on libpgm 5.2.0 or 5.1.0 automatically according to the ubuntu version --- cmake_targets/tools/build_helper | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index a8284313ca..3f4a4f17ad 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -312,7 +312,6 @@ check_install_oai_software() { libidn11-dev \ libmysqlclient-dev \ liboctave-dev \ - libpgm-5.1 \ libpgm-dev \ libpython2.7-dev \ libsctp1 \ From 81d96a31105f043a391a9330b4942306d5c2fba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Thu, 9 Jun 2016 14:08:45 +0200 Subject: [PATCH 11/57] CMakeLists.txt: Add missing check and include for pgm library --- cmake_targets/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index c23b0d1a91..379b213e27 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1518,7 +1518,7 @@ if (${RF_BOARD} STREQUAL "OAI_USRP") include_directories(${LIBBOOST_INCLUDE_DIR}) endif (${RF_BOARD} STREQUAL "OAI_USRP") -pkg_search_module(OPENPGM openpgm-5.1) +pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2) if(NOT ${OPENPGM_FOUND}) message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built") else() From 05ad02d5556bf0ac1636a8efe365a1a76941d7b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Mon, 13 Jun 2016 10:51:39 +0200 Subject: [PATCH 12/57] build_helper: add flag to allow compiling software without hardware Add --disable-hardware-dependency flag to avoid hardware need when compiling OAI. For the momment it avoids to flash bladeRF hardware --- cmake_targets/build_oai | 10 ++++++++++ cmake_targets/tools/build_helper | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 42bd6c82d7..44c41d4a50 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -278,6 +278,10 @@ function main() { T_TRACER="True" echo_info "Enabling the T tracer" shift 1;; + --disable-hardware-dependency) + echo_info "Disabling hardware dependency for compiling software" + DISABLE_HARDWARE_DEPENDENCY="True" + shift 1;; -h | --help) print_help exit 1;; @@ -387,10 +391,16 @@ function main() { if [ "$HW" == "OAI_USRP" ] ; then echo_info "installing packages for USRP support" check_install_usrp_uhd_driver + if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then + install_usrp_uhd_driver + fi fi if [ "$HW" == "OAI_BLADERF" ] ; then echo_info "installing packages for BLADERF support" check_install_bladerf_driver + if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then + flash_firmware_bladerf + fi fi fi diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 3f4a4f17ad..5435685c19 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -229,7 +229,10 @@ check_install_bladerf_driver(){ $SUDO apt-get install -y bladerf libbladerf-dev $SUDO apt-get install -y bladerf-firmware-fx3 $SUDO apt-get install -y bladerf-fpga-hostedx40 - $SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img +} + +flash_firmware_bladerf() { + $SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img } check_install_additional_tools (){ From feb5979830b1deab91c947291f7d8554b1a990ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Mon, 13 Jun 2016 12:09:02 +0200 Subject: [PATCH 13/57] build_helper: remove non-existent package uhd It breaks apt-get remove command --- cmake_targets/tools/build_helper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 5435685c19..0babb9e423 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -213,7 +213,7 @@ install_gnutls_from_source(){ check_install_usrp_uhd_driver(){ #first we remove old installation - $SUDO apt-get remove uhd libuhd-dev libuhd003 uhd-host -y + $SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y v=$(lsb_release -cs) $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" #The new USRP repository From ccddb7859446d5edb2833d6270fe41534acac11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Mon, 13 Jun 2016 12:07:16 +0200 Subject: [PATCH 14/57] build_oai: make USRP build possible without hardware --- cmake_targets/tools/build_helper | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 0babb9e423..7e2912b7d1 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -220,9 +220,16 @@ check_install_usrp_uhd_driver(){ $SUDO add-apt-repository ppa:ettusresearch/uhd -y $SUDO apt-get update $SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev - $SUDO apt-get -y install libuhd-dev libuhd003 uhd-host + $SUDO apt-get -y install libuhd-dev libuhd003 +} + +install_usrp_uhd_driver() { + # We move uhd-host apart because it depends on linux kernel version + # On newer kernels, it fails to install + $SUDO apt-get -y install uhd-host $SUDO uhd_images_downloader } + check_install_bladerf_driver(){ $SUDO add-apt-repository -y ppa:bladerf/bladerf $SUDO apt-get update From eb029cb81156339a0d22afb76e2add5b205c08d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Tue, 14 Jun 2016 11:10:28 +0200 Subject: [PATCH 15/57] build_helper: use official bladerf packages bladerf ppa don't publish packages for Ubuntu 16.04. There are official packages for bladerf so we use these. --- cmake_targets/tools/build_helper | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 7e2912b7d1..68457164e7 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -231,8 +231,10 @@ install_usrp_uhd_driver() { } check_install_bladerf_driver(){ - $SUDO add-apt-repository -y ppa:bladerf/bladerf - $SUDO apt-get update + if [ "$(get_distribution_release)" == "Ubuntu14.04" ] ; then + $SUDO add-apt-repository -y ppa:bladerf/bladerf + $SUDO apt-get update + fi $SUDO apt-get install -y bladerf libbladerf-dev $SUDO apt-get install -y bladerf-firmware-fx3 $SUDO apt-get install -y bladerf-fpga-hostedx40 From 2349b37e1f41a65d678dd8bc7db3f17258d71842 Mon Sep 17 00:00:00 2001 From: cubiq Date: Tue, 12 Apr 2016 12:05:56 +0200 Subject: [PATCH 16/57] lte-softmodem: add "-ldl" options to linkage --- cmake_targets/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 379b213e27..6f370b7144 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1625,7 +1625,7 @@ add_executable(lte-softmodem ${T_SOURCE} ) -target_link_libraries (lte-softmodem +target_link_libraries (lte-softmodem -ldl -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB} -Wl,--end-group ) From f81b6704f43c76fecaabf55eb33b2e72fcb0edfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Fri, 10 Jun 2016 14:39:00 +0200 Subject: [PATCH 17/57] lmsSDR: remove static from struct SamplesPacket. Th struct SamplesPacket is a type declaration. It is not defined in memory and thus samplesCount can't be declared static. Transform it to true cpp static variable class as this is c++ source. --- targets/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR/dataTypes.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/targets/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR/dataTypes.h b/targets/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR/dataTypes.h index cba2b7341e..c97ac7857d 100644 --- a/targets/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR/dataTypes.h +++ b/targets/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR/dataTypes.h @@ -14,14 +14,15 @@ typedef struct int16_t q; } complex16_t; -typedef struct +class SamplesPacket { + public: uint64_t timestamp; //timestamp of the packet uint16_t first; //index of first unused sample in samples[] uint16_t last; //end index of samples static const uint16_t samplesCount = 1024; //maximum number of samples in packet complex16_t samples[samplesCount]; //must be power of two -} SamplesPacket; +}; complex16_t operator &=(complex16_t & other1, const complex16_t & other) // copy assignment { @@ -30,4 +31,4 @@ complex16_t operator &=(complex16_t & other1, const complex16_t & other) // copy return other1; } -#endif \ No newline at end of file +#endif From 22b278d43b61325efd910e1cf67177f269048818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Mon, 13 Jun 2016 14:05:45 +0200 Subject: [PATCH 18/57] CMakeLists.txt: fix lte-softmodem-nos1 build It can't link because nas_config.c and rb_config.c was commented. --- cmake_targets/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 6f370b7144..d542416315 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1652,8 +1652,8 @@ add_executable(lte-softmodem-nos1 ${OPENAIR_TARGETS}/SIMU/USER/init_lte.c ${OPENAIR_TARGETS}/COMMON/create_tasks.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c - #${OPENAIR2_DIR}/RRC/NAS/nas_config.c # enable if you want rrc to mount ip interface - #${OPENAIR2_DIR}/RRC/NAS/rb_config.c + ${OPENAIR2_DIR}/RRC/NAS/nas_config.c + ${OPENAIR2_DIR}/RRC/NAS/rb_config.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${HW_SOURCE} ${TRANSPORT_SOURCE} From cdb182c1535f960328b6d40c4a173619692ce5f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Fri, 10 Jun 2016 08:58:50 +0200 Subject: [PATCH 19/57] CMakeLists.txt: force compilation to gnu89 standard for gccxml clang have changed its default standard to C11 compilation and is stricter. Ensure use of gnu89 standard to use pthread extension for --castxml-gccxml --- cmake_targets/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index d542416315..67cc6cfc3a 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1929,6 +1929,11 @@ foreach( d ${DirDefs} ) list(APPEND itti_compiler_options "-I${d}") endforeach() +# castxml doesn't work with c11 (gcc 5 default) +# force castxml and clang compilation with gnu89 standard +# we can't use cXX standard as pthread_rwlock_t is gnu standard +list(APPEND itti_compiler_options "-std=gnu89") + set (ITTI_H ${ITTI_DIR}/intertask_interface_types.h) add_custom_command ( OUTPUT ${OPENAIR_BIN_DIR}/messages.xml From 9d49702639ad0ce8fc836fac292f3243699ce183 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 17 Jun 2016 11:14:14 +0200 Subject: [PATCH 20/57] cleanup: put DEFAULT_REMOTE_IP and DEFAULT_REMOTE_PORT in utils.h --- common/utils/T/tracer/enb.c | 3 --- common/utils/T/tracer/textlog.c | 3 --- common/utils/T/tracer/utils.h | 3 +++ common/utils/T/tracer/vcd.c | 3 --- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/common/utils/T/tracer/enb.c b/common/utils/T/tracer/enb.c index f43e1d6707..a120ba471e 100644 --- a/common/utils/T/tracer/enb.c +++ b/common/utils/T/tracer/enb.c @@ -33,9 +33,6 @@ typedef struct { pthread_mutex_t lock; } enb_data; -#define DEFAULT_REMOTE_IP "127.0.0.1" -#define DEFAULT_REMOTE_PORT 2021 - void is_on_changed(void *_d) { enb_data *d = _d; diff --git a/common/utils/T/tracer/textlog.c b/common/utils/T/tracer/textlog.c index f11ca96bd9..9c9b580def 100644 --- a/common/utils/T/tracer/textlog.c +++ b/common/utils/T/tracer/textlog.c @@ -14,9 +14,6 @@ #include "event_selector.h" #include "config.h" -#define DEFAULT_REMOTE_IP "127.0.0.1" -#define DEFAULT_REMOTE_PORT 2021 - typedef struct { int socket; int *is_on; diff --git a/common/utils/T/tracer/utils.h b/common/utils/T/tracer/utils.h index e15a8d2fba..d3cf0350da 100644 --- a/common/utils/T/tracer/utils.h +++ b/common/utils/T/tracer/utils.h @@ -20,6 +20,9 @@ list *list_append(list *l, void *data); /* socket */ /****************************************************************************/ +#define DEFAULT_REMOTE_IP "127.0.0.1" +#define DEFAULT_REMOTE_PORT 2021 + /* socket_send: return 0 if okay, -1 on error */ int socket_send(int socket, void *buffer, int size); int get_connection(char *addr, int port); diff --git a/common/utils/T/tracer/vcd.c b/common/utils/T/tracer/vcd.c index 45aa4e26e2..0ad2756c2a 100644 --- a/common/utils/T/tracer/vcd.c +++ b/common/utils/T/tracer/vcd.c @@ -40,9 +40,6 @@ no_connection: if (pthread_mutex_unlock(&d->lock)) abort(); } -#define DEFAULT_REMOTE_IP "127.0.0.1" -#define DEFAULT_REMOTE_PORT 2021 - void usage(void) { printf( From 97d1dcbccd24a88132dbf071c0155df6f1b081ee Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 17 Jun 2016 15:16:19 +0200 Subject: [PATCH 21/57] add a 'record' tracer --- common/utils/T/tracer/Makefile | 7 +- common/utils/T/tracer/record.c | 158 +++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+), 2 deletions(-) create mode 100644 common/utils/T/tracer/record.c diff --git a/common/utils/T/tracer/Makefile b/common/utils/T/tracer/Makefile index bf0f72710c..59644e1b34 100644 --- a/common/utils/T/tracer/Makefile +++ b/common/utils/T/tracer/Makefile @@ -5,7 +5,10 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I. LIBS=-lX11 -lm -lpng -lXft -all: textlog enb vcd +all: record textlog enb vcd + +record: utils.o record.o database.o config.o + $(CC) $(CFLAGS) -o record $^ $(LIBS) textlog: utils.o textlog.o database.o event.o handler.o config.o \ event_selector.o view/view.a gui/gui.a logger/logger.a \ @@ -40,7 +43,7 @@ filter/filter.a: $(CC) $(CFLAGS) -c -o $@ $< clean: - rm -f *.o core tracer_remote textlog enb vcd + rm -f *.o core tracer_remote textlog enb vcd record cd gui && make clean cd view && make clean cd logger && make clean diff --git a/common/utils/T/tracer/record.c b/common/utils/T/tracer/record.c new file mode 100644 index 0000000000..2dfe35f4da --- /dev/null +++ b/common/utils/T/tracer/record.c @@ -0,0 +1,158 @@ +#include +#include +#include +#include +#include "database.h" +#include "utils.h" +#include "../T_defs.h" +#include "config.h" + +void usage(void) +{ + printf( +"options:\n" +" -d this option is mandatory\n" +" -o this option is mandatory\n" +" -on turn log ON for given GROUP or ID\n" +" -off turn log OFF for given GROUP or ID\n" +" -ON turn all logs ON\n" +" -OFF turn all logs OFF\n" +" note: you may pass several -on/-off/-ON/-OFF,\n" +" they will be processed in order\n" +" by default, all is off\n" +" -ip connect to given IP address (default %s)\n" +" -p connect to given port (default %d)\n", + DEFAULT_REMOTE_IP, + DEFAULT_REMOTE_PORT + ); + exit(1); +} + +volatile int run = 1; + +void force_stop(int x) +{ + printf("\ngently quit...\n"); + run = 0; +} + +int main(int n, char **v) +{ + char *database_filename = NULL; + char *output_filename = NULL; + FILE *out; + void *database; + char *ip = DEFAULT_REMOTE_IP; + int port = DEFAULT_REMOTE_PORT; + char **on_off_name; + int *on_off_action; + int on_off_n = 0; + int socket; + int *is_on; + int number_of_events; + int i; + char mt; + + /* write on a socket fails if the other end is closed and we get SIGPIPE */ + if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort(); + + /* exit on ctrl+c and ctrl+z */ + if (signal(SIGQUIT, force_stop) == SIG_ERR) abort(); + if (signal(SIGINT, force_stop) == SIG_ERR) abort(); + if (signal(SIGTSTP, force_stop) == SIG_ERR) abort(); + + on_off_name = malloc(n * sizeof(char *)); if (on_off_name == NULL) abort(); + on_off_action = malloc(n * sizeof(int)); if (on_off_action == NULL) abort(); + + for (i = 1; i < n; i++) { + if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage(); + if (!strcmp(v[i], "-d")) + { if (i > n-2) usage(); database_filename = v[++i]; continue; } + if (!strcmp(v[i], "-o")) + { if (i > n-2) usage(); output_filename = v[++i]; continue; } + if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; } + if (!strcmp(v[i], "-p")) + { if (i > n-2) usage(); port = atoi(v[++i]); continue; } + if (!strcmp(v[i], "-on")) { if (i > n-2) usage(); + on_off_name[on_off_n]=v[++i]; on_off_action[on_off_n++]=1; continue; } + if (!strcmp(v[i], "-off")) { if (i > n-2) usage(); + on_off_name[on_off_n]=v[++i]; on_off_action[on_off_n++]=0; continue; } + if (!strcmp(v[i], "-ON")) + { on_off_name[on_off_n]=NULL; on_off_action[on_off_n++]=1; continue; } + if (!strcmp(v[i], "-OFF")) + { on_off_name[on_off_n]=NULL; on_off_action[on_off_n++]=0; continue; } + usage(); + } + + if (database_filename == NULL) { + printf("ERROR: provide a database file (-d)\n"); + exit(1); + } + if (output_filename == NULL) { + printf("ERROR: provide an output file (-o)\n"); + exit(1); + } + + database = parse_database(database_filename); + + load_config_file(database_filename); + + number_of_events = number_of_ids(database); + is_on = calloc(number_of_events, sizeof(int)); + if (is_on == NULL) abort(); + + for (i = 0; i < on_off_n; i++) + on_off(database, on_off_name[i], is_on, on_off_action[i]); + + socket = connect_to(ip, port); + + /* activate selected traces */ + mt = 1; + if (socket_send(socket, &mt, 1) == -1 || + socket_send(socket, &number_of_events, sizeof(int)) == -1 || + socket_send(socket, is_on, number_of_events * sizeof(int)) == -1) + abort(); + + out = fopen(output_filename, "w"); + if (out == NULL) { + perror(output_filename); + exit(1); + } + + /* read messages */ + while (run) { + int type; + int32_t length; + char v[T_BUFFER_MAX]; + int vpos = 0; + + if (fullread(socket, &length, 4) == -1) goto read_error; + memcpy(v+vpos, &length, 4); + vpos += 4; +#ifdef T_SEND_TIME + if (fullread(socket,v+vpos,sizeof(struct timespec))==-1) goto read_error; + vpos += sizeof(struct timespec); + length -= sizeof(struct timespec); +#endif + if (fullread(socket, &type, sizeof(int)) == -1) goto read_error; + memcpy(v+vpos, &type, sizeof(int)); + vpos += sizeof(int); + length -= sizeof(int); + if (fullread(socket, v+vpos, length) == -1) goto read_error; + vpos += length; + + if (type == -1) append_received_config_chunk(v+vpos-length, length); + if (type == -2) verify_config(); + + if (fwrite(v, vpos, 1, out) != 1) { + printf("error saving data to file %s\n", output_filename); + fclose(out); + exit(1); + } + } + +read_error: + fclose(out); + + return 0; +} From 99d1328d6ede9d172cdd5588c26f4509588678b8 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 17 Jun 2016 15:16:49 +0200 Subject: [PATCH 22/57] add a very basic replay tracer to be used in conjunction with another tracer so conceptually it's more a tracee than a tracer --- common/utils/T/tracer/Makefile | 7 +- common/utils/T/tracer/replay.c | 178 +++++++++++++++++++++++++++++++++ 2 files changed, 183 insertions(+), 2 deletions(-) create mode 100644 common/utils/T/tracer/replay.c diff --git a/common/utils/T/tracer/Makefile b/common/utils/T/tracer/Makefile index 59644e1b34..38a660562d 100644 --- a/common/utils/T/tracer/Makefile +++ b/common/utils/T/tracer/Makefile @@ -5,11 +5,14 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I. LIBS=-lX11 -lm -lpng -lXft -all: record textlog enb vcd +all: record replay textlog enb vcd record: utils.o record.o database.o config.o $(CC) $(CFLAGS) -o record $^ $(LIBS) +replay: utils.o replay.o + $(CC) $(CFLAGS) -o replay $^ $(LIBS) + textlog: utils.o textlog.o database.o event.o handler.o config.o \ event_selector.o view/view.a gui/gui.a logger/logger.a \ filter/filter.a @@ -43,7 +46,7 @@ filter/filter.a: $(CC) $(CFLAGS) -c -o $@ $< clean: - rm -f *.o core tracer_remote textlog enb vcd record + rm -f *.o core tracer_remote textlog enb vcd record replay cd gui && make clean cd view && make clean cd logger && make clean diff --git a/common/utils/T/tracer/replay.c b/common/utils/T/tracer/replay.c new file mode 100644 index 0000000000..a64342f39c --- /dev/null +++ b/common/utils/T/tracer/replay.c @@ -0,0 +1,178 @@ +#include +#include +#include +#include +#include +#include "utils.h" +#include "../T_defs.h" + +#define DEFAULT_REMOTE_PORT 2021 + +/* replay.c does not know anything about events - it just has the array + * is_on that grows each time replay.c sees a type that does not fit in + * there (the idea is to isolate replay.c as maximum by not using unneeded + * information) + */ +int *is_on; +int is_on_size; + +/* this lock is used to protect access to is_on/is_on_size */ +pthread_mutex_t biglock = PTHREAD_MUTEX_INITIALIZER; + +void set_is_on_size(int size) +{ + is_on = realloc(is_on, size * sizeof(int)); if (is_on == NULL) abort(); + memset(is_on + is_on_size, 0, (size - is_on_size) * sizeof(int)); + is_on_size = size; +} + +void lock(void) +{ + if (pthread_mutex_lock(&biglock)) abort(); +} + +void unlock(void) +{ + if (pthread_mutex_unlock(&biglock)) abort(); +} + +#define QUIT(x) do { printf("%s\n", x); exit(1); } while(0) + +void get_message(int s) +{ + char t; + int l; + int id; + int on; + + if (read(s, &t, 1) != 1) QUIT("get_message fails"); + lock(); + switch (t) { + case 0: + /* toggle all those IDs */ + if (read(s, &l, sizeof(int)) != sizeof(int)) QUIT("get_message fails"); + while (l) { + if (read(s, &id, sizeof(int)) != sizeof(int)) QUIT("get_message fails"); + if (id > is_on_size - 1) set_is_on_size(id + 1); + is_on[id] = 1 - is_on[id]; + l--; + } + break; + case 1: + /* set IDs as given */ + /* optimize? */ + if (read(s, &l, sizeof(int)) != sizeof(int)) QUIT("get_message fails"); + if (l > is_on_size) set_is_on_size(l); + id = 0; + while (l) { + if (read(s, &on, sizeof(int)) != sizeof(int)) + QUIT("get_message fails"); + is_on[id] = on; + id++; + l--; + } + break; + case 2: break; /* do nothing, this message is to wait for local tracer */ + default: abort(); + } + unlock(); +} + +void *get_message_thread(void *_socket) +{ + int socket = *(int *)_socket; + + while (1) get_message(socket); + + return NULL; +} + +void usage(void) +{ + printf( +"options:\n" +" -i this option is mandatory\n" +" -p wait connection on given port (default %d)\n", + DEFAULT_REMOTE_PORT + ); + exit(1); +} + +#define ERR printf("ERROR: read file %s failed\n", input_filename) + +int main(int n, char **v) +{ + int port = DEFAULT_REMOTE_PORT; + char *input_filename = NULL; + int i; + int socket; + FILE *in; + int do_send; + + for (i = 1; i < n; i++) { + if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage(); + if (!strcmp(v[i], "-i")) + { if (i > n-2) usage(); input_filename = v[++i]; continue; } + if (!strcmp(v[i], "-p")) + { if (i > n-2) usage(); port = atoi(v[++i]); continue; } + usage(); + } + + if (input_filename == NULL) { + printf("ERROR: provide an input file (-i)\n"); + exit(1); + } + + in = fopen(input_filename, "r"); + if (in == NULL) { perror(input_filename); abort(); } + + socket = get_connection("0.0.0.0", port); + + /* get first message to activate selected traces */ + get_message(socket); + + new_thread(get_message_thread, &socket); + + while (1) { + int type; + int32_t length; + char v[T_BUFFER_MAX]; + int vpos = 0; + + /* read event from file */ + if (fread(&length, 4, 1, in) != 1) break; + memcpy(v+vpos, &length, 4); + vpos += 4; +#ifdef T_SEND_TIME + if (length < sizeof(struct timespec)) { ERR; break; } + if (fread(v+vpos, sizeof(struct timespec), 1, in) != 1) { ERR; break; } + vpos += sizeof(struct timespec); + length -= sizeof(struct timespec); +#endif + if (length < sizeof(int)) { ERR; break; } + if (fread(&type, sizeof(int), 1, in) != 1) { ERR; break; } + memcpy(v+vpos, &type, sizeof(int)); + vpos += sizeof(int); + length -= sizeof(int); + if (length) if (fread(v+vpos, length, 1, in) != 1) { ERR; break; } + vpos += length; + + /* only send if configured to do so */ + lock(); + if (type < 0) do_send = 1; + else { + if (type > is_on_size - 1) set_is_on_size(type+1); + do_send = is_on[type]; + } + unlock(); + + if (do_send) + if (socket_send(socket, v, vpos) != 0) + { printf("ERROR: socket writing failed\n"); abort(); } + } + + fclose(in); + close(socket); + + return 0; +} From 8e28dacdd9f4dd423cce0f1e6b9ddc20e86b4217 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 17 Jun 2016 15:39:25 +0200 Subject: [PATCH 23/57] add a small utility to extract a configuration file from a log --- common/utils/T/tracer/Makefile | 6 ++- common/utils/T/tracer/extract_config.c | 75 ++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 common/utils/T/tracer/extract_config.c diff --git a/common/utils/T/tracer/Makefile b/common/utils/T/tracer/Makefile index 38a660562d..4345db1f70 100644 --- a/common/utils/T/tracer/Makefile +++ b/common/utils/T/tracer/Makefile @@ -5,7 +5,7 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I. LIBS=-lX11 -lm -lpng -lXft -all: record replay textlog enb vcd +all: record replay extract_config textlog enb vcd record: utils.o record.o database.o config.o $(CC) $(CFLAGS) -o record $^ $(LIBS) @@ -13,6 +13,9 @@ record: utils.o record.o database.o config.o replay: utils.o replay.o $(CC) $(CFLAGS) -o replay $^ $(LIBS) +extract_config: extract_config.o + $(CC) $(CFLAGS) -o extract_config $^ $(LIBS) + textlog: utils.o textlog.o database.o event.o handler.o config.o \ event_selector.o view/view.a gui/gui.a logger/logger.a \ filter/filter.a @@ -47,6 +50,7 @@ filter/filter.a: clean: rm -f *.o core tracer_remote textlog enb vcd record replay + rm -f extract_config cd gui && make clean cd view && make clean cd logger && make clean diff --git a/common/utils/T/tracer/extract_config.c b/common/utils/T/tracer/extract_config.c new file mode 100644 index 0000000000..f35d765cec --- /dev/null +++ b/common/utils/T/tracer/extract_config.c @@ -0,0 +1,75 @@ +#include +#include +#include +#include "../T_defs.h" + +void usage(void) +{ + printf( +"options:\n" +" -i this option is mandatory\n" + ); + exit(1); +} + +#define ERR printf("ERROR: read file %s failed\n", input_filename) + +int main(int n, char **v) +{ + char *input_filename = NULL; + int i; + FILE *in; + + for (i = 1; i < n; i++) { + if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage(); + if (!strcmp(v[i], "-i")) + { if (i > n-2) usage(); input_filename = v[++i]; continue; } + usage(); + } + + if (input_filename == NULL) { + printf("ERROR: provide an input file (-i)\n"); + exit(1); + } + + in = fopen(input_filename, "r"); + if (in == NULL) { perror(input_filename); abort(); } + + while (1) { + int type; + int32_t length; + char v[T_BUFFER_MAX]; + int vpos = 0; + + /* read event from file */ + if (fread(&length, 4, 1, in) != 1) break; + memcpy(v+vpos, &length, 4); + vpos += 4; +#ifdef T_SEND_TIME + if (length < sizeof(struct timespec)) { ERR; break; } + if (fread(v+vpos, sizeof(struct timespec), 1, in) != 1) { ERR; break; } + vpos += sizeof(struct timespec); + length -= sizeof(struct timespec); +#endif + if (length < sizeof(int)) { ERR; break; } + if (fread(&type, sizeof(int), 1, in) != 1) { ERR; break; } + memcpy(v+vpos, &type, sizeof(int)); + vpos += sizeof(int); + length -= sizeof(int); + if (length) if (fread(v+vpos, length, 1, in) != 1) { ERR; break; } + vpos += length; + + if (type == -1) { + if (length < sizeof(int)) { ERR; break; } + length -= sizeof(int); + if (fwrite(v+vpos-length, length, 1, stdout) != 1) { ERR; break; } + } + + /* TODO: parse all file? */ + if (type == -2) break; + } + + fclose(in); + + return 0; +} From 0bca3ea53dbdb76b29c5f1c587f696585023ac87 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sat, 18 Jun 2016 23:44:38 +0200 Subject: [PATCH 24/57] minor fixes to build scripts --- cmake_targets/build_oai | 3 +++ cmake_targets/tools/build_helper | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 44c41d4a50..04289a83fa 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -60,6 +60,7 @@ RUN_GROUP=0 TEST_CASE_GROUP="" BUILD_DOXYGEN=0 T_TRACER="False" +DISABLE_HARDWARE_DEPENDENCY="False" trap handle_ctrl_c INT function print_help() { @@ -132,6 +133,8 @@ Options Disables CPU Affinity between UHD/TX/RX Threads (Valid only when deadline scheduler is disabled). By defaulT, CPU Affinity is enabled when not using deadline scheduler. It is enabled only with >2 CPUs. For eNB, CPU_0-> Device library (UHD), CPU_1->TX Threads, CPU_2...CPU_MAX->Rx Threads. For UE, CPU_0->Device Library(UHD), CPU_1..CPU_MAX -> All the UE threads --T-tracer Enables the T tracer. +--disable-hardware-dependency + Disable HW dependency during installation Usage (first build): oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 550ee67bc7..36d3410349 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -213,7 +213,7 @@ install_gnutls_from_source(){ check_install_usrp_uhd_driver(){ #first we remove old installation - $SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y + $SUDO apt-get remove uhd libuhd-dev libuhd003 uhd-host -y v=$(lsb_release -cs) $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" #The new USRP repository @@ -267,7 +267,11 @@ check_install_additional_tools (){ ctags \ ntpdate \ iperf3 \ - android-tools-adb + android-tools-adb \ + wvdial \ + python-numpy \ + sshpass \ + libxslt1-dev $SUDO pip install paramiko $SUDO pip install pyroute2 @@ -363,12 +367,7 @@ check_install_oai_software() { xmlstarlet \ python-pip \ pydb \ - wget \ - wvdial \ - python-numpy \ - sshpass \ - libxslt1-dev \ - android-tools-adb + wget $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so @@ -394,6 +393,7 @@ install_asn1c_from_source(){ ./configure make -j`nproc` $SUDO make install + cd - ) > $asn1_install_log 2>&1 } From c5b126f59896523ef61fd6ac942b4e25dad8b7df Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Jun 2016 10:02:40 +0200 Subject: [PATCH 25/57] update format of trace ENB_PHY_PUSCH_IQ to include N_RB_UL and symbols_per_tti --- common/utils/T/T_messages.txt | 2 +- openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index 5678b588ba..062b98d6c8 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -52,7 +52,7 @@ ID = ENB_PHY_UL_CHANNEL_ESTIMATE ID = ENB_PHY_PUSCH_IQ DESC = eNodeB PUSCH received IQ data GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB - FORMAT = int,eNB_ID : int,UE_ID : int,frame : int,subframe : int,nb_rb : buffer,pusch_comp + FORMAT = int,eNB_ID : int,UE_ID : int,frame : int,subframe : int,nb_rb : int,N_RB_UL : int,symbols_per_tti : buffer,pusch_comp ID = ENB_PHY_PUCCH_1AB_IQ DESC = eNodeB PUCCH received IQ data GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 48ab4c5ca7..010dd36f31 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -1842,6 +1842,7 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB, T(T_ENB_PHY_PUSCH_IQ, T_INT(eNB_id), T_INT(UE_id), T_INT(phy_vars_eNB->proc[sched_subframe].frame_rx), T_INT(subframe), T_INT(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb), + T_INT(frame_parms->N_RB_UL), T_INT(frame_parms->symbols_per_tti), T_BUFFER(eNB_pusch_vars->rxdataF_comp[eNB_id][0], 2 * /* ulsch[UE_id]->harq_processes[harq_pid]->nb_rb */ frame_parms->N_RB_UL *12*frame_parms->symbols_per_tti*2)); From 8e458d9c9bf57218b60ee8b8757e4934cbca00c6 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Jun 2016 11:36:17 +0200 Subject: [PATCH 26/57] add a very basic step mechanism to replay.c --- common/utils/T/tracer/replay.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/utils/T/tracer/replay.c b/common/utils/T/tracer/replay.c index a64342f39c..be7e8d60c6 100644 --- a/common/utils/T/tracer/replay.c +++ b/common/utils/T/tracer/replay.c @@ -92,7 +92,8 @@ void usage(void) printf( "options:\n" " -i this option is mandatory\n" -" -p wait connection on given port (default %d)\n", +" -p wait connection on given port (default %d)\n" +" -w user must press a key after each sent event\n", DEFAULT_REMOTE_PORT ); exit(1); @@ -108,6 +109,7 @@ int main(int n, char **v) int socket; FILE *in; int do_send; + int do_wait = 0; for (i = 1; i < n; i++) { if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage(); @@ -115,6 +117,7 @@ int main(int n, char **v) { if (i > n-2) usage(); input_filename = v[++i]; continue; } if (!strcmp(v[i], "-p")) { if (i > n-2) usage(); port = atoi(v[++i]); continue; } + if (!strcmp(v[i], "-w")) { do_wait = 1; continue; } usage(); } @@ -169,6 +172,8 @@ int main(int n, char **v) if (do_send) if (socket_send(socket, v, vpos) != 0) { printf("ERROR: socket writing failed\n"); abort(); } + + if (do_send && do_wait) getchar(); } fclose(in); From 0f0fa90d16ff7d2d2f5c40a55d9a4fa1f3bbc0d3 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 20 Jun 2016 15:40:53 +0200 Subject: [PATCH 27/57] xy view to exist in two flavours XY_LOOP_MODE: replace old points with new ones, using the maximum size of the view XY_FORCE_MODE: append_forced sets those and only those points and we crash if we pass too much points --- common/utils/T/tracer/enb.c | 2 +- common/utils/T/tracer/view/view.h | 4 ++- common/utils/T/tracer/view/xy.c | 43 ++++++++++++++++++++++++++----- 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/common/utils/T/tracer/enb.c b/common/utils/T/tracer/enb.c index a120ba471e..7d835604fe 100644 --- a/common/utils/T/tracer/enb.c +++ b/common/utils/T/tracer/enb.c @@ -132,7 +132,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database) */ framelog_set_skip(input_signal_log, 10); input_signal_view = new_view_xy(7680*10, 10, - g, input_signal_plot, new_color(g, "#0c0c72")); + g, input_signal_plot, new_color(g, "#0c0c72"), XY_LOOP_MODE); logger_add_view(input_signal_log, input_signal_view); /* downlink/uplink UE DCIs */ diff --git a/common/utils/T/tracer/view/view.h b/common/utils/T/tracer/view/view.h index cbc5e21b73..2173c842ce 100644 --- a/common/utils/T/tracer/view/view.h +++ b/common/utils/T/tracer/view/view.h @@ -11,10 +11,12 @@ typedef struct view { void (*set)(struct view *this, char *name, ...); } view; +enum xy_mode { XY_LOOP_MODE, XY_FORCED_MODE }; + view *new_view_stdout(void); view *new_view_textlist(int maxsize, float refresh_rate, gui *g, widget *w); view *new_view_xy(int length, float refresh_rate, gui *g, widget *w, - int color); + int color, enum xy_mode mode); view *new_view_tti(float refresh_rate, gui *g, widget *w, int color); view *new_view_time(int number_of_seconds, float refresh_rate, diff --git a/common/utils/T/tracer/view/xy.c b/common/utils/T/tracer/view/xy.c index 1407a16a0e..96a44cf512 100644 --- a/common/utils/T/tracer/view/xy.c +++ b/common/utils/T/tracer/view/xy.c @@ -14,6 +14,7 @@ struct xy { float refresh_rate; pthread_mutex_t lock; int length; + int max_length; /* used in XY_FORCED_MODE */ float *x; float *y; int insert_point; @@ -39,7 +40,7 @@ static void clear(view *this) /* TODO */ } -static void append(view *_this, float *x, float *y, int length) +static void append_loop(view *_this, float *x, float *y, int length) { struct xy *this = (struct xy *)_this; int i; @@ -61,6 +62,25 @@ static void append(view *_this, float *x, float *y, int length) if (pthread_mutex_unlock(&this->lock)) abort(); } +static void append_forced(view *_this, float *x, float *y, int length) +{ + struct xy *this = (struct xy *)_this; + + if (length > this->max_length) { + printf("%s:%d:%s: bad length (%d), max allowed is %d\n", + __FILE__, __LINE__, __FUNCTION__, length, this->max_length); + abort(); + } + + if (pthread_mutex_lock(&this->lock)) abort(); + + memcpy(this->x, x, length * sizeof(float)); + memcpy(this->y, y, length * sizeof(float)); + this->length = length; + + if (pthread_mutex_unlock(&this->lock)) abort(); +} + static void set(view *_this, char *name, ...) { struct xy *this = (struct xy *)_this; @@ -89,24 +109,35 @@ static void set(view *_this, char *name, ...) } view *new_view_xy(int length, float refresh_rate, gui *g, widget *w, - int color) + int color, enum xy_mode mode) { struct xy *ret = calloc(1, sizeof(struct xy)); if (ret == NULL) abort(); ret->common.clear = clear; - ret->common.append = (void (*)(view *, ...))append; - ret->common.set = set; + + switch (mode) { + case XY_LOOP_MODE: + ret->common.append = (void (*)(view *, ...))append_loop; + ret->common.set = set; + ret->length = length; + ret->insert_point = 0; + break; + case XY_FORCED_MODE: + ret->common.append = (void (*)(view *, ...))append_forced; + ret->common.set = NULL; + ret->length = 0; + ret->max_length = length; + break; + } ret->refresh_rate = refresh_rate; ret->g = g; ret->w = w; ret->plot = xy_plot_new_plot(g, w, color); - ret->length = length; ret->x = calloc(length, sizeof(float)); if (ret->x == NULL) abort(); ret->y = calloc(length, sizeof(float)); if (ret->y == NULL) abort(); - ret->insert_point = 0; if (pthread_mutex_init(&ret->lock, NULL)) abort(); From f7d815190b6230e7805d045f537a348094313b3c Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Mon, 20 Jun 2016 18:58:06 +0200 Subject: [PATCH 28/57] Gitlab CI: fix for 0255* + iperf script route --- cmake_targets/autotests/test_case_list.xml | 44 +++++++++++----------- cmake_targets/autotests/tools/iperf_script | 12 ++++++ 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 7b92ce2d11..c59d83e30b 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -6082,7 +6082,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -6099,10 +6099,10 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -6157,7 +6157,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -6174,10 +6174,10 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -6305,7 +6305,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -6322,10 +6322,10 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -6368,7 +6368,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 10Mbits/s -i 1 -f m -u + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 17Mbits/s -i 1 -f m -u False @@ -6379,7 +6379,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -6396,10 +6396,10 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -6442,7 +6442,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 20Mbits/s -i 1 -f m -u + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 34Mbits/s -i 1 -f m -u False diff --git a/cmake_targets/autotests/tools/iperf_script b/cmake_targets/autotests/tools/iperf_script index 5f9baff09f..fb540657b6 100755 --- a/cmake_targets/autotests/tools/iperf_script +++ b/cmake_targets/autotests/tools/iperf_script @@ -39,14 +39,26 @@ timeout=${args[0]} iface=${args[1]} iperf_args=(${args[@]:2}) +ip_client=echo "$iperf_args" | sed -ne 's/.*\-c[ ]*\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/p' + #array=${1:-1} echo "args = ${args[@]}" echo "timeout = $timeout" echo "iface = $iface" echo "iperf_args = ${iperf_args[@]}" +echo "ip_client = $ip_client" sleep $timeout +echo " Waiting for IP Address..." while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5 +if [ -n "$ip_client" ]; then +echo "Waiting for route to be setup before iperf makes connection..." + var=`route -n | grep $ip_client` + if ["$var" != "" ] ; then break; fi + +fi +sleep 5 + iperf ${iperf_args[@]} From 039f819d10bd48f37bedd0843551c182334456b5 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Mon, 20 Jun 2016 18:58:06 +0200 Subject: [PATCH 29/57] Gitlab CI: fix for 0255* + iperf script route --- cmake_targets/autotests/test_case_list.xml | 44 +++++++++++----------- cmake_targets/autotests/tools/iperf_script | 12 ++++++ 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 7b92ce2d11..c59d83e30b 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -6082,7 +6082,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -6099,10 +6099,10 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -6157,7 +6157,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -6174,10 +6174,10 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -6305,7 +6305,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -6322,10 +6322,10 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -6368,7 +6368,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 10Mbits/s -i 1 -f m -u + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 17Mbits/s -i 1 -f m -u False @@ -6379,7 +6379,7 @@ c lte-softmodem - calisson + tique stevens amerique 390 @@ -6396,10 +6396,10 @@ c targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf nb_antennas_tx 1 - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" - targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.147/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.147/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf ENB_PORT_FOR_S1U 2152 $OPENAIR_DIR/cmake_targets/build_oai --eNB -w USRP -x -c @@ -6442,7 +6442,7 @@ c /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 - $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 20Mbits/s -i 1 -f m -u + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 65 lo -c 192.172.0.2 -b 34Mbits/s -i 1 -f m -u False diff --git a/cmake_targets/autotests/tools/iperf_script b/cmake_targets/autotests/tools/iperf_script index 5f9baff09f..fb540657b6 100755 --- a/cmake_targets/autotests/tools/iperf_script +++ b/cmake_targets/autotests/tools/iperf_script @@ -39,14 +39,26 @@ timeout=${args[0]} iface=${args[1]} iperf_args=(${args[@]:2}) +ip_client=echo "$iperf_args" | sed -ne 's/.*\-c[ ]*\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/p' + #array=${1:-1} echo "args = ${args[@]}" echo "timeout = $timeout" echo "iface = $iface" echo "iperf_args = ${iperf_args[@]}" +echo "ip_client = $ip_client" sleep $timeout +echo " Waiting for IP Address..." while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5 +if [ -n "$ip_client" ]; then +echo "Waiting for route to be setup before iperf makes connection..." + var=`route -n | grep $ip_client` + if ["$var" != "" ] ; then break; fi + +fi +sleep 5 + iperf ${iperf_args[@]} From 8c328e00b01e590e4dc46e247e21d170d6630166 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 22 Jun 2016 10:53:59 +0200 Subject: [PATCH 30/57] increase size of enb.c man window --- common/utils/T/tracer/enb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/utils/T/tracer/enb.c b/common/utils/T/tracer/enb.c index 7d835604fe..7a8d8adc90 100644 --- a/common/utils/T/tracer/enb.c +++ b/common/utils/T/tracer/enb.c @@ -114,7 +114,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database) view *textview; int i; - main_window = new_toplevel_window(g, 800, 600, "eNB tracer"); + main_window = new_toplevel_window(g, 1200, 900, "eNB tracer"); top_container = new_container(g, VERTICAL); widget_add_child(g, main_window, top_container, -1); From d2bd09bb9d63cfdbc8c389a33ec5945ffe2f80c3 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 22 Jun 2016 10:55:34 +0200 Subject: [PATCH 31/57] add function framelog_set_update_only_at_sf9 and update code about it --- common/utils/T/tracer/logger/framelog.c | 11 ++++++++++- common/utils/T/tracer/logger/logger.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/common/utils/T/tracer/logger/framelog.c b/common/utils/T/tracer/logger/framelog.c index 057960c382..45ae3e399f 100644 --- a/common/utils/T/tracer/logger/framelog.c +++ b/common/utils/T/tracer/logger/framelog.c @@ -21,6 +21,7 @@ struct framelog { */ int skip_current; /* internal data for the skip mechanism */ int skip_on; /* internal data for the skip mechanism */ + int update_only_at_sf9; }; static void _event(void *p, event e) @@ -76,7 +77,7 @@ static void _event(void *p, event e) l->buffer[subframe * nsamples + i] = 10*log10(1.0+(float)(I*I+Q*Q)); } - if (subframe == 9) + if (l->update_only_at_sf9 == 0 || subframe == 9) for (i = 0; i < l->common.vsize; i++) l->common.v[i]->append(l->common.v[i], l->x, l->buffer, l->blength); } @@ -91,6 +92,8 @@ logger *new_framelog(event_handler *h, void *database, ret = calloc(1, sizeof(struct framelog)); if (ret == NULL) abort(); + ret->update_only_at_sf9 = 1; + ret->common.event_name = strdup(event_name); if (ret->common.event_name == NULL) abort(); ret->database = database; @@ -144,3 +147,9 @@ void framelog_set_skip(logger *_this, int skip_delay) l->skip_current = 0; l->skip_on = 0; } + +void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9) +{ + struct framelog *l = _this; + l->update_only_at_sf9 = update_only_at_sf9; +} diff --git a/common/utils/T/tracer/logger/logger.h b/common/utils/T/tracer/logger/logger.h index e3e4b97aa5..c977973160 100644 --- a/common/utils/T/tracer/logger/logger.h +++ b/common/utils/T/tracer/logger/logger.h @@ -15,6 +15,7 @@ logger *new_ticklog(void *event_handler, void *database, char *event_name, char *frame_name, char *subframe_name); void framelog_set_skip(logger *_this, int skip_delay); +void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9); #include "view/view.h" From f31145ac96058b128ae65c9ffc48eae19b81ba31 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 22 Jun 2016 10:58:25 +0200 Subject: [PATCH 32/57] new IQ logger the current version is very specific to PUSCH IQ data, where the input buffer has a special format to be rewritten cleanly at some point --- common/utils/T/tracer/logger/Makefile | 2 +- common/utils/T/tracer/logger/iqlog.c | 187 ++++++++++++++++++++++++++ common/utils/T/tracer/logger/logger.h | 3 + 3 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 common/utils/T/tracer/logger/iqlog.c diff --git a/common/utils/T/tracer/logger/Makefile b/common/utils/T/tracer/logger/Makefile index e539100838..8d23717a13 100644 --- a/common/utils/T/tracer/logger/Makefile +++ b/common/utils/T/tracer/logger/Makefile @@ -1,7 +1,7 @@ CC=gcc CFLAGS=-Wall -g -pthread -I.. -OBJS=logger.o textlog.o framelog.o ttilog.o timelog.o ticklog.o +OBJS=logger.o textlog.o framelog.o ttilog.o timelog.o ticklog.o iqlog.o logger.a: $(OBJS) ar cr logger.a $(OBJS) diff --git a/common/utils/T/tracer/logger/iqlog.c b/common/utils/T/tracer/logger/iqlog.c new file mode 100644 index 0000000000..3d303607ac --- /dev/null +++ b/common/utils/T/tracer/logger/iqlog.c @@ -0,0 +1,187 @@ +#include "logger.h" +#include "logger_defs.h" +#include "handler.h" +#include "database.h" +#include "filter/filter.h" +#include +#include +#include +#include + +struct iqlog { + struct logger common; + void *database; + int nb_rb_arg; + int N_RB_UL_arg; + int symbols_per_tti_arg; + int buffer_arg; + float *i; + float *q; + int max_length; +}; + +#if 0 +/* this function passes all received IQ samples to the views */ +static void _event(void *p, event e) +{ + struct iqlog *l = p; + int i; + void *buffer; + int bsize; + int nsamples; + + if (l->common.filter != NULL && filter_eval(l->common.filter, e) == 0) + return; + + buffer = e.e[l->buffer_arg].b; + bsize = e.e[l->buffer_arg].bsize; + + nsamples = bsize / (2*sizeof(int16_t)); + + if (nsamples > l->max_length) { + l->i = realloc(l->i, nsamples * sizeof(float)); + if (l->i == NULL) abort(); + l->q = realloc(l->q, nsamples * sizeof(float)); + if (l->q == NULL) abort(); + l->max_length = nsamples; + } + + for (i = 0; i < nsamples; i++) { + l->i[i] = ((int16_t *)buffer)[i*2]; + l->q[i] = ((int16_t *)buffer)[i*2+1]; + } + + for (i = 0; i < l->common.vsize; i++) + l->common.v[i]->append(l->common.v[i], l->i, l->q, nsamples); +} +#endif + +static void _event(void *p, event e) +{ + struct iqlog *l = p; + int i, j; + void *buffer; + int bsize; + int nb_rb; + int N_RB_UL; + int symbols_per_tti; + int max_nsamples; + float *idst, *qdst; + int count; + + if (l->common.filter != NULL && filter_eval(l->common.filter, e) == 0) + return; + + nb_rb = e.e[l->nb_rb_arg].i; + N_RB_UL = e.e[l->N_RB_UL_arg].i; + symbols_per_tti = e.e[l->symbols_per_tti_arg].i; + + buffer = e.e[l->buffer_arg].b; + bsize = e.e[l->buffer_arg].bsize; + + if (bsize != N_RB_UL * symbols_per_tti * 12 * 4) { + printf("%s:%d:%s: bad buffer size\n", __FILE__, __LINE__, __FUNCTION__); + abort(); + } + + max_nsamples = bsize / 4; + + if (max_nsamples > l->max_length) { + l->i = realloc(l->i, max_nsamples * sizeof(float)); + if (l->i == NULL) abort(); + l->q = realloc(l->q, max_nsamples * sizeof(float)); + if (l->q == NULL) abort(); + l->max_length = max_nsamples; + } + + idst = l->i; + qdst = l->q; + count = 0; + for (i = 0; i < symbols_per_tti; i++) + for (j = 0; j < 12 * nb_rb; j++) { + *idst = ((int16_t *)buffer)[(i*N_RB_UL*12 + j) * 2]; + *qdst = ((int16_t *)buffer)[(i*N_RB_UL*12 + j) * 2 + 1]; + idst++; + qdst++; + count++; + } + + for (i = 0; i < l->common.vsize; i++) + l->common.v[i]->append(l->common.v[i], l->i, l->q, count); +} + +logger *new_iqlog(event_handler *h, void *database, + char *event_name, char *nb_rb, char *N_RB_UL, char *symbols_per_tti, + char *buffer_varname) +{ + struct iqlog *ret; + int event_id; + database_event_format f; + int i; + + ret = calloc(1, sizeof(struct iqlog)); if (ret == NULL) abort(); + + ret->common.event_name = strdup(event_name); + if (ret->common.event_name == NULL) abort(); + ret->database = database; + + event_id = event_id_from_name(database, event_name); + + ret->common.handler_id = register_handler_function(h,event_id,_event,ret); + + f = get_format(database, event_id); + + /* look for args */ + ret->nb_rb_arg = -1; + ret->N_RB_UL_arg = -1; + ret->symbols_per_tti_arg = -1; + ret->buffer_arg = -1; + for (i = 0; i < f.count; i++) { + if (!strcmp(f.name[i], nb_rb)) ret->nb_rb_arg = i; + if (!strcmp(f.name[i], N_RB_UL)) ret->N_RB_UL_arg = i; + if (!strcmp(f.name[i], symbols_per_tti)) ret->symbols_per_tti_arg = i; + if (!strcmp(f.name[i], buffer_varname)) ret->buffer_arg = i; + } + if (ret->nb_rb_arg == -1) { + printf("%s:%d: argument '%s' not found in event '%s'\n", + __FILE__, __LINE__, nb_rb, event_name); + abort(); + } + if (ret->N_RB_UL_arg == -1) { + printf("%s:%d: argument '%s' not found in event '%s'\n", + __FILE__, __LINE__, N_RB_UL, event_name); + abort(); + } + if (ret->symbols_per_tti_arg == -1) { + printf("%s:%d: argument '%s' not found in event '%s'\n", + __FILE__, __LINE__, symbols_per_tti, event_name); + abort(); + } + if (ret->buffer_arg == -1) { + printf("%s:%d: buffer argument '%s' not found in event '%s'\n", + __FILE__, __LINE__, buffer_varname, event_name); + abort(); + } + if (strcmp(f.type[ret->nb_rb_arg], "int") != 0) { + printf("%s:%d: argument '%s' has wrong type (should be 'int')\n", + __FILE__, __LINE__, nb_rb); + abort(); + } + if (strcmp(f.type[ret->N_RB_UL_arg], "int") != 0) { + printf("%s:%d: argument '%s' has wrong type (should be 'int')\n", + __FILE__, __LINE__, nb_rb); + abort(); + } + if (strcmp(f.type[ret->symbols_per_tti_arg], "int") != 0) { + printf("%s:%d: argument '%s' has wrong type (should be 'int')\n", + __FILE__, __LINE__, symbols_per_tti); + abort(); + } + if (strcmp(f.type[ret->buffer_arg], "buffer") != 0) { + printf("%s:%d: argument '%s' has wrong type (should be 'buffer')\n", + __FILE__, __LINE__, buffer_varname); + abort(); + } + + return ret; +} diff --git a/common/utils/T/tracer/logger/logger.h b/common/utils/T/tracer/logger/logger.h index c977973160..926eaff58c 100644 --- a/common/utils/T/tracer/logger/logger.h +++ b/common/utils/T/tracer/logger/logger.h @@ -13,6 +13,9 @@ logger *new_ttilog(void *event_handler, void *database, logger *new_timelog(void *event_handler, void *database, char *event_name); logger *new_ticklog(void *event_handler, void *database, char *event_name, char *frame_name, char *subframe_name); +logger *new_iqlog(void *event_handler, void *database, + char *event_name, char *nb_rb, char *N_RB_UL, char *symbols_per_tti, + char *buffer_varname); void framelog_set_skip(logger *_this, int skip_delay); void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9); From 3c5e27618deb8aab1a0fcf17c942e6fe5467097c Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 22 Jun 2016 11:10:53 +0200 Subject: [PATCH 33/57] add PUSCH IQ and UL channel estimates for UE 0 to enb.c --- common/utils/T/tracer/enb.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/common/utils/T/tracer/enb.c b/common/utils/T/tracer/enb.c index 7a8d8adc90..87010b6e39 100644 --- a/common/utils/T/tracer/enb.c +++ b/common/utils/T/tracer/enb.c @@ -113,6 +113,9 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database) widget *text; view *textview; int i; + widget *w; + view *v; + logger *l; main_window = new_toplevel_window(g, 1200, 900, "eNB tracer"); top_container = new_container(g, VERTICAL); @@ -135,6 +138,36 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database) g, input_signal_plot, new_color(g, "#0c0c72"), XY_LOOP_MODE); logger_add_view(input_signal_log, input_signal_view); + /* UE 0 PUSCH IQ data */ + w = new_xy_plot(g, 55, 55, "PUSCH IQ", 50); + widget_add_child(g, line, w, -1); + xy_plot_set_range(g, w, -1000, 1000, -1000, 1000); + l = new_iqlog(h, database, "ENB_PHY_PUSCH_IQ", "nb_rb", + "N_RB_UL", "symbols_per_tti", "pusch_comp"); + v = new_view_xy(100*12*14,10,g,w,new_color(g,"#000"),XY_FORCED_MODE); + logger_add_view(l, v); + logger_set_filter(l, + filter_eq( + filter_evarg(database, "ENB_PHY_PUSCH_IQ", "UE_ID"), + filter_int(0) + )); + + /* UE 0 estimated UL channel */ + w = new_xy_plot(g, 256*2, 55, "UL estimated channel", 50); + widget_add_child(g, line, w, -1); + xy_plot_set_range(g, w, 0, 512*10, -10, 80); + l = new_framelog(h, database, + "ENB_PHY_UL_CHANNEL_ESTIMATE", "subframe", "chest_t"); + //framelog_set_skip(input_signal_log, 10); + framelog_set_update_only_at_sf9(l, 0); + v = new_view_xy(512*10, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE); + logger_add_view(l, v); + logger_set_filter(l, + filter_eq( + filter_evarg(database, "ENB_PHY_UL_CHANNEL_ESTIMATE", "UE_ID"), + filter_int(0) + )); + /* downlink/uplink UE DCIs */ widget_add_child(g, top_container, new_label(g,"DL/UL TICK/DCI/ACK/NACK "), -1); @@ -445,6 +478,7 @@ int main(int n, char **v) } on_off(database, "ENB_PHY_INPUT_SIGNAL", is_on, 1); + on_off(database, "ENB_PHY_UL_CHANNEL_ESTIMATE", is_on, 1); on_off(database, "ENB_PHY_DL_TICK", is_on, 1); on_off(database, "ENB_PHY_DLSCH_UE_DCI", is_on, 1); on_off(database, "ENB_PHY_DLSCH_UE_ACK", is_on, 1); @@ -455,6 +489,7 @@ int main(int n, char **v) on_off(database, "ENB_PHY_ULSCH_UE_ACK", is_on, 1); on_off(database, "ENB_PHY_ULSCH_UE_NACK", is_on, 1); on_off(database, "ENB_MASTER_TICK", is_on, 1); + on_off(database, "ENB_PHY_PUSCH_IQ", is_on, 1); on_off(database, "LEGACY_RRC_INFO", is_on, 1); on_off(database, "LEGACY_RRC_ERROR", is_on, 1); From bbcfd0047c664c7d694d4ea4cd059614e016bc27 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 22 Jun 2016 11:14:27 +0200 Subject: [PATCH 34/57] add a "hacks" directory with hackish-quality pieces of software stuff put in there is of lower quality / coding standard / whatever and serves as example to do quick debugging taks using the T infrastructure --- common/utils/T/tracer/Makefile | 1 + common/utils/T/tracer/hacks/Makefile | 18 +++ .../utils/T/tracer/hacks/dump_nack_signal.c | 115 ++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 common/utils/T/tracer/hacks/Makefile create mode 100644 common/utils/T/tracer/hacks/dump_nack_signal.c diff --git a/common/utils/T/tracer/Makefile b/common/utils/T/tracer/Makefile index 4345db1f70..ee289aae59 100644 --- a/common/utils/T/tracer/Makefile +++ b/common/utils/T/tracer/Makefile @@ -55,3 +55,4 @@ clean: cd view && make clean cd logger && make clean cd filter && make clean + cd hacks && make clean diff --git a/common/utils/T/tracer/hacks/Makefile b/common/utils/T/tracer/hacks/Makefile new file mode 100644 index 0000000000..ab10305c0b --- /dev/null +++ b/common/utils/T/tracer/hacks/Makefile @@ -0,0 +1,18 @@ +CC=gcc +CFLAGS=-Wall -g -pthread -DT_TRACER -I. -I.. + +LIBS=-lX11 -lm -lpng -lXft + +all: dump_nack_signal + +dump_nack_signal: ../utils.o ../database.o ../config.o ../event.o \ + dump_nack_signal.o + $(CC) $(CFLAGS) -o dump_nack_signal $^ $(LIBS) + +.PHONY: all + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +clean: + rm -f *.o core dump_nack_signal diff --git a/common/utils/T/tracer/hacks/dump_nack_signal.c b/common/utils/T/tracer/hacks/dump_nack_signal.c new file mode 100644 index 0000000000..1627bdd14e --- /dev/null +++ b/common/utils/T/tracer/hacks/dump_nack_signal.c @@ -0,0 +1,115 @@ +#include +#include +#include +#include "utils.h" +#include "event.h" +#include "database.h" +#include "config.h" +#include "../T_defs.h" + +void usage(void) +{ + printf( +"options:\n" +" -d this option is mandatory\n" +" -ip connect to given IP address (default %s)\n" +" -p connect to given port (default %d)\n", + DEFAULT_REMOTE_IP, + DEFAULT_REMOTE_PORT + ); + exit(1); +} + +int main(int n, char **v) +{ + char *database_filename = NULL; + void *database; + char *ip = DEFAULT_REMOTE_IP; + int port = DEFAULT_REMOTE_PORT; + int i; + char t; + int number_of_events; + int socket; + int *is_on; + int ev_input, ev_nack; + int ev_ack; + + for (i = 1; i < n; i++) { + if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage(); + if (!strcmp(v[i], "-d")) + { if (i > n-2) usage(); database_filename = v[++i]; continue; } + if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; } + if (!strcmp(v[i], "-p")) + { if (i > n-2) usage(); port = atoi(v[++i]); continue; } + usage(); + } + + if (database_filename == NULL) { + printf("ERROR: provide a database file (-d)\n"); + exit(1); + } + + database = parse_database(database_filename); + + load_config_file(database_filename); + + number_of_events = number_of_ids(database); + is_on = calloc(number_of_events, sizeof(int)); + if (is_on == NULL) abort(); + + on_off(database, "ENB_PHY_INPUT_SIGNAL", is_on, 1); + on_off(database, "ENB_PHY_ULSCH_UE_NACK", is_on, 1); + on_off(database, "ENB_PHY_ULSCH_UE_ACK", is_on, 1); + + ev_input = event_id_from_name(database, "ENB_PHY_INPUT_SIGNAL"); + ev_nack = event_id_from_name(database, "ENB_PHY_ULSCH_UE_NACK"); + ev_ack = event_id_from_name(database, "ENB_PHY_ULSCH_UE_ACK"); + + socket = connect_to(ip, port); + + t = 1; + if (socket_send(socket, &t, 1) == -1 || + socket_send(socket, &number_of_events, sizeof(int)) == -1 || + socket_send(socket, is_on, number_of_events * sizeof(int)) == -1) + abort(); + + char dump[10][T_BUFFER_MAX]; + event dump_ev[10]; +FILE *z = fopen("/tmp/dd", "w"); if (z == NULL) abort(); + while (1) { + char v[T_BUFFER_MAX]; + event e; + e = get_event(socket, v, database); + if (e.type == -1) break; + if (e.type == ev_input) { + int sf = e.e[2].i; + memcpy(dump[sf], v, T_BUFFER_MAX); + dump_ev[sf] = e; + printf("input %d/%d\n", e.e[1].i, sf); +if (fwrite(dump_ev[sf].e[4].b, dump_ev[sf].e[4].bsize, 1, z) != 1) abort(); +fflush(z); + } + if (e.type == ev_nack) { + int sf = e.e[2].i; + printf("nack %d/%d\n", e.e[1].i, sf); + FILE *f = fopen("/tmp/dump.raw", "w"); if (f == NULL) abort(); + if (fwrite(dump[sf] + ((char *)dump_ev[sf].e[4].b - v), + dump_ev[sf].e[4].bsize, 1, f) != 1) abort(); + if (fclose(f)) abort(); + printf("dumped... press enter (delta %d)\n", (int)((char *)dump_ev[sf].e[4].b - v)); +// getchar(); + } + if (e.type == ev_ack) { + int sf = e.e[2].i; + printf("ack %d/%d\n", e.e[1].i, sf); + FILE *f = fopen("/tmp/dump.raw", "w"); if (f == NULL) abort(); + if (fwrite(dump[sf] + ((char *)dump_ev[sf].e[4].b - v), + dump_ev[sf].e[4].bsize, 1, f) != 1) abort(); + if (fclose(f)) abort(); + printf("dumped... press enter (delta %d)\n", (int)((char *)dump_ev[sf].e[4].b - v)); +// getchar(); + } + } + + return 0; +} From 088db3cf370878fa6bed3152e0460df8963c8acd Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 22 Jun 2016 16:10:32 +0200 Subject: [PATCH 35/57] new function PUTX2 to display an int as an 8 bits hexadecimal --- common/utils/T/tracer/utils.c | 7 +++++++ common/utils/T/tracer/utils.h | 1 + 2 files changed, 8 insertions(+) diff --git a/common/utils/T/tracer/utils.c b/common/utils/T/tracer/utils.c index 3ebc000c67..a22e0a0565 100644 --- a/common/utils/T/tracer/utils.c +++ b/common/utils/T/tracer/utils.c @@ -190,6 +190,13 @@ void PUTI(OBUF *o, int i) PUTS(o, s); } +void PUTX2(OBUF *o, int i) +{ + char s[64]; + sprintf(s, "%2.2x", i); + PUTS(o, s); +} + void PUTUL(OBUF *o, unsigned long l) { char s[128]; diff --git a/common/utils/T/tracer/utils.h b/common/utils/T/tracer/utils.h index d3cf0350da..086e92b5dc 100644 --- a/common/utils/T/tracer/utils.h +++ b/common/utils/T/tracer/utils.h @@ -44,6 +44,7 @@ void PUTC(OBUF *o, char c); void PUTS(OBUF *o, char *s); void PUTS_CLEAN(OBUF *o, char *s); void PUTI(OBUF *o, int i); +void PUTX2(OBUF *o, int i); void PUTUL(OBUF *o, unsigned long i); #endif /* _UTILS_H_ */ From 31e1be78fafa9dac4919ace2d4e2d193b7a4b0d4 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 22 Jun 2016 16:11:43 +0200 Subject: [PATCH 36/57] add possibility to logger 'textlog' to print full content of buffers --- common/utils/T/tracer/logger/logger.h | 2 ++ common/utils/T/tracer/logger/textlog.c | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/common/utils/T/tracer/logger/logger.h b/common/utils/T/tracer/logger/logger.h index 926eaff58c..a777581db9 100644 --- a/common/utils/T/tracer/logger/logger.h +++ b/common/utils/T/tracer/logger/logger.h @@ -20,6 +20,8 @@ logger *new_iqlog(void *event_handler, void *database, void framelog_set_skip(logger *_this, int skip_delay); void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9); +void textlog_dump_buffer(logger *_this, int dump_buffer); + #include "view/view.h" void logger_add_view(logger *l, view *v); diff --git a/common/utils/T/tracer/logger/textlog.c b/common/utils/T/tracer/logger/textlog.c index e80af7813e..9eb6fd02d8 100644 --- a/common/utils/T/tracer/logger/textlog.c +++ b/common/utils/T/tracer/logger/textlog.c @@ -32,12 +32,13 @@ struct textlog { int fsize; /* local output buffer */ OBUF o; + int dump_buffer; }; static void _event(void *p, event e) { struct textlog *l = p; - int i; + int i, j; #ifdef T_SEND_TIME struct tm *t; char tt[64]; @@ -65,6 +66,14 @@ static void _event(void *p, event e) case BUFFER: PUTS(&l->o, "{buffer size:"); PUTI(&l->o, e.e[l->f[i].event_arg].bsize); + if (l->dump_buffer) { + PUTS(&l->o, " ["); + for (j = 0; j < e.e[l->f[i].event_arg].bsize; j++) { + PUTX2(&l->o, ((unsigned char *)e.e[l->f[i].event_arg].b)[j]); + PUTC(&l->o, ' '); + } + PUTS(&l->o, "]"); + } PUTS(&l->o, "}"); break; } @@ -196,3 +205,13 @@ error: printf("%s:%d: bad format '%s'\n", __FILE__, __LINE__, format); abort(); } + +/****************************************************************************/ +/* public functions */ +/****************************************************************************/ + +void textlog_dump_buffer(logger *_this, int dump_buffer) +{ + struct textlog *l = _this; + l->dump_buffer = dump_buffer; +} From 6a809e84de3f2536db4951480172c7e5df1eba2f Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 22 Jun 2016 16:13:47 +0200 Subject: [PATCH 37/57] add option -full to textlog.c to display full content of buffers --- common/utils/T/tracer/textlog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/utils/T/tracer/textlog.c b/common/utils/T/tracer/textlog.c index 9c9b580def..32bf1ed791 100644 --- a/common/utils/T/tracer/textlog.c +++ b/common/utils/T/tracer/textlog.c @@ -52,6 +52,7 @@ void usage(void) " note: you may pass several -on/-off/-ON/-OFF,\n" " they will be processed in order\n" " by default, all is off\n" +" -full also dump buffers' content\n" " -ip connect to given IP address (default %s)\n" " -p connect to given port (default %d)\n" " -x GUI output\n" @@ -90,6 +91,7 @@ int main(int n, char **v) view *out; int gui_active = 1; textlog_data textlog_data; + int full = 0; /* write on a socket fails if the other end is closed and we get SIGPIPE */ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort(); @@ -115,6 +117,7 @@ int main(int n, char **v) if (!strcmp(v[i], "-x")) { gui_mode = 1; continue; } if (!strcmp(v[i], "-debug-gui")) { gui_logd = 1; continue; } if (!strcmp(v[i], "-no-gui")) { gui_active = 0; continue; } + if (!strcmp(v[i], "-full")) { full = 1; continue; } usage(); } @@ -159,6 +162,7 @@ int main(int n, char **v) // "ENB_PHY_UL_CHANNEL_ESTIMATE", // "ev: {} eNB_id [eNB_ID] frame [frame] subframe [subframe]"); logger_add_view(textlog, out); + if (full) textlog_dump_buffer(textlog, 1); free(name); free(desc); } From d47e307472974527ec385e1b404de69fb9a74397 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 23 Jun 2016 11:06:48 +0200 Subject: [PATCH 38/57] rename T_cache to T_local_cache in T/local_tracer.c needed because of the following commit --- common/utils/T/local_tracer.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/common/utils/T/local_tracer.c b/common/utils/T/local_tracer.c index 93a56a9e3d..1f4e494346 100644 --- a/common/utils/T/local_tracer.c +++ b/common/utils/T/local_tracer.c @@ -14,7 +14,7 @@ #include "T_defs.h" #include "T_IDs.h" -static T_cache_t *T_cache; +static T_cache_t *T_local_cache; static int T_busylist_head; typedef struct databuf { @@ -287,7 +287,7 @@ static void forward(void *_forwarder, char *buf, int size) static void wait_message(void) { - while (T_cache[T_busylist_head].busy == 0) usleep(1000); + while (T_local_cache[T_busylist_head].busy == 0) usleep(1000); } static void init_shm(void) @@ -297,17 +297,17 @@ static void init_shm(void) if (s == -1) { perror(T_SHM_FILENAME); abort(); } if (ftruncate(s, T_CACHE_SIZE * sizeof(T_cache_t))) { perror(T_SHM_FILENAME); abort(); } - T_cache = mmap(NULL, T_CACHE_SIZE * sizeof(T_cache_t), - PROT_READ | PROT_WRITE, MAP_SHARED, s, 0); - if (T_cache == NULL) + T_local_cache = mmap(NULL, T_CACHE_SIZE * sizeof(T_cache_t), + PROT_READ | PROT_WRITE, MAP_SHARED, s, 0); + if (T_local_cache == NULL) { perror(T_SHM_FILENAME); abort(); } close(s); /* let's garbage the memory to catch some potential problems * (think multiprocessor sync issues, barriers, etc.) */ - memset(T_cache, 0x55, T_CACHE_SIZE * sizeof(T_cache_t)); - for (i = 0; i < T_CACHE_SIZE; i++) T_cache[i].busy = 0; + memset(T_local_cache, 0x55, T_CACHE_SIZE * sizeof(T_cache_t)); + for (i = 0; i < T_CACHE_SIZE; i++) T_local_cache[i].busy = 0; } void T_local_tracer_main(int remote_port, int wait_for_tracer, @@ -335,9 +335,9 @@ void T_local_tracer_main(int remote_port, int wait_for_tracer, while (1) { wait_message(); __sync_synchronize(); - forward(f, T_cache[T_busylist_head].buffer, - T_cache[T_busylist_head].length); - T_cache[T_busylist_head].busy = 0; + forward(f, T_local_cache[T_busylist_head].buffer, + T_local_cache[T_busylist_head].length); + T_local_cache[T_busylist_head].busy = 0; T_busylist_head++; T_busylist_head &= T_CACHE_SIZE - 1; } From bb051c0219350e3702bff591a72aee3b2384bf69 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 23 Jun 2016 11:09:05 +0200 Subject: [PATCH 39/57] T_messages.txt is now sent by local_tracer.c And it's sent at each connection attempt. Before it was sent only once to the first tracer. Plus there was a bug (length:(len) should have been length:(send_size)). --- common/utils/T/T.c | 28 --------------------------- common/utils/T/local_tracer.c | 36 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/common/utils/T/T.c b/common/utils/T/T.c index 786b3722ed..b9e9b29326 100644 --- a/common/utils/T/T.c +++ b/common/utils/T/T.c @@ -1,5 +1,4 @@ #include "T.h" -#include "T_messages.txt.h" #include #include #include @@ -113,8 +112,6 @@ void T_init(int remote_port, int wait_for_tracer) int socket_pair[2]; int s; int T_shm_fd; - unsigned char *buf; - int len; int child1, child2; if (socketpair(AF_UNIX, SOCK_STREAM, 0, socket_pair)) @@ -153,29 +150,4 @@ void T_init(int remote_port, int wait_for_tracer) close(T_shm_fd); new_thread(T_receive_thread, NULL); - - /* trace T_message.txt - * Send several messages -1 with content followed by message -2. - * We can't use the T macro directly, events -1 and -2 are special. - */ - buf = T_messages_txt; - len = T_messages_txt_len; - while (len) { - int send_size = len; - if (send_size > T_PAYLOAD_MAXSIZE - sizeof(int)) - send_size = T_PAYLOAD_MAXSIZE - sizeof(int); - do { - T_LOCAL_DATA - T_HEADER(T_ID(-1)); - T_PUT_buffer(1, ((T_buffer){addr:(buf), length:(len)})); - T_COMMIT(); - } while (0); - buf += send_size; - len -= send_size; - } - do { - T_LOCAL_DATA - T_HEADER(T_ID(-2)); - T_COMMIT(); - } while (0); } diff --git a/common/utils/T/local_tracer.c b/common/utils/T/local_tracer.c index 1f4e494346..68a937a6b5 100644 --- a/common/utils/T/local_tracer.c +++ b/common/utils/T/local_tracer.c @@ -11,6 +11,8 @@ #include #include +#include "T.h" +#include "T_messages.txt.h" #include "T_defs.h" #include "T_IDs.h" @@ -85,6 +87,38 @@ static int get_connection(char *addr, int port) return t; } +static void forward(void *_forwarder, char *buf, int size); + +void send_T_messages_txt(void *forwarder) +{ + char buf[T_BUFFER_MAX]; + char *T_LOCAL_buf = buf; + int T_LOCAL_size; + unsigned char *src; + int src_len; + + /* trace T_message.txt + * Send several messages -1 with content followed by message -2. + */ + src = T_messages_txt; + src_len = T_messages_txt_len; + while (src_len) { + int send_size = src_len; + if (send_size > T_PAYLOAD_MAXSIZE - sizeof(int)) + send_size = T_PAYLOAD_MAXSIZE - sizeof(int); + /* TODO: be careful, we use internal T stuff, to rewrite? */ + T_LOCAL_size = 0; + T_HEADER(T_ID(-1)); + T_PUT_buffer(1, ((T_buffer){addr:(src), length:(send_size)})); + forward(forwarder, buf, T_LOCAL_size); + src += send_size; + src_len -= send_size; + } + T_LOCAL_size = 0; + T_HEADER(T_ID(-2)); + forward(forwarder, buf, T_LOCAL_size); +} + /****************************************************************************/ /* forward functions */ /****************************************************************************/ @@ -213,6 +247,7 @@ dead: close(f->socket_remote); f->socket_remote = get_connection("0.0.0.0", f->remote_port); + send_T_messages_txt(f); goto again; return NULL; @@ -237,6 +272,7 @@ static void *forwarder(int port, int s) f->remote_port = port; f->socket_remote = get_connection("0.0.0.0", port); + send_T_messages_txt(f); new_thread(data_sender, f); new_thread(forward_remote_messages, f); From bb0816cdebbb33f7cce0fea8ec004e05507a6191 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 23 Jun 2016 12:38:59 +0200 Subject: [PATCH 40/57] 2 new T logs: MAC PDU/SDU with buffer data --- common/utils/T/T_messages.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index 062b98d6c8..05c08085c6 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -79,10 +79,18 @@ ID = ENB_MAC_UE_UL_PDU DESC = MAC uplink UE received PDU GROUP = ALL:MAC:ENB FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : int,sdu_length : int,num_ce : int,num_sdu +ID = ENB_MAC_UE_UL_PDU_WITH_DATA + DESC = MAC uplink UE received PDU + GROUP = ALL:MAC:ENB:HEAVY + FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : int,sdu_length : int,num_ce : int,num_sdu : buffer,data ID = ENB_MAC_UE_UL_SDU DESC = MAC uplink UE received SDU GROUP = ALL:MAC:ENB FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,lcid : int,length +ID = ENB_MAC_UE_UL_SDU_WITH_DATA + DESC = MAC uplink UE received SDU + GROUP = ALL:MAC:ENB:HEAVY + FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,lcid : int,length : buffer,data ID = ENB_MAC_UE_UL_CE DESC = MAC uplink UE received control element GROUP = ALL:MAC:ENB From 6445cc95f55f8d2b4b02054c33e7324b9d095c45 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 23 Jun 2016 12:39:57 +0200 Subject: [PATCH 41/57] add T traces for MAC PDU/SDU including full buffers --- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 837706de23..1f488687a3 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -130,6 +130,8 @@ void rx_sdu( T(T_ENB_MAC_UE_UL_PDU, T_INT(enb_mod_idP), T_INT(CC_idP), T_INT(rntiP), T_INT(frameP), T_INT(subframeP), T_INT(harq_pidP), T_INT(sdu_lenP), T_INT(num_ce), T_INT(num_sdu)); + T(T_ENB_MAC_UE_UL_PDU_WITH_DATA, T_INT(enb_mod_idP), T_INT(CC_idP), T_INT(rntiP), T_INT(frameP), T_INT(subframeP), + T_INT(harq_pidP), T_INT(sdu_lenP), T_INT(num_ce), T_INT(num_sdu), T_BUFFER(sduP, sdu_lenP)); eNB->eNB_stats[CC_idP].ulsch_bytes_rx=sdu_lenP; eNB->eNB_stats[CC_idP].total_ulsch_bytes_rx+=sdu_lenP; @@ -313,6 +315,8 @@ void rx_sdu( T(T_ENB_MAC_UE_UL_SDU, T_INT(enb_mod_idP), T_INT(CC_idP), T_INT(rntiP), T_INT(frameP), T_INT(subframeP), T_INT(rx_lcids[i]), T_INT(rx_lengths[i])); + T(T_ENB_MAC_UE_UL_SDU_WITH_DATA, T_INT(enb_mod_idP), T_INT(CC_idP), T_INT(rntiP), T_INT(frameP), T_INT(subframeP), + T_INT(rx_lcids[i]), T_INT(rx_lengths[i]), T_BUFFER(payload_ptr, rx_lengths[i])); switch (rx_lcids[i]) { case CCCH : From 832ecfb47064d157b78927c307b9ebc9a8334a5a Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 23 Jun 2016 12:41:19 +0200 Subject: [PATCH 42/57] update enb.c to include MAC PDU/SDU with full buffer logs --- common/utils/T/tracer/enb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/utils/T/tracer/enb.c b/common/utils/T/tracer/enb.c index 87010b6e39..7dadafc896 100644 --- a/common/utils/T/tracer/enb.c +++ b/common/utils/T/tracer/enb.c @@ -509,7 +509,9 @@ int main(int n, char **v) view_add_log(eg.macview, "ENB_MAC_UE_UL_SCHEDULE_RETRANSMISSION", h, database, is_on); view_add_log(eg.macview, "ENB_MAC_UE_UL_PDU", h, database, is_on); + view_add_log(eg.macview, "ENB_MAC_UE_UL_PDU_WITH_DATA", h, database, is_on); view_add_log(eg.macview, "ENB_MAC_UE_UL_SDU", h, database, is_on); + view_add_log(eg.macview, "ENB_MAC_UE_UL_SDU_WITH_DATA", h, database, is_on); view_add_log(eg.macview, "ENB_MAC_UE_UL_CE", h, database, is_on); view_add_log(eg.rlcview, "ENB_RLC_DL", h, database, is_on); @@ -577,6 +579,10 @@ int main(int n, char **v) view_add_log(eg.rrcview, "ENB_RRC_UNKNOW_MESSAGE", h, database, is_on); + /* deactivate those two by default, they are a bit heavy */ + on_off(database, "ENB_MAC_UE_UL_SDU_WITH_DATA", is_on, 0); + on_off(database, "ENB_MAC_UE_UL_PDU_WITH_DATA", is_on, 0); + for (i = 0; i < on_off_n; i++) on_off(database, on_off_name[i], is_on, on_off_action[i]); From 1a6c20cf7631f26fda45784c7f2c4c2f0845f536 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Thu, 23 Jun 2016 14:48:25 +0200 Subject: [PATCH 43/57] bugfix: record.c did not manage ctrl+c and ctrl+z correctly ctrl+c did not work when the program was not connected yet. It also didn't work if no event was received. --- common/utils/T/tracer/record.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/common/utils/T/tracer/record.c b/common/utils/T/tracer/record.c index 2dfe35f4da..c81b93e7d7 100644 --- a/common/utils/T/tracer/record.c +++ b/common/utils/T/tracer/record.c @@ -30,9 +30,13 @@ void usage(void) volatile int run = 1; +static int socket = -1; + void force_stop(int x) { printf("\ngently quit...\n"); + close(socket); + socket = -1; run = 0; } @@ -47,7 +51,6 @@ int main(int n, char **v) char **on_off_name; int *on_off_action; int on_off_n = 0; - int socket; int *is_on; int number_of_events; int i; @@ -56,11 +59,6 @@ int main(int n, char **v) /* write on a socket fails if the other end is closed and we get SIGPIPE */ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort(); - /* exit on ctrl+c and ctrl+z */ - if (signal(SIGQUIT, force_stop) == SIG_ERR) abort(); - if (signal(SIGINT, force_stop) == SIG_ERR) abort(); - if (signal(SIGTSTP, force_stop) == SIG_ERR) abort(); - on_off_name = malloc(n * sizeof(char *)); if (on_off_name == NULL) abort(); on_off_action = malloc(n * sizeof(int)); if (on_off_action == NULL) abort(); @@ -119,6 +117,11 @@ int main(int n, char **v) exit(1); } + /* exit on ctrl+c and ctrl+z */ + if (signal(SIGQUIT, force_stop) == SIG_ERR) abort(); + if (signal(SIGINT, force_stop) == SIG_ERR) abort(); + if (signal(SIGTSTP, force_stop) == SIG_ERR) abort(); + /* read messages */ while (run) { int type; From 71af065b486ce1dcc77414e063f0971bdb15c654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Thu, 23 Jun 2016 15:19:56 +0200 Subject: [PATCH 44/57] build_helper: move uhd to not break apt-get remove uhd is not part of ubuntu standard repositories >= 14.04. Move the removal of uhd in its own space and do not fail if it doesn't exists. --- cmake_targets/tools/build_helper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 36d3410349..3d7b4045ae 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -213,7 +213,8 @@ install_gnutls_from_source(){ check_install_usrp_uhd_driver(){ #first we remove old installation - $SUDO apt-get remove uhd libuhd-dev libuhd003 uhd-host -y + $SUDO apt-get remove -y uhd || true + $SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y v=$(lsb_release -cs) $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" #The new USRP repository From 30cf26c0dc54c49af1533692d61309391dfeb376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Fri, 24 Jun 2016 08:15:45 +0200 Subject: [PATCH 45/57] build_helper: fix libxslt1-dev installation libxslt1-dev is used at least for asn1 and usrp. It breaks the build when in check_install_additional_tools(). Move it to to check_install_oai_software() --- cmake_targets/tools/build_helper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 3d7b4045ae..9971c56d86 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -271,8 +271,7 @@ check_install_additional_tools (){ android-tools-adb \ wvdial \ python-numpy \ - sshpass \ - libxslt1-dev + sshpass $SUDO pip install paramiko $SUDO pip install pyroute2 @@ -356,6 +355,7 @@ check_install_oai_software() { libusb-1.0-0-dev \ libxml2 \ libxml2-dev \ + libxslt1-dev \ linux-headers-`uname -r` \ mscgen \ octave \ From a3d26040de1dcf07d47fbc4d4c63d3a319276d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Fri, 24 Jun 2016 05:35:32 -0500 Subject: [PATCH 46/57] build_helper: add EXIT handler to inform that the build fails --- cmake_targets/tools/build_helper | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 9971c56d86..c3e1ebfb47 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -95,6 +95,18 @@ check_supported_distribution() { return 1 } +################## +# Error handlers # +################## + +handler_EXIT() { + local exit_code=$? + [ "$exit_code" -eq 0 ] || echo_error "build have failed" + exit $exit_code +} + +trap handler_EXIT EXIT + ########################### # Cleaners ########################### From 9624232f677c44b7ad89067e2c6a39ee9182d13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Leroy?= Date: Fri, 24 Jun 2016 06:06:33 -0500 Subject: [PATCH 47/57] build_helper: show "compilation failed" error message --- cmake_targets/tools/build_helper | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index c3e1ebfb47..5b562a14c9 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -148,6 +148,7 @@ clean_all_files() { compilations() { cd $OPENAIR_DIR/cmake_targets/$1/build echo_info "Log file for compilation written in: $dlog/$2.$REL.txt" + set +e { rm -f $3 if [ "$VERBOSE_COMPILE" == "1" ]; then @@ -157,12 +158,14 @@ compilations() { fi } > $dlog/$2.$REL.txt 2>&1 + set -e echo_info "Log file for compilation has been written to: $dlog/$2.$REL.txt" if [ -s $3 ] ; then cp $3 $4 echo_success "$2 compiled" else echo_error "$2 compilation failed" + exit 1 fi } From 3f4f285136e38e9fde623c7e291a687715284a2f Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 24 Jun 2016 17:57:16 +0200 Subject: [PATCH 48/57] fix the T tracee example, it did not work anymore --- common/utils/T/tracee/Makefile | 2 +- common/utils/T/tracee/tracee.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/utils/T/tracee/Makefile b/common/utils/T/tracee/Makefile index 703d49d029..10ea3bdca3 100644 --- a/common/utils/T/tracee/Makefile +++ b/common/utils/T/tracee/Makefile @@ -2,7 +2,7 @@ CC=gcc CFLAGS=-Wall -g -pthread -DT_TRACER -I. PROG=tracee -OBJS=tracee.o ../T.o +OBJS=tracee.o ../T.o ../local_tracer.o $(PROG): $(OBJS) $(CC) $(CFLAGS) -o $(PROG) $(OBJS) -lrt diff --git a/common/utils/T/tracee/tracee.c b/common/utils/T/tracee/tracee.c index b4b73b9e67..f7739f00f9 100644 --- a/common/utils/T/tracee/tracee.c +++ b/common/utils/T/tracee/tracee.c @@ -6,7 +6,7 @@ int main(void) { int frame = 0; - T_connect_to_tracer("127.0.0.1", 2020); + T_init(2021, 1); while (1) { getchar(); T(T_ENB_PHY_PUCCH_1AB_IQ, T_INT(0), T_INT(0), T_INT(frame), T_INT(0), T_INT(0), T_INT(0)); From 4bdacd953d2b698de9d9349e7bef65e5766e374b Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 24 Jun 2016 17:59:50 +0200 Subject: [PATCH 49/57] add a .gitignore in the T directory git status was way too noisy --- common/utils/T/.gitignore | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 common/utils/T/.gitignore diff --git a/common/utils/T/.gitignore b/common/utils/T/.gitignore new file mode 100644 index 0000000000..a52d9a3667 --- /dev/null +++ b/common/utils/T/.gitignore @@ -0,0 +1,12 @@ +*.o +*.a +T_IDs.h +T_messages.txt.h +genids +tracer/enb +tracer/extract_config +tracer/record +tracer/replay +tracer/textlog +tracer/vcd +tracee/tracee From be03e9f80f5f400965ad527fd4a1ccb433e74cf8 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Fri, 24 Jun 2016 18:11:09 +0200 Subject: [PATCH 50/57] bugfix in enb.c we have to free memory in any case... --- common/utils/T/tracer/enb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/utils/T/tracer/enb.c b/common/utils/T/tracer/enb.c index 7dadafc896..b0ae285f6d 100644 --- a/common/utils/T/tracer/enb.c +++ b/common/utils/T/tracer/enb.c @@ -470,9 +470,10 @@ int main(int n, char **v) logger *textlog; char *name, *desc; database_get_generic_description(database, i, &name, &desc); - if (strncmp(name, "LEGACY_", 7) != 0) continue; - textlog = new_textlog(h, database, name, desc); - logger_add_view(textlog, eg.legacy); + if (!strncmp(name, "LEGACY_", 7)) { + textlog = new_textlog(h, database, name, desc); + logger_add_view(textlog, eg.legacy); + } free(name); free(desc); } From f5fc18ff3775e255108bbd34673547f27ea7e60f Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sat, 25 Jun 2016 23:00:07 +0200 Subject: [PATCH 51/57] Gitlab CI: minor updates to test setup --- .../autotests/run_exec_lte-softmodem_tests.py | 35 +++-- cmake_targets/autotests/test_case_list.xml | 132 +++++++++--------- 2 files changed, 90 insertions(+), 77 deletions(-) diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py index 77c3006fea..db14fea40f 100755 --- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py +++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py @@ -312,13 +312,13 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd # \parm programList list of programs that must be terminated before execution of any test case # \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box # \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml) -def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop): +def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop, logdir, logdirOAI5GRepo): cmd = 'killall -9 -q -r ' + programList result = oai.send(cmd, True) print "Killing old programs..." + result programArray = programList.split() programListJoin = '|'.join(programArray) - cmd = " ( date ;echo \"Starting cleaning old programs.. \" ; dmesg|tail ; echo \"Current disk space.. \" ; df -h )>& $HOME/.oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync" + cmd = " ( date ;echo \"Starting cleaning old programs.. \" ; dmesg|tail ; echo \"Current disk space.. \" ; df -h )>& " + logdir + "/oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync" result=oai.send_recv(cmd) cmd = cleanupOldProgramsScript + ' ' + '\''+programListJoin+'\'' #result = oai.send_recv(cmd) @@ -326,8 +326,14 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop): result = oai.send_expect_false(cmd, 'Match found', False) print "Looking for old programs..." + result res=oai.send_recv(CleanUpAluLteBox, True) - cmd = "( " + ExmimoRfStop + " ) >> $HOME/.oai_test_setup_cleanup.log.`hostname` ; sync " + cmd= " echo \"Starting EXmimoRF Stop... \" >> " + logdir + "/oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync "; + oai.send_recv(cmd) + cmd = "( " + "cd " + logdirOAI5GRepo + " ; source oaienv ; " + ExmimoRfStop + " ) >> " + logdir + "/oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync " + print "cleanoldprograms cmd = " + cmd res=oai.send_recv(cmd, False, timeout=600) + cmd= " echo \"Stopping EXmimoRF Stop... \" >> " + logdir + "/oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync "; + oai.send_recv(cmd) + #res = oai.send_recv(ExmimoRfStop, False) cmd = " ( date ;echo \"Finished cleaning old programs.. \" ; dmesg | tail)>> $HOME/.oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync" res=oai.send_recv(cmd) @@ -934,9 +940,9 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , t.join() #Now we get the log files from remote machines on the local machine if RRHMachine != '': - cleanOldProgramsAllMachines([oai_eNB, oai_UE, oai_EPC, oai_RRH] , oldprogramList, CleanUpAluLteBox, ExmimoRfStop) + cleanOldProgramsAllMachines([oai_eNB, oai_UE, oai_EPC, oai_RRH] , oldprogramList, CleanUpAluLteBox, ExmimoRfStop, [logdir_eNB, logdir_UE, logdir_EPC, logdir_RRH], logdirOAI5GRepo) else: - cleanOldProgramsAllMachines([oai_eNB, oai_UE, oai_EPC] , oldprogramList, CleanUpAluLteBox, ExmimoRfStop) + cleanOldProgramsAllMachines([oai_eNB, oai_UE, oai_EPC] , oldprogramList, CleanUpAluLteBox, ExmimoRfStop, [logdir_eNB, logdir_UE, logdir_EPC], logdirOAI5GRepo) logfile_UE_stop_script_out = logdir_UE + '/UE_stop_script_out' + '_' + str(run) + '_.log' logfile_UE_stop_script = logdir_local_testcase + '/UE_stop_script' + '_' + str(run) + '_.log' @@ -1065,7 +1071,7 @@ def search_test_case_group(testcasename, testcasegroup, test_case_exclude): # \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml) # \param ExmimoRfStop command to stop EXMIMO Card class oaiCleanOldProgramThread (threading.Thread): - def __init__(self, threadID, threadname, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop): + def __init__(self, threadID, threadname, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop, logdir, logdirOAI5GRepo): threading.Thread.__init__(self) self.threadID = threadID self.threadname = threadname @@ -1073,9 +1079,11 @@ class oaiCleanOldProgramThread (threading.Thread): self.CleanUpOldProgs = CleanUpOldProgs self.CleanUpAluLteBox = CleanUpAluLteBox self.ExmimoRfStop = ExmimoRfStop + self.logdir = logdir + self.logdirOAI5GRepo = logdirOAI5GRepo def run(self): try: - cleanOldPrograms(self.oai, self.CleanUpOldProgs, self.CleanUpAluLteBox, self.ExmimoRfStop) + cleanOldPrograms(self.oai, self.CleanUpOldProgs, self.CleanUpAluLteBox, self.ExmimoRfStop, self.logdir, self.logdirOAI5GRepo) except Exception, e: error='' error = error + ' In class oaiCleanOldProgramThread, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) @@ -1090,15 +1098,20 @@ class oaiCleanOldProgramThread (threading.Thread): # \param CleanUpOldProgs list of programs which must be terminated before running a test case (specified in test_case_list.xml) # \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml) # \param ExmimoRfStop command to stop EXMIMO Card -def cleanOldProgramsAllMachines(oai_list, CleanOldProgs, CleanUpAluLteBox, ExmimoRfStop): +def cleanOldProgramsAllMachines(oai_list, CleanOldProgs, CleanUpAluLteBox, ExmimoRfStop, logdir_list, logdirOAI5GRepo): threadId=0 threadList=[] + index=0 + if len(oai_list)!=len(logdir_list) : + logdir_list=[logdir[0]]*len(oai_list) + for oai in oai_list: threadName="cleanup_thread_"+str(threadId) - thread=oaiCleanOldProgramThread(threadId, threadName, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) + thread=oaiCleanOldProgramThread(threadId, threadName, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop, logdir_list[index],logdirOAI5GRepo) threadList.append(thread) thread.start() threadId = threadId + 1 + index = index+1 for t in threadList: t.join() @@ -1360,7 +1373,7 @@ if localshell == 0: print "Sudo permissions..." + result print '\nCleaning Older running programs : ' + CleanUpOldProgs - cleanOldPrograms(oai_list[index], CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) + cleanOldPrograms(oai_list[index], CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop, '$HOME', '/tmp') #result = oai_list[index].send('mount ' + NFSResultsDir, True) #print "Mounting NFS Share " + NFSResultsDir + "..." + result @@ -1489,7 +1502,7 @@ if (out != '') : print "Exiting now..." sys.exit(1) -cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) +cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop, '$HOME' , logdirOAI5GRepo) if cleanUpRemoteMachines == True: sys.exit(0) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index c59d83e30b..8c4024e073 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -921,7 +921,7 @@ False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -996,7 +996,7 @@ False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -1070,7 +1070,7 @@ False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -1142,7 +1142,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 1 ppp0 -c 192.172.0.1 -i 1 -u -f m -B 192.172.0.2 -b 17M -R False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec @@ -1216,7 +1216,7 @@ throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -1290,7 +1290,7 @@ throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -1365,7 +1365,7 @@ False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -1439,7 +1439,7 @@ False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -1513,7 +1513,7 @@ False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -1587,7 +1587,7 @@ throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -1661,7 +1661,7 @@ throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -1735,7 +1735,7 @@ throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -1811,7 +1811,7 @@ False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -1895,7 +1895,7 @@ False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -1979,7 +1979,7 @@ False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -2063,7 +2063,7 @@ throughput_test min=10.0Mbits/sec max=10.5Mbits/sec average=11.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -2147,7 +2147,7 @@ throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -2231,7 +2231,7 @@ throughput_test min=40.0Mbits/sec max=42.0Mbits/sec average=44.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -2315,7 +2315,7 @@ False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp ETC/hss.conf MYSQL_user \"root\" @@ -2409,7 +2409,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp ETC/hss.conf MYSQL_user \"root\" @@ -2503,7 +2503,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp ETC/hss.conf MYSQL_user \"root\" @@ -2597,7 +2597,7 @@ c throughput_test min=9.0Mbits/sec max=9Mbits/sec average=9Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp ETC/hss.conf MYSQL_user \"root\" @@ -2691,7 +2691,7 @@ c throughput_test min=9Mbits/sec max=9Mbits/sec average=9Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp ETC/hss.conf MYSQL_user \"root\" @@ -2785,7 +2785,7 @@ c throughput_test min=9Mbits/sec max=9Mbits/sec average=9Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp ETC/hss.conf MYSQL_user \"root\" @@ -2876,7 +2876,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -2948,7 +2948,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -3020,7 +3020,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -3090,7 +3090,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 1 ppp0 -c 192.172.0.1 -i 1 -u -f m -B 192.172.0.2 -b 17M -R False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec @@ -3161,7 +3161,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 1 ppp0 -c 192.172.0.1 -i 1 -u -f m -B 192.172.0.2 -b 35M -R False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec @@ -3232,7 +3232,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec @@ -3308,7 +3308,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -3391,7 +3391,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -3472,7 +3472,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -3553,7 +3553,7 @@ c throughput_test min=10.0Mbits/sec max=10.5Mbits/sec average=11.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -3634,7 +3634,7 @@ c throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -3715,7 +3715,7 @@ c throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -3795,7 +3795,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -3868,7 +3868,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -3940,7 +3940,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -4010,7 +4010,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 1 ppp0 -c 192.172.0.1 -i 1 -u -f m -B 192.172.0.2 -b 10M -R False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec @@ -4081,7 +4081,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/iperf3_script 1 ppp0 -c 192.172.0.1 -i 1 -u -f m -B 192.172.0.2 -b 20M -R False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec @@ -4152,7 +4152,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec @@ -4228,7 +4228,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -4311,7 +4311,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -4392,7 +4392,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -4473,7 +4473,7 @@ c throughput_test min=10.0Mbits/sec max=10.5Mbits/sec average=11.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -4554,7 +4554,7 @@ c throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -4635,7 +4635,7 @@ c throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp BUILD/EPC/epc.conf.in MCC \"208\" @@ -4720,7 +4720,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -4796,7 +4796,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -4871,7 +4871,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -4944,7 +4944,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec @@ -5019,7 +5019,7 @@ c throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -5094,7 +5094,7 @@ c throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -5169,7 +5169,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -5245,7 +5245,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -5320,7 +5320,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -5393,7 +5393,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec @@ -5468,7 +5468,7 @@ c throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -5543,7 +5543,7 @@ c throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -5630,7 +5630,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -5716,7 +5716,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -5801,7 +5801,7 @@ c False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -5884,7 +5884,7 @@ c $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec @@ -5969,7 +5969,7 @@ c throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp @@ -6054,7 +6054,7 @@ c throughput_test min=10.0Mbits/sec max=10.0Mbits/sec average=10.0Mbits/sec False - sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue /tmp From af1f91827b6d99a1c0ceb73cfd6bd6f2cbbfa6ac Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Sat, 25 Jun 2016 23:12:40 +0200 Subject: [PATCH 52/57] minor fix for gitlab certificate issues --- cmake_targets/tools/build_helper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 673ed190f0..f6d0d2b0db 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -233,7 +233,7 @@ check_install_additional_tools (){ $SUDO pip install paramiko $SUDO pip install pyroute2 $SUDO rm -fr /opt/ssh - $SUDO git clone https://gist.github.com/2190472.git /opt/ssh + $SUDO GIT_SSL_NO_VERIFY=true git clone https://gist.github.com/2190472.git /opt/ssh log_netiface=$OPENAIR_DIR/cmake_targets/log/netiface_install_log.txt echo_info "Installing Netinterfaces package. The logfile for installation is in $log_netiface" From 3d78e5a34b32834803ccbaeeb5d78a07da9c1ad7 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 28 Jun 2016 12:50:58 +0200 Subject: [PATCH 53/57] add option --T_dont_fork to tracee (lte-softmodem, oaisim) The T has 2 processes: the tracee and the local tracer if the tracee dies (segfault or whatever) the tracee may still be running. So there is a third process that monitors those two others and kill everything when one dies. The problem is that this third process has to be the parent of the two others. That makes debugging the tracee with gdb impossible. This new option disables the third monitor process. --- common/utils/T/T.c | 14 ++++++++------ common/utils/T/T.h | 2 +- targets/RT/USER/lte-softmodem.c | 12 +++++++++++- targets/SIMU/USER/oaisim.c | 4 +++- targets/SIMU/USER/oaisim_functions.c | 8 ++++++++ 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/common/utils/T/T.c b/common/utils/T/T.c index b9e9b29326..5d84afa660 100644 --- a/common/utils/T/T.c +++ b/common/utils/T/T.c @@ -107,7 +107,7 @@ static void monitor_and_kill(int child1, int child2) exit(0); } -void T_init(int remote_port, int wait_for_tracer) +void T_init(int remote_port, int wait_for_tracer, int dont_fork) { int socket_pair[2]; int s; @@ -117,7 +117,7 @@ void T_init(int remote_port, int wait_for_tracer) if (socketpair(AF_UNIX, SOCK_STREAM, 0, socket_pair)) { perror("socketpair"); abort(); } - /* child1 runs the local tracer and child2 runs the tracee */ + /* child1 runs the local tracer and child2 (or main) runs the tracee */ child1 = fork(); if (child1 == -1) abort(); if (child1 == 0) { @@ -127,10 +127,12 @@ void T_init(int remote_port, int wait_for_tracer) } close(socket_pair[0]); - child2 = fork(); if (child2 == -1) abort(); - if (child2 != 0) { - close(socket_pair[1]); - monitor_and_kill(child1, child2); + if (dont_fork == 0) { + child2 = fork(); if (child2 == -1) abort(); + if (child2 != 0) { + close(socket_pair[1]); + monitor_and_kill(child1, child2); + } } s = socket_pair[1]; diff --git a/common/utils/T/T.h b/common/utils/T/T.h index a5aacb4b4f..819615131e 100644 --- a/common/utils/T/T.h +++ b/common/utils/T/T.h @@ -562,7 +562,7 @@ extern T_cache_t *T_cache; extern int *T_active; -void T_init(int remote_port, int wait_for_tracer); +void T_init(int remote_port, int wait_for_tracer, int dont_fork); #else /* T_TRACER */ diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index ca97ad0e22..3f419ed49c 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -490,6 +490,7 @@ void help (void) { #if T_TRACER printf(" --T_port [port] use given port\n"); printf(" --T_nowait don't wait for tracer, start immediately\n"); + printf(" --T_dont_fork to ease debugging with gdb\n"); #endif printf(RESET); fflush(stdout); @@ -2332,6 +2333,7 @@ static void get_options (int argc, char **argv) #if T_TRACER LONG_OPTION_T_PORT, LONG_OPTION_T_NOWAIT, + LONG_OPTION_T_DONT_FORK, #endif }; @@ -2355,6 +2357,7 @@ static void get_options (int argc, char **argv) #if T_TRACER {"T_port", required_argument, 0, LONG_OPTION_T_PORT}, {"T_nowait", no_argument, 0, LONG_OPTION_T_NOWAIT}, + {"T_dont_fork", no_argument, 0, LONG_OPTION_T_DONT_FORK}, #endif {NULL, 0, NULL, 0} @@ -2457,6 +2460,12 @@ static void get_options (int argc, char **argv) T_wait = 0; break; } + + case LONG_OPTION_T_DONT_FORK: { + extern int T_dont_fork; + T_dont_fork = 1; + break; + } #endif case 'A': @@ -2822,6 +2831,7 @@ static void get_options (int argc, char **argv) #if T_TRACER int T_wait = 1; /* by default we wait for the tracer */ int T_port = 2021; /* default port to listen to to wait for the tracer */ +int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */ #endif int main( int argc, char **argv ) @@ -2894,7 +2904,7 @@ int main( int argc, char **argv ) openair0_cfg[0].configFilename = rf_config_file; #if T_TRACER - T_init(T_port, T_wait); + T_init(T_port, T_wait, T_dont_fork); #endif // initialize the log (see log.h for details) diff --git a/targets/SIMU/USER/oaisim.c b/targets/SIMU/USER/oaisim.c index dfbf8f9676..744952b5d0 100644 --- a/targets/SIMU/USER/oaisim.c +++ b/targets/SIMU/USER/oaisim.c @@ -250,6 +250,7 @@ help (void) #if T_TRACER printf ("--T_port [port] use given port\n"); printf ("--T_nowait don't wait for tracer, start immediately\n"); + printf ("--T_dont_fork to ease debugging with gdb\n"); #endif } @@ -1258,6 +1259,7 @@ l2l1_task (void *args_p) #if T_TRACER int T_wait = 1; /* by default we wait for the tracer */ int T_port = 2021; /* default port to listen to to wait for the tracer */ +int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */ #endif /*------------------------------------------------------------------------------*/ @@ -1294,7 +1296,7 @@ main (int argc, char **argv) get_simulation_options (argc, argv); //Command-line options #if T_TRACER - T_init(T_port, T_wait); + T_init(T_port, T_wait, T_dont_fork); #endif // Initialize VCD LOG module diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c index f8043b2cfd..a5acb2616a 100644 --- a/targets/SIMU/USER/oaisim_functions.c +++ b/targets/SIMU/USER/oaisim_functions.c @@ -216,6 +216,7 @@ void get_simulation_options(int argc, char *argv[]) #if T_TRACER LONG_OPTION_T_PORT, LONG_OPTION_T_NOWAIT, + LONG_OPTION_T_DONT_FORK, #endif }; @@ -254,6 +255,7 @@ void get_simulation_options(int argc, char *argv[]) #if T_TRACER {"T_port", required_argument, 0, LONG_OPTION_T_PORT}, {"T_nowait", no_argument, 0, LONG_OPTION_T_NOWAIT}, + {"T_dont_fork", no_argument, 0, LONG_OPTION_T_DONT_FORK}, #endif {NULL, 0, NULL, 0} @@ -436,6 +438,12 @@ void get_simulation_options(int argc, char *argv[]) T_wait = 0; break; } + + case LONG_OPTION_T_DONT_FORK: { + extern int T_dont_fork; + T_dont_fork = 1; + break; + } #endif case 'a': From cadb672d10e2909eb1baf11a615d5144205bc176 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 28 Jun 2016 13:00:16 +0200 Subject: [PATCH 54/57] minor bugfix: forgot to update T_init in the example tracee --- common/utils/T/tracee/tracee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/utils/T/tracee/tracee.c b/common/utils/T/tracee/tracee.c index f7739f00f9..5f820ee42e 100644 --- a/common/utils/T/tracee/tracee.c +++ b/common/utils/T/tracee/tracee.c @@ -6,7 +6,7 @@ int main(void) { int frame = 0; - T_init(2021, 1); + T_init(2021, 1, 0); while (1) { getchar(); T(T_ENB_PHY_PUCCH_1AB_IQ, T_INT(0), T_INT(0), T_INT(frame), T_INT(0), T_INT(0), T_INT(0)); From 06ff2561b83c4a47b7ef9e248561c1a7e03e1656 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Thu, 30 Jun 2016 20:41:29 +0200 Subject: [PATCH 55/57] addition of LMSSDR test cases --- cmake_targets/autotests/README.txt | 4 +- cmake_targets/autotests/test_case_list.xml | 57 +++++++++++++++++++++- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt index 3ae18133c7..b04d24c51a 100644 --- a/cmake_targets/autotests/README.txt +++ b/cmake_targets/autotests/README.txt @@ -12,10 +12,12 @@ Obj.# Case# Test# Description 01 01 11 Build lte-softmodem_noS1.EXMIMO.Rel10 01 01 12 Build lte-softmodem_noS1.BLADERF.Rel10 01 01 13 Build lte-softmodem_noS1.ETHERNET.Rel10 +01 01 14 Build lte-softmodem_noS1.LMSSDR.Rel10 01 01 20 Build lte-softmodem.USRP.Rel10 01 01 21 Build lte-softmodem.EXMIMO.Rel10 01 01 22 Build lte-softmodem.BLADERF.Rel10 01 01 23 Build lte-softmodem.ETHERNET.Rel10 +01 01 24 Build lte-softmodem.LMSSDR.Rel10 01 01 30 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.Rel10 secu_knas_encrypt_eia1.Rel10 secu_kenb.Rel10 aes128_ctr_encrypt.Rel10 aes128_ctr_decrypt.Rel10 secu_knas_encrypt_eea2.Rel10 @@ -24,7 +26,7 @@ Obj.# Case# Test# Description 01 01 40 Build RRH Gateway for USRP (Rel 10) 01 01 41 Build RRH Gateway for EXMIMO (Rel 10) 01 01 42 Build RRH Gateway for BLADERF (Rel 10) - +01 01 43 Build RRH Gateway for LMSSDR (Rel 10) 01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 8c4024e073..d427a6b340 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -155,6 +155,25 @@ 1 + + compilation + Build lte_softmodem_noS1.LMSSDR.Rel10 + + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w LMSSDR -r Rel10 --noS1 -c + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/liboai_lmssdrdevif.so + $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash + + + + + + lte-softmodem_noS1.LMSSDR.Rel10 + 1 + @@ -231,6 +250,24 @@ 1 + + compilation + Build lte_softmodem.LMSSDR.Rel10 + + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w LMSSDR -r Rel10 -c + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/liboai_lmssdrdevif.so + $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash + + + + + + lte-softmodem.LMSSDR.Rel10 + 1 + + compilation Build phy unitary simulators + secuirity unitary tests @@ -308,7 +345,7 @@ compilation - Build RRH Gateway + Build RRH Gateway for BladeRF (RF) nad Ethernet (transport) $OPENAIR_DIR/cmake_targets/build_oai --RRH -w BLADERF -t ETHERNET -c @@ -325,6 +362,24 @@ 1 + + compilation + Build RRH Gateway for LMSSDR (RF) and Ethernet (transport) + + $OPENAIR_DIR/cmake_targets/build_oai + --RRH -w LMSSDR -t ETHERNET -c + $OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw + $OPENAIR_DIR/cmake_targets/rrh_gw/build/liboai_lmssdrdevif.so + $OPENAIR_DIR/cmake_targets/rrh_gw/build/liboai_eth_transpro.so + $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash + + + + + + RRH.LMSSDR.Rel10 + 1 + execution From 99db0df36fcec5d315bd3f7322c2415abfe79efd Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Fri, 1 Jul 2016 11:51:31 +0200 Subject: [PATCH 56/57] minor fix for build logging --- cmake_targets/tools/build_helper | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index a0697cd547..ac8d9f34c1 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -147,7 +147,6 @@ clean_all_files() { compilations() { cd $OPENAIR_DIR/cmake_targets/$1/build - echo_info "Log file for compilation written in: $dlog/$2.$REL.txt" set +e { rm -f $3 From 633526331ab746e28c0c2879f9c0a9546f878ad2 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 5 Jul 2016 14:25:41 +0200 Subject: [PATCH 57/57] hotfix: force 32-bytes alignment for avx2 code to be happy --- openair1/PHY/MODULATION/slot_fep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/MODULATION/slot_fep.c b/openair1/PHY/MODULATION/slot_fep.c index 6a63043e9c..61c83e5b89 100644 --- a/openair1/PHY/MODULATION/slot_fep.c +++ b/openair1/PHY/MODULATION/slot_fep.c @@ -55,7 +55,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, unsigned int rx_offset; void (*dft)(int16_t *,int16_t *, int); - int tmp_dft_in[2048]; // This is for misalignment issues for 6 and 15 PRBs + int tmp_dft_in[2048] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs switch (frame_parms->ofdm_symbol_size) { case 128: