[pve-devel] [PATCH] add dpdk support

Alexandre Derumier aderumier at odiso.com
Fri Apr 21 09:37:25 CEST 2017


it's add dpdk support.
to enable it, we need to add support in ifupdown scripts later.

from doc:

Since Open vSwitch >= 2.6 the configuration of DPDK features has changed.
Instead of providing DPDK_OPTS in /etc/default/openvswitch-switch one now has
to use ovs-vsctl to enter the config into the database.

An example basic configuration workflow might look like:
 # Enable DPDK
 $ ovs-vsctl set Open_vSwitch . "other_config:dpdk-init=true"
 # run on cores 3,4 8,9
 $ ovs-vsctl set Open_vSwitch . "other_config:dpdk-lcore-mask=0x318"
 # Allocate 2G huge pages (not Numa node aware)
 $ ovs-vsctl set Open_vSwitch . "other_config:dpdk-alloc-mem=2048"
 # group/permissions for vhost-user sockets (required to work with libvirt/qemu)
 $ ovs-vsctl set Open_vSwitch . \
    "other_config:dpdk-extra=--vhost-owner libvirt-qemu:kvm --vhost-perm 0666"

There are also tunables like:
 $ ovs-vsctl set Open_vSwitch . "other_config:pmd-cpu-mask=0x318"
 $ ovs-vsctl set Open_vSwitch . "other_config:n-dpdk-rxqs=4"

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 pvepatches/enable-dpdk.patch | 51 ++++++++++++++++++++++++++++++++++++++++++++
 pvepatches/series            |  2 ++
 2 files changed, 53 insertions(+)
 create mode 100644 pvepatches/enable-dpdk.patch

diff --git a/pvepatches/enable-dpdk.patch b/pvepatches/enable-dpdk.patch
new file mode 100644
index 0000000..fe5e07b
--- /dev/null
+++ b/pvepatches/enable-dpdk.patch
@@ -0,0 +1,51 @@
+From 4ef25029bfd6db1d000befed5c5f33c96f53198c Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <aderumier at odiso.com>
+Date: Fri, 21 Apr 2017 08:33:32 +0200
+Subject: [PATCH] enable dpdk
+
+Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
+---
+ debian/control | 6 ++++--
+ debian/rules   | 2 +-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/debian/control b/debian/control
+index 8b96f8f..18a469a 100644
+--- a/debian/control
++++ b/debian/control
+@@ -15,7 +15,8 @@ Build-Depends: graphviz,
+                procps,
+                python-all (>= 2.7),
+                dh-systemd (>= 1.4),
+-               python-six
++               python-six,
++               dpdk-dev
+ Standards-Version: 3.9.3
+ Homepage: http://openvswitch.org/
+ 
+@@ -54,7 +55,8 @@ Depends: kmod | module-init-tools,
+          ${misc:Depends},
+          ${python:Depends},
+          ${shlibs:Depends},
+-         systemd
++         systemd,
++         dpdk
+ Description: Open vSwitch switch implementations
+  Open vSwitch is a production quality, multilayer, software-based,
+  Ethernet virtual switch. It is designed to enable massive network
+diff --git a/debian/rules b/debian/rules
+index 52f3b5c..29ff0f9 100755
+--- a/debian/rules
++++ b/debian/rules
+@@ -29,7 +29,7 @@ override_dh_autoreconf:
+ 	dh_autoreconf $(DH_AS_NEEDED)
+ 
+ override_dh_auto_configure:
+-	dh_auto_configure -- --enable-ssl --enable-shared $(DATAPATH_CONFIGURE_OPTS)
++	dh_auto_configure -- --enable-ssl --enable-shared --with-dpdk=/usr/share/dpdk/x86_64-default-linuxapp-gcc $(DATAPATH_CONFIGURE_OPTS)
+ 
+ override_dh_auto_test:
+ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+-- 
+2.11.0
+
diff --git a/pvepatches/series b/pvepatches/series
index 4de5839..1a5215b 100644
--- a/pvepatches/series
+++ b/pvepatches/series
@@ -4,3 +4,5 @@ delete-openvswitch-switch-init.patch
 use-systemctl-inside-ifupdown.patch
 remove-init-script-on-upgrades.patch
 add-net-tools-dependency.patch
+enable-dpdk.patch
+
-- 
2.11.0




More information about the pve-devel mailing list