@@ -25,23 +25,26 @@
Using Open vSwitch with DPDK
============================
-This document describes how to use Open vSwitch with DPDK datapath.
+This document describes how to use Open vSwitch with DPDK datapath. For more
+detailed information, refer to the various :doc:`DPDK topic guides
+</topics/dpdk/index>`.
.. important::
Using the DPDK datapath requires building OVS with DPDK support. Refer to
:doc:`/intro/install/dpdk` for more information.
-Ports and Bridges
------------------
+Overview
+--------
-ovs-vsctl can be used to set up bridges and other Open vSwitch features.
-Bridges should be created with a ``datapath_type=netdev``::
+:program:`ovs-vsctl` can be used to set up bridges and other Open vSwitch
+features. Bridges should be created with a ``datapath_type=netdev``::
$ ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
-ovs-vsctl can also be used to add DPDK devices. ovs-vswitchd should print the
-number of dpdk devices found in the log file::
+:program:`ovs-vsctl` can also be used to add DPDK devices.
+:program:`ovs-vswitchd` should print the number of ``dpdk`` devices found in
+the log file::
$ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \
options:dpdk-devargs=0000:01:00.0
@@ -59,14 +62,13 @@ is suggested::
.. important::
- Hotplugging physical interfaces is not supported using the above syntax.
- This is expected to change with the release of DPDK v18.05. For information
- on hotplugging physical interfaces, you should instead refer to
- :ref:`port-hotplug`.
+ Hotplugging physical interfaces is not supported for these devices. This
+ is expected to change with the release of DPDK v18.05. For information on
+ hotplugging physical interfaces, refer to :ref:`port-hotplug`.
After the DPDK ports get added to switch, a polling thread continuously polls
-DPDK devices and consumes 100% of the core, as can be checked from ``top`` and
-``ps`` commands::
+DPDK devices and consumes 100% of the core, as can be checked from
+:command:`top` and :command:`ps` commands::
$ top -H
$ ps -eLo pid,psr,comm | grep pmd
@@ -79,7 +81,7 @@ set. For example::
-- set Interface p0 type=dpdk options:dpdk-devargs=0000:01:00.0 \
-- set Interface p1 type=dpdk options:dpdk-devargs=0000:01:00.1
-To stop ovs-vswitchd & delete bridge, run::
+To stop :program:`ovs-vswitchd` and delete the bridge, run::
$ ovs-appctl -t ovs-vswitchd exit
$ ovs-appctl -t ovsdb-server exit
@@ -126,7 +128,7 @@ Add a userspace bridge and two ``dpdk`` (PHY) ports::
$ ovs-vsctl add-port br0 phy1 -- set Interface phy1 type=dpdk
options:dpdk-devargs=0000:01:00.1 ofport_request=2
-Add test flows to forward packets betwen DPDK port 0 and port 1::
+Add test flows to forward packets between DPDK port 0 and port 1::
# Clear current flows
$ ovs-ofctl del-flows br0
@@ -137,13 +139,16 @@ Add test flows to forward packets betwen DPDK port 0 and port 1::
Transmit traffic into either port. You should see it returned via the other.
+More information on the ``dpdk`` ports can be found in :doc:`/topics/dpdk/phy`.
+
.. _dpdk-vhost-loopback:
PHY-VM-PHY (vHost Loopback)
---------------------------
Add a userspace bridge, two ``dpdk`` (PHY) ports, and two ``dpdkvhostuser``
-ports::
+ports. It is assumed that the physical ports are already bound to DPDK, as
+described in :ref:`dpdk-binding-nics`::
# Add userspace bridge
$ ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
@@ -161,7 +166,7 @@ ports::
$ ovs-vsctl add-port br0 dpdkvhostuser1 \
-- set Interface dpdkvhostuser1 type=dpdkvhostuser ofport_request=4
-Add test flows to forward packets betwen DPDK devices and VM ports::
+Add test flows to forward packets between DPDK devices and VM ports::
# Clear current flows
$ ovs-ofctl del-flows br0
@@ -221,19 +226,7 @@ described in :ref:`dpdk-testpmd`. Once compiled, run the application::
$ set fwd mac retry
$ start
-When you finish testing, bind the vNICs back to kernel::
-
- $ $DPDK_DIR/usertools/dpdk-devbind.py --bind=virtio-pci 0000:00:03.0
- $ $DPDK_DIR/usertools/dpdk-devbind.py --bind=virtio-pci 0000:00:04.0
-
-.. note::
-
- Valid PCI IDs must be passed in above example. The PCI IDs can be retrieved
- like so::
-
- $ $DPDK_DIR/usertools/dpdk-devbind.py --status
-
-More information on the dpdkvhostuser ports can be found in
+More information on the ``dpdkvhostuser`` ports can be found in
:doc:`/topics/dpdk/vhost-user`.
PHY-VM-PHY (vHost Loopback) (Kernel Forwarding)
@@ -277,7 +270,7 @@ devices to bridge ``br0``. Once complete, follow the below steps:
$ ovs-vsctl set Interface phy0 options:n_rxq=2
$ ovs-vsctl set Interface phy1 options:n_rxq=2
-2. Instantiate Guest VM using QEMU cmdline
+2. Instantiate Guest VM using QEMU command line
We must configure with appropriate software versions to ensure this feature
is supported.
@@ -357,3 +350,9 @@ devices to bridge ``br0``. Once complete, follow the below steps:
Check traffic on multiple queues::
$ cat /proc/interrupts | grep virtio
+
+More Information
+----------------
+
+More information on the DPDK datapath in provided in the :doc:`DPDK topic
+guides </topics/dpdk/index>`.
This concludes the cleanup by fixing some grammar nits and adding some additional cross-references. Signed-off-by: Stephen Finucane <stephen@that.guru> --- Documentation/howto/dpdk.rst | 61 ++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 31 deletions(-)