Skip to content

Commit

Permalink
travis: Don't install kernel for DPDK checks.
Browse files Browse the repository at this point in the history
We don't need to build DPDK kernel modules to test build with OVS.
And we don't need to build OVS datapath modules for checking
userspace with DPDK.

Removed 'max-inline-insns-single' changes that only was needed for
DPDK kernel modules. Config modifications changed to update
generated build/.config instead of changing sources.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
igsilya authored and ovsrobot committed Jun 11, 2019
1 parent 4f746d5 commit e71aa71
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Expand Up @@ -31,10 +31,10 @@ env:
- TESTSUITE=1 KERNEL=3.16
- TESTSUITE=1 OPTS="--enable-shared"
- BUILD_ENV="-m32" OPTS="--disable-ssl"
- KERNEL=3.16 DPDK=1 OPTS="--enable-shared"
- KERNEL=3.16 TESTSUITE=1 DPDK=1
- KERNEL=3.16 DPDK_SHARED=1
- KERNEL=3.16 DPDK_SHARED=1 OPTS="--enable-shared"
- DPDK=1 OPTS="--enable-shared"
- TESTSUITE=1 DPDK=1
- DPDK_SHARED=1
- DPDK_SHARED=1 OPTS="--enable-shared"
- KERNEL=4.20
- KERNEL=4.19
- KERNEL=4.18
Expand Down
25 changes: 13 additions & 12 deletions .travis/linux-build.sh
Expand Up @@ -3,7 +3,6 @@
set -o errexit
set -x

KERNELSRC=""
CFLAGS=""
SPARSE_FLAGS=""
EXTRA_OPTS="--enable-Werror"
Expand Down Expand Up @@ -57,10 +56,7 @@ function install_kernel()
make net/bridge/
fi

KERNELSRC=$(pwd)
if [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then
EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"
fi
EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"
echo "Installed kernel source in $(pwd)"
cd ..
}
Expand All @@ -78,16 +74,21 @@ function install_dpdk()
if [ $DIR_NAME != "dpdk-$1" ]; then mv $DIR_NAME dpdk-$1; fi
cd dpdk-$1
fi
find ./ -type f | xargs sed -i 's/max-inline-insns-single=100/max-inline-insns-single=400/'
find ./ -type f | xargs sed -i 's/-Werror/-Werror -Wno-error=inline/'
echo 'CONFIG_RTE_BUILD_FPIC=y' >>config/common_linuxapp
sed -ri '/EXECENV_CFLAGS = -pthread -fPIC/{s/$/\nelse ifeq ($(CONFIG_RTE_BUILD_FPIC),y)/;s/$/\nEXECENV_CFLAGS = -pthread -fPIC/}' mk/exec-env/linuxapp/rte.vars.mk

make config CC=gcc T=$TARGET

if [ "$DPDK_SHARED" ]; then
sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' config/common_base
sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' build/.config
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$TARGET/lib
fi
make config CC=gcc T=$TARGET
make -j4 CC=gcc RTE_KERNELDIR=$KERNELSRC

# 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

make -j4 CC=gcc
echo "Installed DPDK source in $(pwd)"
cd ..
}
Expand All @@ -97,7 +98,7 @@ function configure_ovs()
./boot.sh && ./configure $* || { cat config.log; exit 1; }
}

if [ "$KERNEL" ] || [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
if [ "$KERNEL" ]; then
install_kernel $KERNEL
fi

Expand Down Expand Up @@ -141,7 +142,7 @@ else
make selinux-policy

# Only build datapath if we are testing kernel w/o running testsuite
if [ "$KERNEL" ] && [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then
if [ "$KERNEL" ]; then
cd datapath
fi
make -j4
Expand Down

0 comments on commit e71aa71

Please sign in to comment.