Skip to content

Commit

Permalink
travis: support versioning of DPDK and options to specify git repo an…
Browse files Browse the repository at this point in the history
…d tag

Use DPDK_VER to specify the version of DPDK, and DPDK_GIT to specify
the URL of the DPDK git repository.

Both flags require "DPDK=1" and "--with-dpdk" shall no longer be
specified as part of "OPTS" environment.

Example uses:

- skip both flags to use v1.7.1 tarball from dpdk.org as before:
    KERNEL=3.17.4 DPDK=1

- specify DPDK_VER only to use a version of tarball from dpdk.org:
    KERNEL=3.17.4 DPDK=1 DPDK_VER=1.7.1

- specify both DPDK_VER and DPDK_GIT to check out the tag "v$DPDK_VER"
  from the git repository "$DPDK_GIT":
    KERNEL=3.18 DPDK=1 DPDK_VER=1.7.1sp1 DPDK_GIT=https://github.com/shushen/dpdk

Signed-off-by: Shu Shen <[email protected]>
Signed-off-by: Thomas Graf <[email protected]>
  • Loading branch information
shushen authored and Thomas Graf committed Jan 5, 2015
1 parent 1368af0 commit 6c3cc11
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ before_install: ./.travis/prepare.sh
env:
- OPTS="--disable-ssl"
- TESTSUITE=1 KERNEL=3.17.4
- KERNEL=3.17.4 DPDK=1 OPTS="--with-dpdk=./dpdk-1.7.1/build"
- KERNEL=3.17.4 DPDK=1
- TESTSUITE=1 OPTS="--enable-shared"
- KERNEL=3.17.4 DPDK=1 OPTS="--enable-shared"
- KERNEL=3.16.7
Expand Down
18 changes: 14 additions & 4 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ function install_kernel()

function install_dpdk()
{
wget http://www.dpdk.org/browse/dpdk/snapshot/dpdk-1.7.1.tar.gz
tar xzvf dpdk-1.7.1.tar.gz > /dev/null
cd dpdk-1.7.1
if [ -n "$DPDK_GIT" ]; then
git clone $DPDK_GIT dpdk-$1
cd dpdk-$1
git checkout v$1
else
wget http://www.dpdk.org/browse/dpdk/snapshot/dpdk-$1.tar.gz
tar xzvf dpdk-$1.tar.gz > /dev/null
cd dpdk-$1
fi
find ./ -type f | xargs sed -i 's/max-inline-insns-single=100/max-inline-insns-single=400/'
sed -ri 's,(CONFIG_RTE_BUILD_COMBINE_LIBS=).*,\1y,' config/common_linuxapp
sed -ri '/CONFIG_RTE_LIBNAME/a CONFIG_RTE_BUILD_FPIC=y' config/common_linuxapp
Expand All @@ -59,9 +65,13 @@ if [ "$KERNEL" ] || [ "$DPDK" ]; then
fi

if [ "$DPDK" ]; then
install_dpdk
if [ -z "$DPDK_VER" ]; then
DPDK_VER="1.7.1"
fi
install_dpdk $DPDK_VER
# Disregard bad function cassts until DPDK is fixed
CFLAGS="$CFLAGS -Wno-error=bad-function-cast -Wno-error=cast-align"
EXTRA_OPTS+="--with-dpdk=./dpdk-$DPDK_VER/build"
elif [ $CC != "clang" ]; then
# DPDK headers currently trigger sparse errors
CFLAGS="$CFLAGS -Wsparse-error"
Expand Down

0 comments on commit 6c3cc11

Please sign in to comment.