From: Ouyang Changchun Date: Tue, 18 Aug 2015 02:51:33 +0000 (+0800) Subject: doc: fix vhost sample parameter X-Git-Tag: spdx-start~8478 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=43866bf71d58;p=dpdk.git 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 --- 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