[ovs-dev] [PATCH] DPDK: add support for v2.0.0

Mark Kavanagh mark.b.kavanagh at intel.com
Wed Apr 8 15:34:05 UTC 2015


Update relevant artifacts to add support for DPDK v2.0.0
 - INSTALL.DPDK.md
 - travis build script
 - netdev-dpdk: fix build with unified offload types in DPDK v2.0.0

Note that this breaks compatibility with DPDK v1.8.0

Signed-off-by: Mark Kavanagh <mark.b.kavanagh at intel.com>
Signed-off-by: Panu Matilainen <pmatilai at redhat.com>
---
 .travis/build.sh  |    6 +++---
 INSTALL.DPDK.md   |   10 +++++++---
 lib/netdev-dpdk.c |    3 +--
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/.travis/build.sh b/.travis/build.sh
index b6b701c..b6fe0eb 100755
--- a/.travis/build.sh
+++ b/.travis/build.sh
@@ -68,11 +68,11 @@ 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"
+    # Support older versions of GCC
+    CFLAGS="-mssse3"
     EXTRA_OPTS+="--with-dpdk=./dpdk-$DPDK_VER/build"
 elif [ $CC != "clang" ]; then
     # DPDK headers currently trigger sparse errors
diff --git a/INSTALL.DPDK.md b/INSTALL.DPDK.md
index 60889d0..8e6f6af 100644
--- a/INSTALL.DPDK.md
+++ b/INSTALL.DPDK.md
@@ -16,13 +16,13 @@ OVS needs a system with 1GB hugepages support.
 Building and Installing:
 ------------------------
 
-Required DPDK 1.8.0, `fuse`, `fuse-devel` (`libfuse-dev` on Debian/Ubuntu)
+Required DPDK 2.0, `fuse`, `fuse-devel` (`libfuse-dev` on Debian/Ubuntu)
 
 1. Configure build & install DPDK:
   1. Set `$DPDK_DIR`
 
      ```
-     export DPDK_DIR=/usr/src/dpdk-1.8.0
+     export DPDK_DIR=/usr/src/dpdk-2.0
      cd $DPDK_DIR
      ```
 
@@ -66,8 +66,12 @@ Required DPDK 1.8.0, `fuse`, `fuse-devel` (`libfuse-dev` on Debian/Ubuntu)
    cd $(OVS_DIR)/openvswitch
    ./boot.sh
    ./configure --with-dpdk=$DPDK_BUILD
-   make
+   make [CFLAGS="-g -O2 -mssse3"]
    ```
+Note that users of older versions of GCC  must pass additional CFLAGS
+("-g -O2 -mssse3") to 'make'. This issue has been observed with GCC versions
+<= 4.8.3, and is not present in GCC v4.9.2 - applicability to interim versions is
+untested.
 
 To have better performance one can enable aggressive compiler optimizations and
 use the special instructions(popcnt, crc32) that may not be available on all
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index f69154b..5ab119a 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -117,8 +117,7 @@ static const struct rte_eth_conf port_conf = {
     .rx_adv_conf = {
         .rss_conf = {
             .rss_key = NULL,
-            .rss_hf = ETH_RSS_IPV4_TCP | ETH_RSS_IPV4 | ETH_RSS_IPV6
-                    | ETH_RSS_IPV4_UDP | ETH_RSS_IPV6_TCP | ETH_RSS_IPV6_UDP,
+            .rss_hf = ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP,
         },
     },
     .txmode = {
-- 
1.7.4.1




More information about the dev mailing list