From patchwork Thu Apr 19 12:57:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 901030 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="tJF4Rewj"; 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 40RfHv3WMCz9s1w for ; Thu, 19 Apr 2018 23:01:15 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 10E1CD62; Thu, 19 Apr 2018 12:57:59 +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 9C21BCE2 for ; Thu, 19 Apr 2018 12:57:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from glass.birch.relay.mailchannels.net (glass.birch.relay.mailchannels.net [23.83.209.70]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CAAD16ED for ; Thu, 19 Apr 2018 12:57:50 +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 1FE085C2718; Thu, 19 Apr 2018 12:57:50 +0000 (UTC) Received: from one.mxroute.com (unknown [100.96.32.20]) (Authenticated sender: 5xi41l16bi) by relay.mailchannels.net (Postfix) with ESMTPA id 909F75C2924; Thu, 19 Apr 2018 12:57:48 +0000 (UTC) X-Sender-Id: 5xi41l16bi|x-authuser|stephen@that.guru Received: from one.mxroute.com (one-outgoing.mxroute.com [172.18.50.112]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.14.1); Thu, 19 Apr 2018 12:57:50 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: 5xi41l16bi|x-authuser|stephen@that.guru X-MailChannels-Auth-Id: 5xi41l16bi X-Stretch-Minister: 092525863e6a8a8d_1524142669191_1527065991 X-MC-Loop-Signature: 1524142669191:2762972999 X-MC-Ingress-Time: 1524142669190 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=3+QX7rtHCxrpfcWho/cwBrX85RgOHvUTAZXswMlqMkI=; b=tJF4Rewj6gqYCQb2CfRmFSaTn9 asPpsvXg9LarBx+Sjx8NKSF7KJmxLDZpQm4as5L2ZM6Sr+IepVXWP1nMlhHilItdz9eWtVXfLV5qL 5aEJOleXtQ7HQFKMHzSZn0y/8ZDOwK0gzJmRHs+rRv5L7hnoF0JR/XTkQpJ19rtFDI1Cn7eWK0z9D Hba7tDu9DniVm3ijTJYHCF6botNdQ7W0AnNBZ54TCIItHmYnJ2rBTPLDRakFWibeFhkwsbZlt3tvY YRHrap1Yjx62a6nufLO+GtZ9Pf6D5zRZ71mfgRM0uPxCL1kGmOEpN/RPAltUXHXzSY6SDmp3PEA4/ 8U7Scinw==; From: Stephen Finucane To: dev@openvswitch.org Date: Thu, 19 Apr 2018 13:57:24 +0100 Message-Id: <20180419125729.15198-5-stephen@that.guru> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180419125729.15198-1-stephen@that.guru> References: <20180419125729.15198-1-stephen@that.guru> 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 v3 4/9] doc: Add "vdev" topic document 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 These are separate things from physical, ring and vhost-user interfaces and deserve their own documents. A couple of small typos are fixed along the way. Signed-off-by: Stephen Finucane --- v3: - Add new files to automake.mk - Add 'versionchanged' directive to call out when this was added --- Documentation/automake.mk | 1 + Documentation/howto/dpdk.rst | 29 ------------------ Documentation/topics/dpdk/index.rst | 1 + Documentation/topics/dpdk/vdev.rst | 61 +++++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 29 deletions(-) create mode 100644 Documentation/topics/dpdk/vdev.rst diff --git a/Documentation/automake.mk b/Documentation/automake.mk index 878de4349..3056e527a 100644 --- a/Documentation/automake.mk +++ b/Documentation/automake.mk @@ -37,6 +37,7 @@ DOC_SOURCE = \ Documentation/topics/dpdk/phy.rst \ Documentation/topics/dpdk/pmd.rst \ Documentation/topics/dpdk/ring.rst \ + Documentation/topics/dpdk/vdev.rst \ Documentation/topics/dpdk/vhost-user.rst \ Documentation/topics/testing.rst \ Documentation/topics/high-availability.rst \ diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst index 531612880..9cb76b7e1 100644 --- a/Documentation/howto/dpdk.rst +++ b/Documentation/howto/dpdk.rst @@ -244,35 +244,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. -.. _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/index.rst b/Documentation/topics/dpdk/index.rst index 4b4dc119a..c1e6ea78c 100644 --- a/Documentation/topics/dpdk/index.rst +++ b/Documentation/topics/dpdk/index.rst @@ -34,4 +34,5 @@ The DPDK Datapath /topics/dpdk/phy /topics/dpdk/vhost-user /topics/dpdk/ring + /topics/dpdk/vdev /topics/dpdk/pmd diff --git a/Documentation/topics/dpdk/vdev.rst b/Documentation/topics/dpdk/vdev.rst new file mode 100644 index 000000000..31894530b --- /dev/null +++ b/Documentation/topics/dpdk/vdev.rst @@ -0,0 +1,61 @@ +.. + Copyright 2018, Red Hat, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); you may + not use this file except in compliance with the License. You may obtain + a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations + under the License. + + Convention for heading levels in Open vSwitch documentation: + + ======= Heading 0 (reserved for the title in a document) + ------- Heading 1 + ~~~~~~~ Heading 2 + +++++++ Heading 3 + ''''''' Heading 4 + + Avoid deeper levels because they do not render well. + +==================== +DPDK Virtual Devices +==================== + +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. + +.. versionadded:: 2.7.0 + +Quick Example +------------- + +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