From patchwork Wed Aug 21 22:48:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 1151190 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mmKGbPiN"; 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 46DNBb5Hh9z9s4Y for ; Thu, 22 Aug 2019 08:49:11 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 3202EE47; Wed, 21 Aug 2019 22:49:08 +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 8D446DD5 for ; Wed, 21 Aug 2019 22:49:07 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4CD44F8 for ; Wed, 21 Aug 2019 22:49:07 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id w11so1690737plp.5 for ; Wed, 21 Aug 2019 15:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=55cimv82Mzym7JIQF8Awy7tKYnoAz2eEa/urTcFJWzU=; b=mmKGbPiNaZZM4+gpHKidcTCe9pBmM5OVMyVZn266eZBktQsEbye8RMQ5Du2VJzUVm8 88ytztbKueFn5Yi3keFqdUoCcIq96ovQXFjlK3KRx6EZC7Ug8HbF4cD9whlkzTlVxU7l cye9odJA6AZUVXZLjRMJvMwcX9ASbuveQ0OpbVSxpDW2zHVnQx9EWsOIGsJS4M8ttjnr KazuX3KxqdNkfNik2/x3YGLrBLqiwH4/DH2oPg8hHswYov/qY6fsfSG7V5JD/XBQZG55 dFTjNsJj0dLRE8jDUsXwlAZ1QYv7F0LnL9p5UcECzBPsM4hvKOIiJSBgAxcqS9u7XCHz SWHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=55cimv82Mzym7JIQF8Awy7tKYnoAz2eEa/urTcFJWzU=; b=hzThi/00JzKZoG3l31ydDB1TpUOOWWZSjF+HZVkEGD8oRW1Ov05oCjPZpxnmVi2uYY MYdjKJ5wT5yKUBf5xuAdafIl6iwcYNKNJnMF5gaKtc0E3127ojY3KYFEJNpWSCArnXQN CMO/c7/ZyjSW6YCINnYchcJxMjFzpv93+cZdARAOG2jPkhSmkzgU379eLyaRMfmlge9e 82iO99a+MqW7dzcxIlGI0Z8RPVoG1jOUMCEFSWsdsdCSGGlB9ozrWhpkN8pU5NRRLDoC jxCYCrfbEkGIEH1P2vZMvUoL8RKm0u3ltI3qSna5gvXDhBGHxgulm1pf97XUL+jJ0mzU 53mA== X-Gm-Message-State: APjAAAXBKX/x+2b2CgWy7GpW6BHZkh9jIk4UFjx3OT/PsYFlOmLg7qZA JfYLgUpZBL1UTipfyorY/iYVKV0y X-Google-Smtp-Source: APXvYqxDvSNeAm/5IEHWf6qpGkqLdiUWO/LE+zGhP3QxplQEtZBMwdUKin/oZTwbmh9PIC6TTUYAxw== X-Received: by 2002:a17:902:6a:: with SMTP id 97mr36455042pla.257.1566427746497; Wed, 21 Aug 2019 15:49:06 -0700 (PDT) Received: from sc9-mailhost3.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id x25sm26729961pfa.90.2019.08.21.15.49.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Aug 2019 15:49:06 -0700 (PDT) From: William Tu To: dev@openvswitch.org Date: Wed, 21 Aug 2019 15:48:15 -0700 Message-Id: <1566427695-122598-1-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: i.maximets@samsung.com Subject: [ovs-dev] [PATCH] Docs: Add DPDK AF_XDP PMD use case. 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 Add command lines for using DPDK's AF_XDP PMD driver. Signed-off-by: William Tu --- Documentation/intro/install/afxdp.rst | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst index 820e9d993d8f..c3e03b40f3b5 100644 --- a/Documentation/intro/install/afxdp.rst +++ b/Documentation/intro/install/afxdp.rst @@ -426,6 +426,42 @@ In the namespace, run drop or bounce back the packet:: ip netns exec at_ns0 ./xdp_rxq_info --dev p0 --action XDP_TX +Using DPDK's AF_XDP PMD driver +------------------------------ +Another way to use AF_XDP is to enable DPDK and use DPDK's AF_XDP +driver. First, enable the AF_XDP PMD config at DPDK's +config/common_base file by:: + + CONFIG_RTE_LIBRTE_PMD_AF_XDP=y + +and recompile the DPDK source. Then, compile OVS with DPDK:: + + ./configure --with-dpdk= + +Start ovs-vswitchd and initilize DPDK:: + + ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true + +Finally, assume eth2 and eth3 are the physical NIC, AF_XDP port can +be added by:: + + ovs-vsctl add-port br0 afxdp-p0 -- set int afxdp-p0 type=dpdk \ + options:dpdk-devargs=vdev:net_af_xdp0,iface=eth2 \ + start_queue=0,queue_count=1 + ovs-vsctl add-port br0 afxdp-p1 -- set int afxdp-p1 type=dpdk \ + options:dpdk-devargs=vdev:net_af_xdp1,iface=eth3 \ + start_queue=0,queue_count=1 + +Execute ovs-vsctl show:: + + Bridge "br0" + datapath_type: netdev + Port "afxdp-p0" + Interface "afxdp-p0" + type: dpdk + options: {dpdk-devargs="vdev:net_af_xdp,iface=eth2"} + + Bug Reporting -------------