[ovs-dev] [CudaMailTagged] [PATCH 1/2] ovs-ctl: add early parameters for DPDK

Aaron Conole aconole at redhat.com
Mon Jan 25 16:18:24 UTC 2016


Hi Christian,

Christian Ehrhardt <christian.ehrhardt at canonical.com> writes:
> To enable DPDK it needs a positional parameter to ovs-vswitchd.
> Since everybody is encouranged to use the project provided ovs-ctl
> scripts to start/stop the daemons it should allow an external setting of
> these options via an environment variable.
>
> This patch adds $DPDK_OPTS which will be inserted in the call to
> ovs-vswitchd arguments early.

There is an effort underway to move DPDK options from the command line
to the openvswitch database. See the progress at
http://openvswitch.org/pipermail/dev/2016-January/064735.html

If that series is accepted, this patch is invalid.

> Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> ---
>  debian/openvswitch-switch.template | 4 ++++
>  utilities/ovs-ctl.in               | 6 +++++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/debian/openvswitch-switch.template b/debian/openvswitch-switch.template
> index d7c7796..27cf7b5 100644
> --- a/debian/openvswitch-switch.template
> +++ b/debian/openvswitch-switch.template
> @@ -6,3 +6,7 @@
>  # OVS_CTL_OPTS: Extra options to pass to ovs-ctl.  This is, for example,
>  # a suitable place to specify --ovs-vswitchd-wrapper=valgrind.
>  # OVS_CTL_OPTS=
> +
> +# 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'
> diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
> index 0082bed..7b3a3bf 100755
> --- a/utilities/ovs-ctl.in
> +++ b/utilities/ovs-ctl.in
> @@ -215,7 +215,11 @@ start_forwarding () {
>          fi
>  
>  	    # Start ovs-vswitchd.
> -	    set ovs-vswitchd unix:"$DB_SOCK"
> +	    set ovs-vswitchd
> +	    if test X"$DPDK_OPTS" != X; then
> +	        set "$@" $DPDK_OPTS --
> +	    fi
> +	    set "$@" unix:"$DB_SOCK"
>  	    set "$@" -vconsole:emer -vsyslog:err -vfile:info
>  	    if test X"$MLOCKALL" != Xno; then
>  	        set "$@" --mlockall



More information about the dev mailing list