DPDK: add support for v2.0.0
[cascardo/ovs.git] / .travis / build.sh
index 46c5c4d..c7796e1 100755 (executable)
@@ -49,6 +49,7 @@ function install_dpdk()
     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 's,(CONFIG_RTE_LIBRTE_VHOST=).*,\1y,' config/common_linuxapp
+    sed -ri 's,(CONFIG_RTE_LIBRTE_VHOST_USER=).*,\1n,' config/common_linuxapp
     sed -ri '/CONFIG_RTE_LIBNAME/a 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=x86_64-native-linuxapp-gcc
@@ -68,12 +69,14 @@ fi
 
 if [ "$DPDK" ]; then
     if [ -z "$DPDK_VER" ]; then
-        DPDK_VER="1.8.0"
+        DPDK_VER="2.0.0"
     fi
     install_dpdk $DPDK_VER
-    # Disregard bad function casts until DPDK is fixed
-    CFLAGS="$CFLAGS -Wno-error=bad-function-cast -Wno-error=cast-align"
-    EXTRA_OPTS+="--with-dpdk=./dpdk-$DPDK_VER/build"
+    if [ "$CC" = "clang" ]; then
+        # Disregard cast alignment errors until DPDK is fixed
+        EXTRA_OPTS="$EXTRA_OPTS -Wno-cast-align"
+    fi
+    EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=./dpdk-$DPDK_VER/build"
 elif [ "$CC" != "clang" ]; then
     # DPDK headers currently trigger sparse errors
     SPARSE_FLAGS="$SPARSE_FLAGS -Wsparse-error"