[ovs-dev] [CudaMailTagged] [PATCH 2/2] ovs-ctl: add environment controlled ovs-vswitchd arguments

Christian Ehrhardt christian.ehrhardt at canonical.com
Mon Jan 25 15:23:15 UTC 2016


ovs-vswitchd has arguments that are currently not exposed by
ovs-ctl as the project provided wrapper to start/stop the daemons.
This patch adds $OVS_VSWITCHD_OPTS which - if set - will be inserted in the
call to ovs-vswitchd as argument(s).
This avoids adding custom vars for each parameter that is there and
might be added.

Co-authored-by: James Page <james.page at canonical.com>
Signed-off-by: James Page <james.page at canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
---
 debian/openvswitch-switch.template | 4 ++++
 utilities/ovs-ctl.in               | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/debian/openvswitch-switch.template b/debian/openvswitch-switch.template
index 27cf7b5..4a04ccd 100644
--- a/debian/openvswitch-switch.template
+++ b/debian/openvswitch-switch.template
@@ -10,3 +10,7 @@
 # DPDK options - see /usr/share/doc/openvswitch-common/INSTALL.DPDK.md.gz
 # these are passed to ovs-vswitchd obeying to the positional requirements
 # DPDK_OPTS='--dpdk -vhost_sock_dir /var/run/openvswitch-vhost -c 0x1 -n 4'
+
+# OVS_VSWITCHD_OPTS: Extra options to pass to ovs-vswitchd.
+# This is, for example, a suitable place to specify verbosity options
+# OVS_VSWITCHD_OPTS=
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 7b3a3bf..2b4fde1 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -224,6 +224,9 @@ start_forwarding () {
 	    if test X"$MLOCKALL" != Xno; then
 	        set "$@" --mlockall
 	    fi
+	    if test X"$OVS_VSWITCHD_OPTS" != X; then
+	        set "$@" $OVS_VSWITCHD_OPTS
+	    fi
 	    start_daemon "$OVS_VSWITCHD_PRIORITY" "$OVS_VSWITCHD_WRAPPER" "$@"
     fi
 }
-- 
1.9.1




More information about the dev mailing list