This commit removes the dev-index, so update the doc for this change:
17b8320a3e11e146868906d0082b6e402d5f2255
"vhost: remove index parameter"

Signed-off-by: Changchun Ouyang <changchun.ouyang at intel.com>
---
 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 730b9da..2ec2843 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 at target:~$ ./build/app/vhost-switch -c f -n 4 --huge-dir / 
mnt/huge -- -p 0x1 --dev-basename usvhost --dev-index 1
+        user at 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/<basename>-<index>
+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/<basename>

-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 at target:~$ ./build/app/vhost-switch -c f -n 4 --huge-dir / mnt/huge 
-- -p 0x1 --dev-basename usvhost --dev-index 1
+    user at 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/<basename>-<index>".
+        DPDK vhost-net sample code's character device will be in the format 
"/dev/<basename>".

         .. 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 5096011..cd77c3a 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/<devbase-name>-<index>",
+#                "/dev/<devbase-name>",
 #            ]
 #
 #   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
-- 
1.8.4.2

Reply via email to