From patchwork Wed May 9 15:45:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 910941 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="nh7n+BSE"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40h10k1cctz9s47 for ; Thu, 10 May 2018 01:45:57 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 294D1BA9; Wed, 9 May 2018 15:45:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 18C2EABC for ; Wed, 9 May 2018 15:45:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from bisque.maple.relay.mailchannels.net (bisque.maple.relay.mailchannels.net [23.83.214.18]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3D0D5F4 for ; Wed, 9 May 2018 15:45:52 +0000 (UTC) X-Sender-Id: 5xi41l16bi|x-authuser|stephen@that.guru Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 694ED5C2340 for ; Wed, 9 May 2018 15:45:51 +0000 (UTC) Received: from one.mxroute.com (unknown [100.96.33.32]) (Authenticated sender: 5xi41l16bi) by relay.mailchannels.net (Postfix) with ESMTPA id 03D055C1B97 for ; Wed, 9 May 2018 15:45:50 +0000 (UTC) X-Sender-Id: 5xi41l16bi|x-authuser|stephen@that.guru Received: from one.mxroute.com (one-outgoing.mxroute.com [172.18.54.155]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.14.1); Wed, 09 May 2018 15:45:51 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: 5xi41l16bi|x-authuser|stephen@that.guru X-MailChannels-Auth-Id: 5xi41l16bi X-Wide-Eyed-Relation: 3bc4b7e84c679eae_1525880751247_908199063 X-MC-Loop-Signature: 1525880751247:2108359223 X-MC-Ingress-Time: 1525880751247 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=tbAJQahXcfKPhqsIDGWzinRw/gCCwxE59zlkoPemKJ8=; b=nh7n+BSEw689JfxTUAA3uPYSM1 xxuehEpGLmeQjrvfxVoh7oYUDPKZhMUvFr4+/zFDr6xsEneoBfz/SeAVhu7qWAX5r0hUUEAa6JSIq +algjHwJfZsSiVC3yK5hv75aSt1ViFxf/kTXAx314hn9DfJo6NsAYNDXmW4lfV8AJG9bY3aYf17NH 43735vZbUC//O09BSgRY2Xt7kuqVbDEV0fdwxW+c1ch30P4RjoKKFL5aNhORuPHeBeaMFRzQmVTgK PrzmI9lOgKduhLO3TkXEJ4o186U89boL7tt3xE0wRhwchLFll8V1UoymzH+FfAe7MNLHp954Qf0EG aX0VWHaQ==; From: Stephen Finucane To: dev@openvswitch.org Date: Wed, 9 May 2018 16:45:45 +0100 Message-Id: <20180509154545.22405-1-stephen@that.guru> X-Mailer: git-send-email 2.14.3 X-AuthUser: stephen@that.guru X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] doc: Final cleanup of the DPDK documents X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org This concludes the cleanup by fixing some nits and adding some additional cross-references. Signed-off-by: Stephen Finucane --- This was initially sent as part of a larger series but excluded from a recent merge due to label issues. I wasn't able to reproduce these so I'm resending verbatim. --- Documentation/howto/dpdk.rst | 51 ++++++++++++++++--------------------- Documentation/topics/dpdk/index.rst | 6 +++++ 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst index 380181db0..6344f1cb0 100644 --- a/Documentation/howto/dpdk.rst +++ b/Documentation/howto/dpdk.rst @@ -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 +`. .. 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 @@ -137,13 +139,16 @@ Add test flows to forward packets between 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 @@ -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. diff --git a/Documentation/topics/dpdk/index.rst b/Documentation/topics/dpdk/index.rst index 181f61abb..79d3af379 100644 --- a/Documentation/topics/dpdk/index.rst +++ b/Documentation/topics/dpdk/index.rst @@ -30,12 +30,18 @@ The DPDK Datapath .. toctree:: :maxdepth: 2 + :caption: Bridges and Ports /topics/dpdk/bridge /topics/dpdk/phy /topics/dpdk/vhost-user /topics/dpdk/ring /topics/dpdk/vdev + +.. toctree:: + :maxdepth: 2 + :caption: Advanced Configuration + /topics/dpdk/pmd /topics/dpdk/qos /topics/dpdk/pdump