2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 22:35:15 +00:00

netdev-dpdk: Print default vhost-sock-dir value & update documentation

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: d8a8f353c2 ("netdev-dpdk: Restrict vhost_sock_dir")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ciara Loftus
2016-05-06 11:20:34 +01:00
committed by Ben Pfaff
parent d6e3feb57c
commit 6eb51f9a45
2 changed files with 6 additions and 7 deletions

View File

@@ -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:
---------------------------------

View File

@@ -3100,7 +3100,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;
@@ -3121,8 +3121,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
}