forked from pool/openvswitch
dbe41ed4db
- Add new DPDK_OPTIONS environment variable to hold the dpdk vswitchd options so that the systemd unit files can be used to launch an ovs-vswitcd DPDK capable instance instead of doing it manually. (bsc#987265) * 0001-ovs-ctl-Add-new-DPDK_OPTIONS-environment-variable.patch OBS-URL: https://build.opensuse.org/request/show/427251 OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=102
52 lines
1.9 KiB
Diff
52 lines
1.9 KiB
Diff
From 49e6a7ece028a2a429ee7672e4225788e8bbb4a9 Mon Sep 17 00:00:00 2001
|
|
From: Markos Chandras <mchandras@suse.de>
|
|
Date: Tue, 6 Sep 2016 11:06:56 +0100
|
|
Subject: [PATCH] ovs-ctl: Add new DPDK_OPTIONS environment variable
|
|
|
|
Add new DPDK_OPTIONS environment variable to hold the dpdk
|
|
vswitchd options so that the systemd unit files can be used to
|
|
launch an ovs-vswitcd DPDK capable instance instead of doing
|
|
it manually.
|
|
|
|
A similar patch has been submitted upstream
|
|
http://openvswitch.org/pipermail/dev/2016-July/074150.html
|
|
but got rejected because the master (2.6 at the time) has been
|
|
fixed in a different way and DPDK options are now part of the
|
|
ovsdb.
|
|
|
|
Signed-off-by: Markos Chandras <mchandras@suse.de>
|
|
---
|
|
rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template | 3 +++
|
|
utilities/ovs-ctl.in | 4 +++-
|
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template b/rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template
|
|
index 3050a07..8779c1e 100644
|
|
--- a/rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template
|
|
+++ b/rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template
|
|
@@ -21,3 +21,6 @@
|
|
# --ovsdb-server-wrapper=valgrind
|
|
#
|
|
OPTIONS=""
|
|
+# DPDK options to be passed along with --dpdk to ovs-vswitchd. For example:
|
|
+# DPDK_OPTIONS="-c 0x1 -n 4"
|
|
+DPDK_OPTIONS=""
|
|
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
|
|
index 0082bed..cec399c 100755
|
|
--- a/utilities/ovs-ctl.in
|
|
+++ b/utilities/ovs-ctl.in
|
|
@@ -215,7 +215,9 @@ start_forwarding () {
|
|
fi
|
|
|
|
# Start ovs-vswitchd.
|
|
- set ovs-vswitchd unix:"$DB_SOCK"
|
|
+ set ovs-vswitchd
|
|
+ [ -z "$DPDK_OPTIONS" ] || set -- "$@" "--dpdk" $DPDK_OPTIONS "--"
|
|
+ set "$@" unix:"$DB_SOCK"
|
|
set "$@" -vconsole:emer -vsyslog:err -vfile:info
|
|
if test X"$MLOCKALL" != Xno; then
|
|
set "$@" --mlockall
|
|
--
|
|
2.9.3
|
|
|