doc: fix repeated typo in sample app guides
[dpdk.git] / doc / guides / sample_app_ug / vhost.rst
index 8a7eb3b..ceeaf52 100644 (file)
@@ -37,7 +37,7 @@ The vhost sample application demonstrates integration of the Data Plane Developm
 with the Linux* KVM hypervisor by implementing the vhost-net offload API.
 The sample application performs simple packet switching between virtual machines based on Media Access Control
 (MAC) address or Virtual Local Area Network (VLAN) tag.
-The splitting of ethernet traffic from an external switch is performed in hardware by the Virtual Machine Device Queues
+The splitting of Ethernet traffic from an external switch is performed in hardware by the Virtual Machine Device Queues
 (VMDQ) and Data Center Bridging (DCB) features of the IntelĀ® 82599 10 Gigabit Ethernet Controller.
 
 Background
@@ -48,13 +48,12 @@ between host and guest.
 It was found that virtio-net performance was poor due to context switching and packet copying between host, guest, and QEMU.
 The following figure shows the system architecture for a virtio-based networking (virtio-net).
 
-.. _figure_16:
+.. _figure_qemu_virtio_net:
 
-**Figure16. QEMU Virtio-net (prior to vhost-net)**
+.. figure:: img/qemu_virtio_net.*
 
-.. image19_png has been renamed
+   System Architecture for Virtio-based Networking (virtio-net).
 
-|qemu_virtio_net|
 
 The Linux* Kernel vhost-net module was developed as an offload mechanism for virtio-net.
 The vhost-net module enables KVM (QEMU) to offload the servicing of virtio-net devices to the vhost-net kernel module,
@@ -76,13 +75,12 @@ This is achieved by QEMU sharing the following information with the vhost-net mo
 
 The following figure shows the system architecture for virtio-net networking with vhost-net offload.
 
-.. _figure_17:
+.. _figure_virtio_linux_vhost:
 
-**Figure 17. Virtio with Linux* Kernel Vhost**
+.. figure:: img/virtio_linux_vhost.*
 
-.. image20_png has been renamed
+   Virtio with Linux
 
-|virtio_linux_vhost|
 
 Sample Code Overview
 --------------------
@@ -90,7 +88,7 @@ Sample Code Overview
 The DPDK vhost-net sample code demonstrates KVM (QEMU) offloading the servicing of a Virtual Machine's (VM's)
 virtio-net devices to a DPDK-based application in place of the kernel's vhost-net module.
 
-The DPDK vhost-net sample code is based on vhost library. Vhost library is developed for user space ethernet switch to
+The DPDK vhost-net sample code is based on vhost library. Vhost library is developed for user space Ethernet switch to
 easily integrate with vhost functionality.
 
 The vhost library implements the following features:
@@ -110,7 +108,7 @@ socket messages. Most of the messages share the same handler routine.
 .. note::
     **Any vhost cuse specific requirement in the following sections will be emphasized**.
 
-Two impelmentations are turned on and off statically through configure file. Only one implementation could be turned on. They don't co-exist in current implementation.
+Two implementations are turned on and off statically through configure file. Only one implementation could be turned on. They don't co-exist in current implementation.
 
 The vhost sample code application is a simple packet switching application with the following feature:
 
@@ -119,23 +117,21 @@ The vhost sample code application is a simple packet switching application with
 
 The following figure shows the architecture of the Vhost sample application based on vhost-cuse.
 
-.. _figure_18:
+.. _figure_vhost_net_arch:
 
-**Figure 18. Vhost-net Architectural Overview**
+.. figure:: img/vhost_net_arch.*
 
-.. image21_png has been renamed
+   Vhost-net Architectural Overview
 
-|vhost_net_arch|
 
 The following figure shows the flow of packets through the vhost-net sample application.
 
-.. _figure_19:
+.. _figure_vhost_net_sample_app:
 
-**Figure 19. Packet Flow Through the vhost-net Sample Application**
+.. figure:: img/vhost_net_sample_app.*
 
-.. image22_png  has been renamed
+   Packet Flow Through the vhost-net Sample Application
 
-|vhost_net_sample_app|
 
 Supported Distributions
 -----------------------
@@ -158,7 +154,7 @@ Installing Packages on the Host(vhost cuse required)
 
 The vhost cuse code uses the following packages; fuse, fuse-devel, and kernel-modules-extra.
 The vhost user code don't rely on those modules as eventfds are already installed into vhost process through
