From 43866bf71d5894f9d438a6e222eb79c7b77c946e Mon Sep 17 00:00:00 2001 From: Ouyang Changchun Date: Tue, 18 Aug 2015 10:51:33 +0800 Subject: [PATCH] doc: fix vhost sample parameter This commit removes the dev-index, so update the doc for this change: Fixes: 17b8320a3e11 ("vhost: remove index parameter") Signed-off-by: Changchun Ouyang --- doc/guides/sample_app_ug/vhost.rst | 18 ++++++++---------- lib/librte_vhost/libvirt/qemu-wrap.py | 10 +++++----- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst index 730b9daa54..2ec28434d6 100644 --- a/doc/guides/sample_app_ug/vhost.rst +++ b/doc/guides/sample_app_ug/vhost.rst @@ -386,7 +386,7 @@ Running the Sample Code .. code-block:: console - user@target:~$ ./build/app/vhost-switch -c f -n 4 --huge-dir / mnt/huge -- -p 0x1 --dev-basename usvhost --dev-index 1 + user@target:~$ ./build/app/vhost-switch -c f -n 4 --huge-dir / mnt/huge -- -p 0x1 --dev-basename usvhost vhost user: a socket file named usvhost will be created under current directory. Use its path as the socket path in guest's qemu commandline. @@ -401,19 +401,17 @@ Running the Sample Code Parameters ~~~~~~~~~~ -**Basename and Index.** +**Basename.** vhost cuse uses a Linux* character device to communicate with QEMU. -The basename and the index are used to generate the character devices name. - - /dev/- +The basename is used to generate the character devices name. -The index parameter is provided for a situation where multiple instances of the virtual switch is required. + /dev/ -For compatibility with the QEMU wrapper script, a base name of "usvhost" and an index of "1" should be used: +For compatibility with the QEMU wrapper script, a base name of "usvhost" should be used: .. code-block:: console - user@target:~$ ./build/app/vhost-switch -c f -n 4 --huge-dir / mnt/huge -- -p 0x1 --dev-basename usvhost --dev-index 1 + user@target:~$ ./build/app/vhost-switch -c f -n 4 --huge-dir / mnt/huge -- -p 0x1 --dev-basename usvhost **vm2vm.** The vm2vm parameter disable/set mode of packet switching between guests in the host. @@ -678,11 +676,11 @@ To call the QEMU wrapper automatically from libvirt, the following configuration emul_path = "/usr/local/bin/qemu-system-x86_64" * Configure the "us_vhost_path" variable to point to the DPDK vhost-net sample code's character devices name. - DPDK vhost-net sample code's character device will be in the format "/dev/-". + DPDK vhost-net sample code's character device will be in the format "/dev/". .. code-block:: xml - us_vhost_path = "/dev/usvhost-1" + us_vhost_path = "/dev/usvhost" Common Issues ~~~~~~~~~~~~~ diff --git a/lib/librte_vhost/libvirt/qemu-wrap.py b/lib/librte_vhost/libvirt/qemu-wrap.py index 50960112b7..cd77c3a001 100755 --- a/lib/librte_vhost/libvirt/qemu-wrap.py +++ b/lib/librte_vhost/libvirt/qemu-wrap.py @@ -75,7 +75,7 @@ # "/dev/random", "/dev/urandom", # "/dev/ptmx", "/dev/kvm", "/dev/kqemu", # "/dev/rtc", "/dev/hpet", "/dev/net/tun", -# "/dev/-", +# "/dev/", # ] # # 4.b) Disable SELinux or set to permissive mode @@ -129,13 +129,13 @@ emul_path = "/usr/local/bin/qemu-system-x86_64" #Path to userspace vhost device file -# This filename should match the --dev-basename --dev-index parameters of +# This filename should match the --dev-basename parameters of # the command used to launch the userspace vhost sample application e.g. # if the sample app lauch command is: -# ./build/vhost-switch ..... --dev-basename usvhost --dev-index 1 +# ./build/vhost-switch ..... --dev-basename usvhost # then this variable should be set to: -# us_vhost_path = "/dev/usvhost-1" -us_vhost_path = "/dev/usvhost-1" +# us_vhost_path = "/dev/usvhost" +us_vhost_path = "/dev/usvhost" #List of additional user defined emulation options. These options will #be added to all Qemu calls -- 2.20.1