Dominique Leuenberger 2016-09-16 09:01:02 +00:00 committed by Git OBS Bridge
commit 5aa538390e
5 changed files with 105 additions and 4 deletions

View File

@ -0,0 +1,51 @@
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

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Tue Sep 6 10:11:49 UTC 2016 - mchandras@suse.de
- 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
-------------------------------------------------------------------
Sun Aug 14 11:05:59 CEST 2016 - ro@suse.de
- enable openvswitch-dpdk on aarch64 since dpdk
builds on aarch64 now
-------------------------------------------------------------------
Sun Aug 7 21:11:51 CEST 2016 - ro@suse.de
- remove aarch from openvswitch-dpdk until we have a dpdk
that builds for aarch64
-------------------------------------------------------------------
Tue Jul 12 10:41:14 UTC 2016 - mchandras@suse.de
@ -18,7 +39,7 @@ Wed Jun 29 15:17:07 UTC 2016 - mchandras@suse.de
- Remove the ?_with_dpdk macro usage since this is not being set
without explicitly passing --with/--without during an OBS build.
This reverts back to using the %{with dpdk} style which is set
automatically based on %bcond_with* macros.
automatically based on %bcond_with* macros (bsc#989335).
-------------------------------------------------------------------
Tue Jun 28 13:21:12 UTC 2016 - mchandras@suse.de

View File

@ -42,9 +42,12 @@ Source1: preamble
Source2: openvswitch-switch.logrotate
Source3: openvswitch.service
Source89: Module.supported.updates
# PATCH-FIX-UPSTREAM openvswitch-2.5.0-detect-dpdk-installation.patch
# PATCH-FIX-UPSTREAM: openvswitch-2.5.0-detect-dpdk-installation.patch (fate#319170)
Patch0: openvswitch-%{version}-detect-dpdk-installation.patch
# PATCH-FIX-UPSTREAM: 0001-Remove-broken-pipe-warning-logs-from-ovsdb-server.lo.patch
Patch1: 0001-Remove-broken-pipe-warning-logs-from-ovsdb-server.lo.patch
# PATCH-FIX-SUSE: 0001-ovs-ctl-Add-new-DPDK_OPTIONS-environment-variable.patch (bsc#987265)
Patch2: 0001-ovs-ctl-Add-new-DPDK_OPTIONS-environment-variable.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
@ -247,6 +250,7 @@ Open vSwitch is a full-featured software-based Ethernet switch.
%setup -q -n openvswitch-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
set -- * .travis*

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Tue Sep 6 10:11:49 UTC 2016 - mchandras@suse.de
- 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
-------------------------------------------------------------------
Sun Aug 14 11:05:59 CEST 2016 - ro@suse.de
- enable openvswitch-dpdk on aarch64 since dpdk
builds on aarch64 now
-------------------------------------------------------------------
Sun Aug 7 21:11:51 CEST 2016 - ro@suse.de
- remove aarch from openvswitch-dpdk until we have a dpdk
that builds for aarch64
-------------------------------------------------------------------
Tue Jul 12 10:41:14 UTC 2016 - mchandras@suse.de
@ -18,7 +39,7 @@ Wed Jun 29 15:17:07 UTC 2016 - mchandras@suse.de
- Remove the ?_with_dpdk macro usage since this is not being set
without explicitly passing --with/--without during an OBS build.
This reverts back to using the %{with dpdk} style which is set
automatically based on %bcond_with* macros.
automatically based on %bcond_with* macros (bsc#989335).
-------------------------------------------------------------------
Tue Jun 28 13:21:12 UTC 2016 - mchandras@suse.de

View File

@ -40,9 +40,12 @@ Source1: preamble
Source2: openvswitch-switch.logrotate
Source3: openvswitch.service
Source89: Module.supported.updates
# PATCH-FIX-UPSTREAM openvswitch-2.5.0-detect-dpdk-installation.patch
# PATCH-FIX-UPSTREAM: openvswitch-2.5.0-detect-dpdk-installation.patch (fate#319170)
Patch0: openvswitch-%{version}-detect-dpdk-installation.patch
# PATCH-FIX-UPSTREAM: 0001-Remove-broken-pipe-warning-logs-from-ovsdb-server.lo.patch
Patch1: 0001-Remove-broken-pipe-warning-logs-from-ovsdb-server.lo.patch
# PATCH-FIX-SUSE: 0001-ovs-ctl-Add-new-DPDK_OPTIONS-environment-variable.patch (bsc#987265)
Patch2: 0001-ovs-ctl-Add-new-DPDK_OPTIONS-environment-variable.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
@ -245,6 +248,7 @@ Open vSwitch is a full-featured software-based Ethernet switch.
%setup -q -n openvswitch-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
set -- * .travis*