-unix domain socket.
+Unix domain socket.
 
 #.  Install Fuse Development Libraries and headers:
 
@@ -309,13 +305,12 @@ Compiling the Sample Code
 
         CONFIG_RTE_LIBRTE_VHOST=n
 
-    vhost user is turned on by default in the lib/librte_vhost/Makefile.
-    To enable vhost cuse, uncomment vhost cuse and comment vhost user manually. In future, a configure will be created for switch between two implementations.
+    vhost user is turned on by default in the configure file config/common_linuxapp.
+    To enable vhost cuse, disable vhost user.
 
     .. code-block:: console
 
-        SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_cuse/vhost-net-cdev.c vhost_cuse/virtio-net-cdev.c vhost_cuse/eventfd_copy.c
-        #SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_user/vhost-net-user.c vhost_user/virtio-net-user.c vhost_user/fd_man.c
+        CONFIG_RTE_LIBRTE_VHOST_USER=y
 
      After vhost is enabled and the implementation is selected, build the vhost library.
 
@@ -391,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.
 
@@ -406,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@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.
@@ -492,7 +485,7 @@ This option is disabled by default.
 
 **RX descriptor number.**
 The RX descriptor number option specify the Ethernet RX descriptor number,
-Linux legacy virtio-net has different behaviour in how to use the vring descriptor from DPDK based virtio-net PMD,
+Linux legacy virtio-net has different behavior in how to use the vring descriptor from DPDK based virtio-net PMD,
 the former likely allocate half for virtio header, another half for frame buffer,
 while the latter allocate all for frame buffer,
 this lead to different number for available frame buffer in vring,
@@ -503,7 +496,7 @@ So it is valid only in zero copy mode is enabled. The value is 32 by default.
 
     user@target:~$ ./build/app/vhost-switch -c f -n 4 --huge-dir /mnt/huge -- --zero-copy 1 --rx-desc-num [0, n]
 
-**TX descriptornumber.**
+**TX descriptor number.**
 The TX descriptor number option specify the Ethernet TX descriptor number, it is valid only in zero copy mode is enabled.
 The value is 64 by default.
 
@@ -683,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
 ~~~~~~~~~~~~~
@@ -722,15 +715,6 @@ Common Issues
     needs access to the shared memory from the guest to receive and transmit packets. It is important to make sure
     the QEMU version supports shared memory mapping.
 
-*   Issues with ``virsh destroy`` not destroying the VM:
-
-    Using libvirt ``virsh create`` the ``qemu-wrap.py`` spawns a new process to run ``qemu-kvm``. This impacts the behavior
-    of ``virsh destroy`` which kills the process running ``qemu-wrap.py`` without actually destroying the VM (it leaves
-    the ``qemu-kvm`` process running):
-
-    This following patch should fix this issue:
-        http://dpdk.org/ml/archives/dev/2014-June/003607.html
-
 *   In an Ubuntu environment, QEMU fails to start a new guest normally with user space VHOST due to not being able
     to allocate huge pages for the new guest:
 
@@ -772,13 +756,12 @@ In the "wait and retry" mode if the virtqueue is found to be full, then testpmd
 The "wait and retry" algorithm is implemented in DPDK testpmd as a forwarding method call "mac_retry".
 The following sequence diagram describes the algorithm in detail.
 
-.. _figure_20:
+.. _figure_tx_dpdk_testpmd:
 
-**Figure 20. Packet Flow on TX in DPDK-testpmd**
+.. figure:: img/tx_dpdk_testpmd.*
 
-.. image23_png has been renamed
+   Packet Flow on TX in DPDK-testpmd
 
-|tx_dpdk_testpmd|
 
 Running Testpmd
 ~~~~~~~~~~~~~~~
@@ -839,13 +822,3 @@ For example:
 The above message indicates that device 0 has been registered with MAC address cc:bb:bb:bb:bb:bb and VLAN tag 1000.
 Any packets received on the NIC with these values is placed on the devices receive queue.
 When a virtio-net device transmits packets, the VLAN tag is added to the packet by the DPDK vhost sample code.
-
-.. |vhost_net_arch| image:: img/vhost_net_arch.*
-
-.. |qemu_virtio_net| image:: img/qemu_virtio_net.*
-
-.. |tx_dpdk_testpmd| image:: img/tx_dpdk_testpmd.*
-
-.. |vhost_net_sample_app| image:: img/vhost_net_sample_app.*
-
-.. |virtio_linux_vhost| image:: img/virtio_linux_vhost.*