From patchwork Mon Feb 12 18:13:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 872252 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; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="DDh1mS7E"; 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 3zgDTH326lz9s7h for ; Tue, 13 Feb 2018 05:19:15 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 31727EC8; Mon, 12 Feb 2018 18:19:13 +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 B41F1E34 for ; Mon, 12 Feb 2018 18:19:12 +0000 (UTC) X-Greylist: delayed 00:05:51 by SQLgrey-1.7.6 Received: from weasel.tulip.relay.mailchannels.net (weasel.tulip.relay.mailchannels.net [23.83.218.247]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C54C412D for ; Mon, 12 Feb 2018 18:19:10 +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 A2CF03E129B; Mon, 12 Feb 2018 18:13:18 +0000 (UTC) Received: from one.mxroute.com (unknown [100.96.25.39]) (Authenticated sender: 5xi41l16bi) by relay.mailchannels.net (Postfix) with ESMTPA id 467343E2805; Mon, 12 Feb 2018 18:13:17 +0000 (UTC) X-Sender-Id: 5xi41l16bi|x-authuser|stephen@that.guru Received: from one.mxroute.com (one-outgoing.mxroute.com [172.18.55.173]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.13.1); Mon, 12 Feb 2018 18:13:18 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: 5xi41l16bi|x-authuser|stephen@that.guru X-MailChannels-Auth-Id: 5xi41l16bi X-Eight-Tangy: 6db2e8e31e923e0f_1518459197711_2185083757 X-MC-Loop-Signature: 1518459197711:2382560171 X-MC-Ingress-Time: 1518459197706 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zj03Gl/SRkv7GIlqwhAnbiQ8OepNJZJOWYwM8NEsJw0=; b=DDh1mS7EJcnIgVKoDWizt5ku0p fCUT+l3JO1CaYXr0wI+KRyvF+i12gBtfdca7t2OBfBgm8jYS0ALA1A53JlONz5Fc3hyY6+PjwmSj8 o4uR7gmkcABf4LzovlGZ9Uur0W0q4cGGUnKqtIaqTETTG/89B5uJGh4S8Ip9R0CNm3xmMTRy0tmuO ColeydKS/089O2f43LJ8SIZ2p06tsQzhVNrsX/32bczvMsnRHlEbd/nEi4z7gVpEfJCb3HbEzSA4N Xo62EoPmh6pA6nqNnQmbeqHagEKrWEDUks6fvb7QEhR9BnmDwT0HxkPaYXK3AAyYNrtS1seiIrFAs SWKzZqbQ==; From: Stephen Finucane To: dev@openvswitch.org Date: Mon, 12 Feb 2018 18:13:01 +0000 Message-Id: <20180212181306.6674-4-stephen@that.guru> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180212181306.6674-1-stephen@that.guru> References: <20180212181306.6674-1-stephen@that.guru> X-AuthUser: stephen@that.guru X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 3/8] doc: Move additional sections to "physical ports" doc 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 The "vdev", "hotplugging", and "Rx checksum offload" sections only apply to 'dpdk' ports and are too detailed to include in a high-level howto. Move them, reworking some aspects of this in the process. Signed-off-by: Stephen Finucane --- Documentation/howto/dpdk.rst | 93 +++------------------------------------ Documentation/topics/dpdk/phy.rst | 91 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 87 deletions(-) diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst index c2324118d..4d993a0eb 100644 --- a/Documentation/howto/dpdk.rst +++ b/Documentation/howto/dpdk.rst @@ -57,8 +57,12 @@ usage is suggested:: $ ovs-vsctl add-port br0 dpdk-p1 -- set Interface dpdk-p1 type=dpdk \ options:dpdk-devargs="class=eth,mac=00:11:22:33:44:55:02" -Note: such syntax won't support hotplug. The hotplug is supposed to work with -future DPDK release, v18.05. +.. 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`. 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 @@ -236,16 +240,6 @@ largest frame size supported by Fortville NIC using the DPDK i40e driver, but larger frames and other DPDK NIC drivers may be supported. These cases are common for use cases involving East-West traffic only. -Rx Checksum Offload -------------------- - -By default, DPDK physical ports are enabled with Rx checksum offload. - -Rx checksum offload can offer performance improvement only for tunneling -traffic in OVS-DPDK because the checksum validation of tunnel packets is -offloaded to the NIC. Also enabling Rx checksum may slightly reduce the -performance of non-tunnel traffic, specifically for smaller size packet. - .. _extended-statistics: Extended & Custom Statistics @@ -278,81 +272,6 @@ Note about "Extended Statistics": vHost ports supports only partial statistics. RX packet size based counter are only supported and doesn't include TX packet size counters. -.. _port-hotplug: - -Port Hotplug ------------- - -OVS supports port hotplugging, allowing the use of ports that were not bound -to DPDK when vswitchd was started. -In order to attach a port, it has to be bound to DPDK using the -``dpdk_nic_bind.py`` script:: - - $ $DPDK_DIR/tools/dpdk_nic_bind.py --bind=igb_uio 0000:01:00.0 - -Then it can be attached to OVS:: - - $ ovs-vsctl add-port br0 dpdkx -- set Interface dpdkx type=dpdk \ - options:dpdk-devargs=0000:01:00.0 - -Detaching will be performed while processing del-port command:: - - $ ovs-vsctl del-port dpdkx - -Sometimes, the del-port command may not detach the device. -Detaching can be confirmed by the appearance of an INFO log. -For example:: - - INFO|Device '0000:04:00.1' has been detached - -If the log is not seen, then the port can be detached using:: - -$ ovs-appctl netdev-dpdk/detach 0000:01:00.0 - -Detaching can be confirmed by console output:: - - Device '0000:04:00.1' has been detached - -.. warning:: - Detaching should not be done if a device is known to be non-detachable, as - this may cause the device to behave improperly when added back with - add-port. The Chelsio Terminator adapters which use the cxgbe driver seem - to be an example of this behavior; check the driver documentation if this - is suspected. - -This feature does not work with some NICs. -For more information please refer to the `DPDK Port Hotplug Framework -`__. - -.. _vdev-support: - -Vdev Support ------------- - -DPDK provides drivers for both physical and virtual devices. Physical DPDK -devices are added to OVS by specifying a valid PCI address in 'dpdk-devargs'. -Virtual DPDK devices which do not have PCI addresses can be added using a -different format for 'dpdk-devargs'. - -Typically, the format expected is 'eth_' where 'x' is a -unique identifier of your choice for the given port. - -For example to add a dpdk port that uses the 'null' DPDK PMD driver:: - - $ ovs-vsctl add-port br0 null0 -- set Interface null0 type=dpdk \ - options:dpdk-devargs=eth_null0 - -Similarly, to add a dpdk port that uses the 'af_packet' DPDK PMD driver:: - - $ ovs-vsctl add-port br0 myeth0 -- set Interface myeth0 type=dpdk \ - options:dpdk-devargs=eth_af_packet0,iface=eth0 - -More information on the different types of virtual DPDK PMDs can be found in -the `DPDK documentation -`__. - -Note: Not all DPDK virtual PMD drivers have been tested and verified to work. - EMC Insertion Probability ------------------------- By default 1 in every 100 flows are inserted into the Exact Match Cache (EMC). diff --git a/Documentation/topics/dpdk/phy.rst b/Documentation/topics/dpdk/phy.rst index 222fa3e9f..507dac869 100644 --- a/Documentation/topics/dpdk/phy.rst +++ b/Documentation/topics/dpdk/phy.rst @@ -119,3 +119,94 @@ utilize is a requirement in order to deliver the high-performance possible with the DPDK datapath. It is possible to configure multiple Rx queues for ``dpdk`` ports, thus ensuring this is not a bottleneck for performance. For information on configuring PMD threads, refer to :doc:`pmd`. + +Rx Checksum Offload +------------------- + +By default, DPDK physical ports are enabled with Rx checksum offload. + +Rx checksum offload can offer performance improvement only for tunneling +traffic in OVS-DPDK because the checksum validation of tunnel packets is +offloaded to the NIC. Also enabling Rx checksum may slightly reduce the +performance of non-tunnel traffic, specifically for smaller size packet. + +.. _port-hotplug: + +Hotplugging +----------- + +OVS supports port hotplugging, allowing the use of physical ports that were not +bound to DPDK when ovs-vswitchd was started. + +.. warning:: + + This feature is not compatible with all NICs. Refer to vendor documentation + for more information. + +.. important:: + + Ports must be bound to DPDK. Refer to :ref:`dpdk-binding-nics` for more + information. + +To *hotplug* a port, simply add it like any other port:: + + $ ovs-vsctl add-port br0 dpdkx -- set Interface dpdkx type=dpdk \ + options:dpdk-devargs=0000:01:00.0 + +Ports can be detached using the ``del-port`` command:: + + $ ovs-vsctl del-port dpdkx + +This should both delete the port and detach the device. If successful, you +should see an ``INFO`` log. For example:: + + INFO|Device '0000:04:00.1' has been detached + +If the log is not seen then the port can be detached like so:: + + $ ovs-appctl netdev-dpdk/detach 0000:01:00.0 + +.. warning:: + + Detaching should not be done if a device is known to be non-detachable, as + this may cause the device to behave improperly when added back with + add-port. The Chelsio Terminator adapters which use the cxgbe driver seem + to be an example of this behavior; check the driver documentation if this + is suspected. + +For more information please refer to the `DPDK Port Hotplug Framework`__. + +__ http://dpdk.org/doc/guides/prog_guide/port_hotplug_framework.html#hotplug + +.. _vdev-support: + +vdev Support +------------ + +DPDK provides drivers for both physical and virtual devices. Physical DPDK +devices are added to OVS by specifying a valid PCI address in ``dpdk-devargs``. +Virtual DPDK devices which do not have PCI addresses can be added using a +different format for ``dpdk-devargs``. + +.. note:: + + Not all DPDK virtual PMD drivers have been tested and verified to work. + +To add a virtual ``dpdk`` devices, the ``dpdk-devargs`` argument should be of +the format ``eth_``, where ``x``' is a unique identifier of +your choice for the given port. For example to add a ``dpdk`` port that uses +the ``null`` DPDK PMD driver, run:: + + $ ovs-vsctl add-port br0 null0 -- set Interface null0 type=dpdk \ + options:dpdk-devargs=eth_null0 + +Similarly, to add a ``dpdk`` port that uses the ``af_packet`` DPDK PMD driver, +run:: + + $ ovs-vsctl add-port br0 myeth0 -- set Interface myeth0 type=dpdk \ + options:dpdk-devargs=eth_af_packet0,iface=eth0 + +More information on the different types of virtual DPDK PMDs can be found in +the `DPDK documentation`__. + +__ http://dpdk.org/doc/guides/nics/overview.html