summaryrefslogtreecommitdiff
path: root/.ci
diff options
context:
space:
mode:
authorIan Stokes <ian.stokes@intel.com>2020-12-15 16:41:28 +0000
committerIan Stokes <ian.stokes@intel.com>2020-12-16 17:44:06 +0000
commit252e1e5764439085e32f07695b45848a079ba4df (patch)
treefbc93b6e95c4b27ee00c6168dcf59220b49fb64a /.ci
parentaf06184705072804a4c1374f9c824c9e4c241c26 (diff)
downloadopenvswitch-252e1e5764439085e32f07695b45848a079ba4df.tar.gz
dpdk: Update to use DPDK v20.11.
This commit adds support for DPDK v20.11, it includes the following changes. 1. travis: Remove explicit DPDK kmods configuration. 2. sparse: Fix build with 20.05 DPDK tracepoints. 3. netdev-dpdk: Remove experimental API flag. http://patchwork.ozlabs.org/project/openvswitch/list/?series=173216&state=* 4. sparse: Update to DPDK 20.05 trace point header. http://patchwork.ozlabs.org/project/openvswitch/list/?series=179604&state=* 5. sparse: Fix build with DPDK 20.08. http://patchwork.ozlabs.org/project/openvswitch/list/?series=200181&state=* 6. build: Add support for DPDK meson build. http://patchwork.ozlabs.org/project/openvswitch/list/?series=199138&state=* 7. netdev-dpdk: Remove usage of RTE_ETH_DEV_CLOSE_REMOVE flag. http://patchwork.ozlabs.org/project/openvswitch/list/?series=207850&state=* 8. netdev-dpdk: Fix build with 20.11-rc1. http://patchwork.ozlabs.org/project/openvswitch/list/?series=209006&state=* 9. sparse: Fix __ATOMIC_* redefinition errors http://patchwork.ozlabs.org/project/openvswitch/list/?series=209452&state=* 10. build: Remove DPDK make build references. http://patchwork.ozlabs.org/project/openvswitch/list/?series=216682&state=* For credit all authors of the original commits to 'dpdk-latest' with the above changes have been added as co-authors for this commit. Signed-off-by: David Marchand <david.marchand@redhat.com> Co-authored-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Sunil Pai G <sunil.pai.g@intel.com> Co-authored-by: Sunil Pai G <sunil.pai.g@intel.com> Signed-off-by: Eli Britstein <elibr@nvidia.com> Co-authored-by: Eli Britstein <elibr@nvidia.com> Tested-by: Harry van Haaren <harry.van.haaren@intel.com> Tested-by: Govindharajan, Hariprasad <hariprasad.govindharajan@intel.com> Tested-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Acked-by: Ilya Maximets <i.maximets@ovn.org> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to '.ci')
-rwxr-xr-x.ci/linux-build.sh48
-rwxr-xr-x.ci/linux-prepare.sh1
2 files changed, 32 insertions, 17 deletions
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 16102ac94..3e5136fd4 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -87,17 +87,29 @@ function install_dpdk()
{
local DPDK_VER=$1
local VERSION_FILE="dpdk-dir/travis-dpdk-cache-version"
+ local DPDK_OPTS=""
+ local DPDK_LIB=""
if [ -z "$TRAVIS_ARCH" ] ||
[ "$TRAVIS_ARCH" == "amd64" ]; then
- TARGET="x86_64-native-linuxapp-gcc"
+ DPDK_LIB=$(pwd)/dpdk-dir/build/lib/x86_64-linux-gnu
elif [ "$TRAVIS_ARCH" == "aarch64" ]; then
- TARGET="arm64-armv8a-linuxapp-gcc"
+ DPDK_LIB=$(pwd)/dpdk-dir/build/lib/aarch64-linux-gnu
else
echo "Target is unknown"
exit 1
fi
+ if [ "$DPDK_SHARED" ]; then
+ EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=shared"
+ export LD_LIBRARY_PATH=$DPDK_LIB/:$LD_LIBRARY_PATH
+ else
+ EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=static"
+ fi
+
+ # Export the following path for pkg-config to find the .pc file.
+ export PKG_CONFIG_PATH=$DPDK_LIB/pkgconfig/:$PKG_CONFIG_PATH
+
if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then
# Avoid using cache for git tree build.
rm -rf dpdk-dir
@@ -110,7 +122,8 @@ function install_dpdk()
if [ -f "${VERSION_FILE}" ]; then
VER=$(cat ${VERSION_FILE})
if [ "${VER}" = "${DPDK_VER}" ]; then
- EXTRA_OPTS="${EXTRA_OPTS} --with-dpdk=$(pwd)/dpdk-dir/build"
+ # Update the library paths.
+ sudo ldconfig
echo "Found cached DPDK ${VER} build in $(pwd)/dpdk-dir"
return
fi
@@ -124,23 +137,24 @@ function install_dpdk()
pushd dpdk-dir
fi
- make config CC=gcc T=$TARGET
+ # Switching to 'default' machine to make dpdk-dir cache usable on
+ # different CPUs. We can't be sure that all CI machines are exactly same.
+ DPDK_OPTS="$DPDK_OPTS -Dmachine=default"
- if [ "$DPDK_SHARED" ]; then
- sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' build/.config
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$TARGET/lib
- fi
+ # Disable building DPDK unit tests. Not needed for OVS build or tests.
+ DPDK_OPTS="$DPDK_OPTS -Dtests=false"
+
+ # Install DPDK using prefix.
+ DPDK_OPTS="$DPDK_OPTS --prefix=$(pwd)/build"
+
+ CC=gcc meson $DPDK_OPTS build
+ ninja -C build
+ ninja -C build install
- # Disable building DPDK kernel modules. Not needed for OVS build or tests.
- sed -i '/CONFIG_RTE_EAL_IGB_UIO=y/s/=y/=n/' build/.config
- sed -i '/CONFIG_RTE_KNI_KMOD=y/s/=y/=n/' build/.config
+ # Update the library paths.
+ sudo ldconfig
- # Switching to 'default' machine to make dpdk-dir cache usable on different
- # CPUs. We can't be sure that all CI machines are exactly same.
- sed -i '/CONFIG_RTE_MACHINE="native"/s/="native"/="default"/' build/.config
- make -j4 CC=gcc EXTRA_CFLAGS='-fPIC'
- EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=$(pwd)/build"
echo "Installed DPDK source in $(pwd)"
popd
echo "${DPDK_VER}" > ${VERSION_FILE}
@@ -187,7 +201,7 @@ fi
if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
if [ -z "$DPDK_VER" ]; then
- DPDK_VER="19.11.2"
+ DPDK_VER="20.11"
fi
install_dpdk $DPDK_VER
if [ "$CC" = "clang" ]; then
diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh
index fea905a83..69a40011f 100755
--- a/.ci/linux-prepare.sh
+++ b/.ci/linux-prepare.sh
@@ -22,6 +22,7 @@ cd ..
pip3 install --disable-pip-version-check --user flake8 hacking
pip3 install --user --upgrade docutils
+pip3 install --user 'meson==0.47.1'
if [ "$M32" ]; then
# Installing 32-bit libraries.