On 04/08/2015 06:34 PM, Mark Kavanagh wrote:
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.kavan...@intel.com>
Signed-off-by: Panu Matilainen <pmati...@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"
I'd think this is sufficiently (and better) covered by documenting it,
as done below. But if this is to be kept, you can't just override CFLAGS
completely, you need to append to it.
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"]
```
This would work for one-shot builds but its better to pass the CFLAGS to
configure so you dont need to keep passing them to every invocation of
make. Ie
./configure --with-dpdk=$DPDK_BUILD CFLAGS="-g -O2 -mssse3"
make
+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 = {
The rest looks fine to me.
- Panu -
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev