Three Ways to Build DPDK 2.0.0 with Open vSwitch

SDK Setup Script

One of the best method to build the DPDK package is to use DPDK's tools/setup.sh script. Use the following steps after running the setup.sh script:

                   - Press [9] to compile the package
                   - Press [12] to install the driver
                   - Press [16] to setup 1024 2MB hugepages
                   - Press [17] to register the Ethernet ports
                   - Press [30] to quit the tool

To verify check that DPDK package creates a new directory of compiled libraries. For x86_64 machines, the new subdirectory should be

dpdk-2.0.0/x86_64-native-linuxapp-gcc

Now change directories to the Open vSwitch source code and build as follows:

./boot.sh
./configure --with-dpdk=../dpdk-2.0.0/x86_64-native-linuxapp-gcc/
make

Bash Script

We went into greater detail on building and running OVS and DPDK for supporting vhost-user and offered a bash script as a band-aide until Open vSwitch is released.   This bash script checks of v2.4.0 is released and otherwise builds the trunk and includes specific configuration patches.

wget https://raw.githubusercontent.com/xsited/ssg/master/scripts/build_ovs_dpdk.sh
chmod +x build_ovs_dpdk.sh
./build_ovs_dpdk.sh

Note:  The patch sets included in the body of the script need updating time to time.

OPNFV vSwitch Performance Project

git clone http://gerrit.opnfv.org/gerrit/vswitchperf.git
cd vswitchperf/src
make

I was able to make a few simple changes to the existing package-list.mk file and build a custom integration for my use case.

diff --git a/src/package-list.mk b/src/package-list.mk index 0dbdbd2..cfde84e 100644
--- a/src/package-list.mk
+++ b/src/package-list.mk
@@ -6,8 +6,8 @@
 # dpdk section
 # DPDK_URL ?= git://dpdk.org/dpdk
 DPDK_URL ?= http://dpdk.org/git/dpdk
-DPDK_TAG ?= v1.8.0
+DPDK_TAG ?= v2.0.0

 # OVS section
 OVS_URL ?= https://github.com/openvswitch/ovs
-OVS_TAG ?= da79ce2b71dd879e7f20fdddc715568f6a74185a
+# OVS_TAG ?= da79ce2b71dd879e7f20fdddc715568f6a74185a

Whichever method works for you, we are ready to test any OVS 2.4 release candidate and DPDK 2.0.0.

For more complete information about compiler optimizations, see our Optimization Notice.