[ovs-dev] [PATCH v2] netdev-dpdk: Print default vhost-sock-dir value & update documentation

Aaron Conole aconole at redhat.com
Fri May 6 12:21:08 UTC 2016


Ciara Loftus <ciara.loftus at intel.com> writes:

> When no vhost-sock-dir value is provided, print the default location.
> Update the documentation to reflect the fact that vhost-sock-dir values
> are now subdirectory loctions rather than full paths.
>
> Fixes: d8a8f353c23e ("netdev-dpdk: Restrict vhost_sock_dir")
>
> Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
> ---
>  INSTALL.DPDK.md   | 8 ++++----
>  lib/netdev-dpdk.c | 5 ++---
>  2 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/INSTALL.DPDK.md b/INSTALL.DPDK.md
> index 38da3bc..93f92e4 100644
> --- a/INSTALL.DPDK.md
> +++ b/INSTALL.DPDK.md
> @@ -585,12 +585,12 @@ in the names.
>       `/usr/local/var/run/openvswitch/vhost-user-1`, which you must provide
>       to your VM on the QEMU command line. More instructions on this can be
>       found in the next section "DPDK vhost-user VM configuration"
> -  - If you wish for the vhost-user sockets to be created in a directory other
> -    than `/usr/local/var/run/openvswitch`, you may specify another location
> -    in the ovsdb like so:
> +  - If you wish for the vhost-user sockets to be created in a sub-directory of
> +    `/usr/local/var/run/openvswitch`, you may specify this directory in the
> +    ovsdb like so:
>  
>        `./utilities/ovs-vsctl --no-wait \
> -        set Open_vSwitch . other_config:vhost-sock-dir=path`
> +        set Open_vSwitch . other_config:vhost-sock-dir=subdir`
>  
>  DPDK vhost-user VM configuration:
>  ---------------------------------
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index b488c60..4edf18b 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -2982,7 +2982,7 @@ dpdk_init__(const struct smap *ovs_other_config)
>      if (process_vhost_flags("cuse-dev-name", xstrdup("vhost-net"),
>                              PATH_MAX, ovs_other_config, &cuse_dev_name)) {
>  #else
> -    if (process_vhost_flags("vhost-sock-dir", xstrdup(""),
> +    if (process_vhost_flags("vhost-sock-dir", xstrdup(ovs_rundir()),
>                              NAME_MAX, ovs_other_config,
>                              &sock_dir_subcomponent)) {
>          struct stat s;
> @@ -3003,8 +3003,7 @@ dpdk_init__(const struct smap *ovs_other_config)
>          }
>          free(sock_dir_subcomponent);
>      } else {
> -        vhost_sock_dir = xstrdup(ovs_rundir());
> -        free(sock_dir_subcomponent);
> +        vhost_sock_dir = sock_dir_subcomponent;
>  #endif
>      }

Acked-by: Aaron Conole <aconole at redhat.com>

Thanks, Ciara!



More information about the dev mailing list