This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, monarch_lts has been updated via c24c425cf4842125f8702fa7624563417bb41e40 (commit) via b5dca2f1b0fff412fc56ba8bafba25507dcf1d64 (commit) via 4e8595151c075074744b8a1ad689a052df18c27e (commit) via e48559aa65e369d25f8f1c5e63a98939e881f367 (commit) via 8bda226cc547acb81e3c17f09348c6ff4a6f4356 (commit) via d3a984a9e86177215246d0925b4a86f9ade9d22a (commit) via 53b23b8e017db60c3635ac68b3894081448ea132 (commit) via f3bc64fcadb9b8dbe034507be81f0f06feb335ab (commit) via 461780c9df581b952d837ca72717f516d99da963 (commit) from 0c15c40db40834f1df217191c4b6a06303ab0872 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit c24c425cf4842125f8702fa7624563417bb41e40 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Wed Jul 12 17:53:24 2017 +0300
travis: port travis checks from master
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..6a845e97 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,226 @@ +# Copyright (c) 2016, Linaro Limited +# All rights reserved. +# SPDX-License-Identifier: BSD-3-Clause +# +# Please update xxxx for your coverity token and notification email if required +# pushing to github/master will run make check +# pushing to github/coverity_scan will also launch a static analysis +# See https://scan.coverity.com/travis_ci + +language: c +sudo: required +dist: trusty +group: deprecated-2017Q2 +env: + global: + # COVERITY_SCAN_TOKEN + # ** specific to your project ** + # Note: + # You should have a github account and travis linked travis account. + # The secure key to be filled below is the 685 character long encrypted + # token you can find as follow from your coverity dashboard + # (at https://scan.coverity.com/dashboard): + # Click on the github project (<you>/odp) + # Click on "submit build" + # Click on "Configure Travis CI" + # Look at the COVERITY_SCAN_TOKEN in the env: global: section + # of the configuration example. + # copy the secure:<key> below + # + - secure: "xxxx" + # + # By default Linaro CODECOV_TOKEN token is used. It's ok to use it to see + # for individual commit validation. But you you want to track tests history + # you need generated new one at https://codecov.io specific for your repo. + - CODECOV_TOKEN=8e1c0fd8-62ff-411e-a79f-5839f6662c11 + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc + - clang-3.8 + - automake autoconf libtool libssl-dev graphviz mscgen doxygen + - libpcap-dev + - dpkg-cross equivs + - gcc-aarch64-linux-gnu pkg-config-aarch64-linux-gnu libc6-dev-arm64-cross + - gcc-arm-linux-gnueabihf pkg-config-arm-linux-gnueabihf libc6-dev-armhf-cross + - gcc-powerpc-linux-gnu pkg-config-powerpc-linux-gnu libc6-dev-powerpc-cross +# coverity_scan: +# project: +# name: "$TRAVIS_REPO_SLUG" +# notification_email: xxxx +# build_command_prepend: "./bootstrap && ./configure --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example" +# build_command: "make" +# branch_pattern: coverity_scan + +compiler: + - gcc + - clang-3.8 + +env: + - CONF="" + - CONF="--enable-schedule-sp" + +before_install: +# Install cunit for the validation tests because distro version is too old and fails C99 compile + - sudo apt-get remove libcunit1-dev libcunit1 + - export CUNIT_VERSION=2.1-3 + - curl -sSOL https://github.com/Linaro/libcunit/releases/download/%24%7BCUNIT_VERSION%7D/... + - tar -jxf *.bz2 + - pushd CUnit* + - libtoolize --force --copy + - aclocal + - autoheader + - automake --add-missing --include-deps --copy + - autoconf + - ./configure --enable-debug --enable-automated --enable-basic --enable-console --enable-examples --enable-test $CROSS || cat config.log + - make + - sudo make install + - popd + - export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" + +install: + - echo 1000 | sudo tee /proc/sys/vm/nr_hugepages + - sudo mkdir -p /mnt/huge + - sudo mount -t hugetlbfs nodev /mnt/huge + + - sudo apt-get -qq update + - sudo apt-get install linux-headers-`uname -r` + - gem install asciidoctor + - PATH=${PATH//:./node_modules/.bin/} + +# DPDK pktio + - TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"} + - git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v16.04 http://dpdk.org/git/dpdk dpdk + - pushd dpdk + - git log --oneline --decorate + - make config T=${TARGET} O=${TARGET} + - pushd ${TARGET} + - sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config + - popd + - make install T=${TARGET} EXTRA_CFLAGS="-fPIC" + - popd + +# Netmap pktio + - git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v11.2 https://github.com/luigirizzo/netmap.git + - pushd netmap/LINUX + - ./configure + - make + - sudo insmod ./netmap.ko + - popd + +script: + - ./bootstrap + - ./configure --prefix=$HOME/odp-install --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example --with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap $CONF + - make -j $(nproc) + - make install + - echo "Checking linking and run from install..." + - pushd $HOME + - echo "Dynamic link.." + - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst -I${HOME}/odp-install/include -L${HOME}/odp-install/lib -lodp-linux -L${OLDPWD}/dpdk/x86_64-native-linuxapp-gcc/lib -lrt -ldpdk -lpthread -lcrypto -lpcap -ldl + - LD_LIBRARY_PATH="${HOME}/odp-install/lib:$LD_LIBRARY_PATH" ./odp_hello_inst + - echo "Static link.." + - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst -I${HOME}/odp-install/include -L${HOME}/odp-install/lib -lodp-linux -L${OLDPWD}/dpdk/x86_64-native-linuxapp-gcc/lib -lrt -ldpdk -lpthread -lcrypto -lpcap -ldl -static + - ./odp_hello_inst + - popd + - sudo git clean -f -d -x + - ./bootstrap + - ./configure --prefix=$HOME/odp-install --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example $CONF + - make -j $(nproc) + - sudo LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make check + +jobs: + include: + - stage: test + compiler: aarch64-linux-gnu-gcc + env: TEST="aarch64-linux-gnu" CROSS="--host=aarch64-linux-gnu --prefix=/usr/aarch64-linux-gnu" + install: true + script: + - mkdir cross + - pushd cross + # one can not include colon in the command or bad things will happen, so mimic it + - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy + - equivs-build -a arm64 dummy + - wget + http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.22_ar... + http://ports.ubuntu.com/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.22_a... + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_arm6... + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g_1.2.8.dfsg-1ubuntu1_arm64.de... + - sudo dpkg-cross -i -M -A -a arm64 *.deb + - popd + - ./bootstrap + - ./configure --prefix=$HOME/odp-install $CROSS + --disable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-test-perf-proc --enable-test-example + - make -j $(nproc) + - stage: test + compiler: arm-linux-gnueabihf-gcc + env: TEST="arm-linux-gnueabihf" CROSS="--host=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabihf" + install: true + script: + - mkdir cross + - pushd cross + # one can not include colon in the command or bad things will happen, so mimic it + - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy + - equivs-build -a armhf dummy + - wget + http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.22_ar... + http://ports.ubuntu.com/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.22_a... + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_armh... + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g_1.2.8.dfsg-1ubuntu1_armhf.de... + - sudo dpkg-cross -i -M -A -a armhf *.deb + - popd + - ./bootstrap + - ./configure --prefix=$HOME/odp-install $CROSS + --disable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-test-perf-proc --enable-test-example + - make -j $(nproc) + - stage: test + compiler: powerpc-linux-gnu-gcc + env: TEST="powerpc-linux-gnu" CROSS="--host=powerpc-linux-gnu --prefix=/usr/powerpc-linux-gnu" + install: true + script: + - mkdir cross + - pushd cross + # one can not include colon in the command or bad things will happen, so mimic it + - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy + - equivs-build -a powerpc dummy + - wget + http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.22_po... + http://ports.ubuntu.com/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.22_p... + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_powe... + http://ports.ubuntu.com/pool/main/z/zlib/zlib1g_1.2.8.dfsg-1ubuntu1_powerpc.... + - sudo dpkg-cross -i -M -A -a powerpc *.deb + - popd + - ./bootstrap + - ./configure --prefix=$HOME/odp-install $CROSS + --disable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-test-perf-proc --enable-test-example + - make -j $(nproc) + - stage: test + env: TEST=distcheck + compiler: gcc + script: + - ./bootstrap + - ./configure --prefix=$HOME/odp-install --enable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-user-guides --enable-test-perf-proc --enable-test-example + - sudo PATH="$PATH" LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" make distcheck + - stage: test + env: TEST=doxygen + compiler: gcc + script: + # doxygen does not trap on warnings, check for them here. + - ./bootstrap + - ./configure + - make doxygen-doc |tee doxygen.log + - fgrep -rvq warning ./doxygen.log + - stage: test + env: TEST=checkpatch + compiler: gcc + script: + - echo ${TRAVIS_COMMIT_RANGE}; + - ODP_PATCHES=`echo ${TRAVIS_COMMIT_RANGE} | sed 's/.//'`; + - if [ -z "${ODP_PATCHES}" ]; then env; exit 1; fi; + - ./scripts/ci-checkpatches.sh ${ODP_PATCHES}; + +after_failure: + - cat config.log + - find . -name 'test-suite.log' -execdir grep -il "FAILED" {} ; -exec echo {} ; -exec cat {} ; diff --git a/scripts/ci-checkpatches.sh b/scripts/ci-checkpatches.sh new file mode 100755 index 00000000..cb1c4e65 --- /dev/null +++ b/scripts/ci-checkpatches.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +PATCHES=$1 +echo "Run checkpatch for ${PATCHES}" +# Generate patches provided with $1. +# In case of force push and range is broken +# validate only the latest commit if it's not merge commit. +git format-patch ${PATCHES} +if [ $? -ne 0 ]; then + git show --summary HEAD| grep -q '^Merge:'; + if [ $? -ne 0 ]; then + git format-patch HEAD^; + perl ./scripts/checkpatch.pl *.patch; + fi; +else + perl ./scripts/checkpatch.pl *.patch; +fi
commit b5dca2f1b0fff412fc56ba8bafba25507dcf1d64 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Fri Oct 14 14:51:25 2016 +0300
test: skip pktio_perf tests on 1 and 2 cpus machines
Make check should skip the test instead of failing it. Test splits RX and TX cores for packet processing. Core 0 bind to control thread. So running machine should have at least 2 worker threads which is not enough on 1 and 2 cpus machine. CUnit uses special value 77 to mark test as SKIPPED and not fail on it.
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Mike Holmes mike.holmes@linaro.org
diff --git a/test/performance/odp_pktio_perf.c b/test/performance/odp_pktio_perf.c index 18a1aa2a..988f298b 100644 --- a/test/performance/odp_pktio_perf.c +++ b/test/performance/odp_pktio_perf.c @@ -34,6 +34,8 @@ #include <inttypes.h> #include <test_debug.h>
+#define TEST_SKIP 77 + #define PKT_BUF_NUM 8192 #define MAX_NUM_IFACES 2 #define TEST_HDR_MAGIC 0x92749451 @@ -558,7 +560,7 @@ static int setup_txrx_masks(odp_cpumask_t *thd_mask_tx, gbl_args->args.cpu_count); if (num_workers < 2) { LOG_ERR("Need at least two cores\n"); - return -1; + return TEST_SKIP; }
if (gbl_args->args.num_tx_workers) { @@ -659,7 +661,7 @@ static int run_test_single(odp_cpumask_t *thd_mask_tx,
static int run_test(void) { - int ret = 1; + int ret; int i; odp_cpumask_t txmask, rxmask; test_status_t status = { @@ -669,8 +671,9 @@ static int run_test(void) .warmup = 1, };
- if (setup_txrx_masks(&txmask, &rxmask) != 0) - return -1; + ret = setup_txrx_masks(&txmask, &rxmask); + if (ret) + return ret;
printf("Starting test with params:\n"); printf("\tTransmit workers: \t%d\n", odp_cpumask_count(&txmask)); @@ -691,8 +694,11 @@ static int run_test(void) run_test_single(&txmask, &rxmask, &status); status.warmup = 0;
- while (ret > 0) + while (1) { ret = run_test_single(&txmask, &rxmask, &status); + if (ret <= 0) + break; + }
return ret; }
commit 4e8595151c075074744b8a1ad689a052df18c27e Author: Brian Brooks brian.brooks@arm.com Date: Tue Jun 27 15:35:58 2017 -0500
build: fix 64-bit atomics detection
Use uint64_t instead of int type.
This resolves ipfragreass build breakage with clang on 32-bit systems.
Signed-off-by: Brian Brooks brian.brooks@arm.com Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index efa29e5e..5d6f4482 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -34,10 +34,11 @@ use_libatomic=no AC_MSG_CHECKING(whether -latomic is needed for 64-bit atomic built-ins) AC_LINK_IFELSE( [AC_LANG_SOURCE([[ - static int loc; + #include <stdint.h> + static uint64_t loc; int main(void) { - int prev = __atomic_exchange_n(&loc, 7, __ATOMIC_RELAXED); + uint64_t prev = __atomic_exchange_n(&loc, 7, __ATOMIC_RELAXED); return 0; } ]])],
commit e48559aa65e369d25f8f1c5e63a98939e881f367 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Thu Jun 15 18:56:06 2017 +0300
configure.ac: do not trap if libatomic is not found
Idea if check was to detect if libatomic is needed or not, not trap configure on not case Fixes Linaro CI compilation for: gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabih
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 98885f5f..efa29e5e 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -65,7 +65,7 @@ AC_LINK_IFELSE( AC_CHECK_LIB( [atomic], [__atomic_exchange_16], [use_libatomic=yes], - [AC_MSG_FAILURE([cannot detect support for 128-bit atomics])]) + [AC_MSG_CHECKING([cannot detect support for 128-bit atomics])]) ])
if test "x$use_libatomic" = "xyes"; then
commit 8bda226cc547acb81e3c17f09348c6ff4a6f4356 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Mon Jun 26 18:00:16 2017 +0300
configure: remove dependency of autoconf-archive
autoconf-archive is not available on some build environment Number of projects simple have local copy of this file. Do the same thing.
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org
diff --git a/DEPENDENCIES b/DEPENDENCIES index e344826e..a5266c9e 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -8,14 +8,13 @@ Prerequisites for building the OpenDataPlane (ODP) API
automake autoconf - autoconf-archive libtool
On Debian/Ubuntu systems: - $ sudo apt-get install automake autoconf autoconf-archive libtool + $ sudo apt-get install automake autoconf libtool
On CentOS/RedHat/Fedora systems: - $ sudo yum install automake autoconf autoconf-archive libtool + $ sudo yum install automake autoconf libtool
3. Required libraries
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 new file mode 100644 index 00000000..c3a8d695 --- /dev/null +++ b/m4/ax_check_compile_flag.m4 @@ -0,0 +1,72 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim guidod@gmx.de +# Copyright (c) 2011 Maarten Bosmans mkbosmans@gmail.com +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see http://www.gnu.org/licenses/. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 2 + +AC_DEFUN([AX_CHECK_COMPILE_FLAG], +[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) +AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS
commit d3a984a9e86177215246d0925b4a86f9ade9d22a Author: Mike Holmes mike.holmes@linaro.org Date: Fri Oct 21 14:40:17 2016 -0400
configure: the version cannot use a script
Use of a script in the autotools breaks github CI Define the API version in configure and reuse it in the code
Benefits: removes dependence on scripts to build removes scripts and the make file from odp/scripts removes generated .scmversion file places api versioning right next to lib versioning in the configure.ac allows github to auto build odp repos
Signed-off-by: Mike Holmes mike.holmes@linaro.org Reviewed-by: Brian Brooks brian.brooks@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/.gitignore b/.gitignore index d4e7d02e..fbc0eab9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ .deps/ .dirstamp .libs/ -.scmversion CUnit-Memory-Dump.xml ID Makefile diff --git a/.scmversion b/.scmversion new file mode 100644 index 00000000..dc7bf3df --- /dev/null +++ b/.scmversion @@ -0,0 +1 @@ +1.11.0.1_monarch.git10.g7106d8b0 \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index 625748af..2a9a658d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,9 +11,8 @@ SUBDIRS = @platform_with_platform@ \ test \ helper/test \ doc \ - example \ - scripts + example
@DX_RULES@
-EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion +EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README diff --git a/configure.ac b/configure.ac index 08cc375d..efb9f7ed 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,23 @@ AC_PREREQ([2.5]) -AC_INIT([OpenDataPlane], m4_esyscmd_s(./scripts/git_hash.sh .), [lng-odp@lists.linaro.org]) +########################################################################## +# Set correct API version +########################################################################## +m4_define([odpapi_generation_version], [1]) +m4_define([odpapi_major_version], [11]) +m4_define([odpapi_minor_version], [0]) +m4_define([odpapi_point_version], [1]) +m4_define([odpapi_version], + [odpapi_generation_version.odpapi_major_version.odpapi_minor_version.odpapi_point_version]) +AC_INIT([OpenDataPlane],[odpapi_version],[lng-odp@lists.linaro.org]) + +ODP_VERSION_API_GENERATION=odpapi_generation_version +AC_SUBST(ODP_VERSION_API_GENERATION) +ODP_VERSION_API_MAJOR=odpapi_major_version +AC_SUBST(ODP_VERSION_API_MAJOR) +ODP_VERSION_API_MINOR=odpapi_minor_version +AC_SUBST(ODP_VERSION_API_MINOR) +AC_CONFIG_FILES([include/odp/api/spec/version.h]) + AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects]) AC_CONFIG_SRCDIR([helper/config.h.in]) AM_CONFIG_HEADER([helper/config.h]) @@ -267,7 +285,6 @@ AC_CONFIG_FILES([Makefile helper/test/Makefile pkgconfig/libodp-linux.pc pkgconfig/libodphelper-linux.pc - scripts/Makefile ])
AC_SEARCH_LIBS([timer_create],[rt posix4]) diff --git a/include/odp/api/spec/.gitignore b/include/odp/api/spec/.gitignore new file mode 100644 index 00000000..67020331 --- /dev/null +++ b/include/odp/api/spec/.gitignore @@ -0,0 +1 @@ +version.h diff --git a/include/odp/api/spec/version.h b/include/odp/api/spec/version.h.in similarity index 93% rename from include/odp/api/spec/version.h rename to include/odp/api/spec/version.h.in index 1ddb9cea..4b16dcc5 100644 --- a/include/odp/api/spec/version.h +++ b/include/odp/api/spec/version.h.in @@ -37,7 +37,7 @@ extern "C" { * very significant changes to the API. APIs with different * versions are likely not backward compatible. */ -#define ODP_VERSION_API_GENERATION 1 +#define ODP_VERSION_API_GENERATION @ODP_VERSION_API_GENERATION@
/** * ODP API major version @@ -45,7 +45,7 @@ extern "C" { * Introduction of major new features or changes. APIs with different major * versions are likely not backward compatible. */ -#define ODP_VERSION_API_MAJOR 11 +#define ODP_VERSION_API_MAJOR @ODP_VERSION_API_MAJOR@
/** * ODP API minor version @@ -54,7 +54,7 @@ extern "C" { * to the API. For an API with common generation and major version, but with * different minor numbers the two versions are backward compatible. */ -#define ODP_VERSION_API_MINOR 0 +#define ODP_VERSION_API_MINOR @ODP_VERSION_API_MINOR@
/** * ODP API version string diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 053bd121..4a0e68b7 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -10,8 +10,7 @@ lib_LTLIBRARIES = $(LIB)/libodp-linux.la
AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
-GIT_DESC = `$(top_srcdir)/scripts/get_impl_str.sh $(top_srcdir)` -AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)" +AM_CFLAGS += "-DGIT_HASH=$(VERSION)" AM_CFLAGS += $(VISIBILITY_CFLAGS)
#The implementation will need to retain the deprecated implementation diff --git a/scripts/Makefile.am b/scripts/Makefile.am deleted file mode 100644 index 189b3efc..00000000 --- a/scripts/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = get_impl_str.sh git_hash.sh diff --git a/scripts/get_impl_str.sh b/scripts/get_impl_str.sh deleted file mode 100755 index d765a531..00000000 --- a/scripts/get_impl_str.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ -z ${1} ]; then - echo "should be called with a path" - exit -fi -ROOTDIR=${1} - -CUSTOM_STR=${CUSTOM_STR:-https://git.linaro.org/lng/odp.git%7D - -echo -n "'${CUSTOM_STR}' ($(cat ${ROOTDIR}/.scmversion))"
commit 53b23b8e017db60c3635ac68b3894081448ea132 Author: Brian Brooks brian.brooks@arm.com Date: Tue Jul 11 16:18:12 2017 -0500
pktio: GCC 7 fixes
The GCC 7 series introduces changes that expose ODP compilation issues. These include case statement fall through warnings, and stricter checks on potential string overflows and other semantic analysis.
Fixes: https://bugs.linaro.org/show_bug.cgi?id=3027
Signed-off-by: Brian Brooks brian.brooks@arm.com Signed-off-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index 4e93e9b4..1b73697a 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -1410,7 +1410,9 @@ int pktio_check_statistics_counters(void) void pktio_test_statistics_counters(void) { odp_pktio_t pktio_rx, pktio_tx; - odp_pktio_t pktio[MAX_NUM_IFACES]; + odp_pktio_t pktio[MAX_NUM_IFACES] = { + ODP_PKTIO_INVALID, ODP_PKTIO_INVALID + }; odp_packet_t pkt; odp_packet_t tx_pkt[1000]; uint32_t pkt_seq[1000];
commit f3bc64fcadb9b8dbe034507be81f0f06feb335ab Author: Brian Brooks brian.brooks@arm.com Date: Tue Jul 11 16:18:11 2017 -0500
build: GCC 7 fixes
The GCC 7 series introduces changes that expose ODP compilation issues. These include case statement fall through warnings, and stricter checks on potential string overflows and other semantic analysis.
Fixes: https://bugs.linaro.org/show_bug.cgi?id=3027
Signed-off-by: Brian Brooks brian.brooks@arm.com Reviewed-by: Ola Liljedahl ola.liljedahl@arm.com Reviewed-by: Honnappa Nagarahalli honnappa.nagarahalli@arm.com Signed-off-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/DEPENDENCIES b/DEPENDENCIES index a5266c9e..e344826e 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -8,13 +8,14 @@ Prerequisites for building the OpenDataPlane (ODP) API
automake autoconf + autoconf-archive libtool
On Debian/Ubuntu systems: - $ sudo apt-get install automake autoconf libtool + $ sudo apt-get install automake autoconf autoconf-archive libtool
On CentOS/RedHat/Fedora systems: - $ sudo yum install automake autoconf libtool + $ sudo yum install automake autoconf autoconf-archive libtool
3. Required libraries
diff --git a/configure.ac b/configure.ac index 5c7ddd04..08cc375d 100644 --- a/configure.ac +++ b/configure.ac @@ -224,6 +224,19 @@ ODP_CFLAGS="$ODP_CFLAGS -Wmissing-declarations -Wold-style-definition -Wpointer- ODP_CFLAGS="$ODP_CFLAGS -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral" ODP_CFLAGS="$ODP_CFLAGS -Wformat-security -Wundef -Wwrite-strings" ODP_CFLAGS="$ODP_CFLAGS -std=c99" + +dnl Use -Werror in the checks below since Clang emits a warning instead of +dnl an error when it encounters an unknown warning option. +AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough=0], + [ODP_CFLAGS="$ODP_CFLAGS -Wimplicit-fallthrough=0"], + [], [-Werror]) +AX_CHECK_COMPILE_FLAG([-Wformat-truncation=0], + [ODP_CFLAGS="$ODP_CFLAGS -Wformat-truncation=0"], + [], [-Werror]) +AX_CHECK_COMPILE_FLAG([-Wformat-overflow=0], + [ODP_CFLAGS="$ODP_CFLAGS -Wformat-overflow=0"], + [], [-Werror]) + # Extra flags for example to suppress certain warning types ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA"
diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 1b1b883d..98885f5f 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -28,6 +28,50 @@ AC_LINK_IFELSE( echo "Use newer version. For gcc > 4.7.0" exit -1)
+dnl Check whether -latomic is needed +use_libatomic=no + +AC_MSG_CHECKING(whether -latomic is needed for 64-bit atomic built-ins) +AC_LINK_IFELSE( + [AC_LANG_SOURCE([[ + static int loc; + int main(void) + { + int prev = __atomic_exchange_n(&loc, 7, __ATOMIC_RELAXED); + return 0; + } + ]])], + [AC_MSG_RESULT(no)], + [AC_MSG_RESULT(yes) + AC_CHECK_LIB( + [atomic], [__atomic_exchange_8], + [use_libatomic=yes], + [AC_MSG_FAILURE([__atomic_exchange_8 is not available])]) + ]) + +AC_MSG_CHECKING(whether -latomic is needed for 128-bit atomic built-ins) +AC_LINK_IFELSE( + [AC_LANG_SOURCE([[ + static __int128 loc; + int main(void) + { + __int128 prev; + prev = __atomic_exchange_n(&loc, 7, __ATOMIC_RELAXED); + return 0; + } + ]])], + [AC_MSG_RESULT(no)], + [AC_MSG_RESULT(yes) + AC_CHECK_LIB( + [atomic], [__atomic_exchange_16], + [use_libatomic=yes], + [AC_MSG_FAILURE([cannot detect support for 128-bit atomics])]) + ]) + +if test "x$use_libatomic" = "xyes"; then + AM_LDFLAGS="$AM_LDFLAGS -latomic" +fi + m4_include([platform/linux-generic/m4/odp_pthread.m4]) m4_include([platform/linux-generic/m4/odp_openssl.m4]) m4_include([platform/linux-generic/m4/odp_pcap.m4])
commit 461780c9df581b952d837ca72717f516d99da963 Author: Bill Fischofer bill.fischofer@linaro.org Date: Tue Jul 11 16:48:33 2017 -0500
bug: linux-generic: add syntax to allow newer clang to compile odp
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2942 by adding casts needed to avoid compilation failures when using clang 4.0.0 included in Ubuntu 17.04, which is stricter than clang 3.8.1 which is in Ubuntu 16.10.
Signed-off-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/helper/chksum.c b/helper/chksum.c index 8f188814..772abcd2 100644 --- a/helper/chksum.c +++ b/helper/chksum.c @@ -122,7 +122,7 @@ static inline int odph_process_l4_hdr(odp_packet_t odp_pkt, * should come from the udp header, unlike for TCP where is * derived. */ l4_len = odp_be_to_cpu_16(udp_hdr_ptr->length); - pkt_chksum_ptr = &udp_hdr_ptr->chksum; + pkt_chksum_ptr = (uint16_t *)(void *)&udp_hdr_ptr->chksum; pkt_chksum_offset = l4_offset + offsetof(odph_udphdr_t, chksum); } else if (odp_packet_has_tcp(odp_pkt)) { tcp_hdr_ptr = (odph_tcphdr_t *)l4_ptr; @@ -133,7 +133,7 @@ static inline int odph_process_l4_hdr(odp_packet_t odp_pkt, tcp_hdr_ptr = &tcp_hdr; }
- pkt_chksum_ptr = &tcp_hdr_ptr->cksm; + pkt_chksum_ptr = (uint16_t *)(void *)&tcp_hdr_ptr->cksm; pkt_chksum_offset = l4_offset + offsetof(odph_tcphdr_t, cksm); is_tcp = true; } else { @@ -197,7 +197,7 @@ static inline int odph_process_l3_hdr(odp_packet_t odp_pkt, ipv4_hdr_ptr = &ipv4_hdr; }
- addrs_ptr = (uint16_t *)&ipv4_hdr_ptr->src_addr; + addrs_ptr = (uint16_t *)(void *)&ipv4_hdr_ptr->src_addr; addrs_len = 2 * ODPH_IPV4ADDR_LEN; protocol = ipv4_hdr_ptr->proto; l3_len = odp_be_to_cpu_16(ipv4_hdr_ptr->tot_len); diff --git a/platform/linux-generic/odp_packet_flags.c b/platform/linux-generic/odp_packet_flags.c index b88324c1..fc0bc1d2 100644 --- a/platform/linux-generic/odp_packet_flags.c +++ b/platform/linux-generic/odp_packet_flags.c @@ -18,7 +18,7 @@ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); \ if (packet_parse_not_complete(pkt_hdr)) \ packet_parse_full(pkt_hdr); \ - pkt_hdr->p.x = v & 1; \ + pkt_hdr->p.x = (v) & 1; \ } while (0)
int odp_packet_has_error(odp_packet_t pkt)
-----------------------------------------------------------------------
Summary of changes: .gitignore | 1 - .scmversion | 1 + .travis.yml | 226 +++++++++++++++++++++++ Makefile.am | 5 +- configure.ac | 34 +++- helper/chksum.c | 6 +- include/odp/api/spec/.gitignore | 1 + include/odp/api/spec/{version.h => version.h.in} | 6 +- m4/ax_check_compile_flag.m4 | 72 ++++++++ platform/Makefile.inc | 3 +- platform/linux-generic/m4/configure.m4 | 45 +++++ platform/linux-generic/odp_packet_flags.c | 2 +- scripts/Makefile.am | 1 - scripts/ci-checkpatches.sh | 17 ++ scripts/get_impl_str.sh | 11 -- test/performance/odp_pktio_perf.c | 16 +- test/validation/pktio/pktio.c | 4 +- 17 files changed, 418 insertions(+), 33 deletions(-) create mode 100644 .scmversion create mode 100644 .travis.yml create mode 100644 include/odp/api/spec/.gitignore rename include/odp/api/spec/{version.h => version.h.in} (93%) create mode 100644 m4/ax_check_compile_flag.m4 delete mode 100644 scripts/Makefile.am create mode 100755 scripts/ci-checkpatches.sh delete mode 100755 scripts/get_impl_str.sh
hooks/post-receive