From patchwork Wed Dec 9 13:48:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Britstein X-Patchwork-Id: 1413433 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CrdhM52dYz9sW9 for ; Thu, 10 Dec 2020 00:49:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CBEDD87AC9; Wed, 9 Dec 2020 13:49:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id stJM+JPZP6u3; Wed, 9 Dec 2020 13:49:35 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 30AEE87AEC; Wed, 9 Dec 2020 13:49:16 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0BCDFC1834; Wed, 9 Dec 2020 13:49:16 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id B0F9FC1DA5 for ; Wed, 9 Dec 2020 13:49:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9786F2E2D1 for ; Wed, 9 Dec 2020 13:49:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r-ByBT4UluI5 for ; Wed, 9 Dec 2020 13:49:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by silver.osuosl.org (Postfix) with ESMTP id F2C71273FC for ; Wed, 9 Dec 2020 13:48:57 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from elibr@nvidia.com) with SMTP; 9 Dec 2020 15:48:52 +0200 Received: from nvidia.com (dev-r-vrt-214.mtr.labs.mlnx [10.212.214.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0B9DmqKw009915; Wed, 9 Dec 2020 15:48:52 +0200 From: Eli Britstein To: dev@openvswitch.org Date: Wed, 9 Dec 2020 13:48:18 +0000 Message-Id: <20201209134832.17998-1-elibr@nvidia.com> X-Mailer: git-send-email 2.28.0.546.g385c171 MIME-Version: 1.0 Cc: Eli Britstein , Oz Shlomo , Roni Bar Yanai , Ameer Mahagneh , Majd Dibbiny , Gaetan Rivet Subject: [ovs-dev] [PATCH RFC ovs 00/14] Netdev datapath VXLAN decap offload support X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" VXLAN decap in OVS-DPDK configuration consists of two flows: F1: in_port(ens1f0),eth(),ipv4(),udp(), actions:tnl_pop(vxlan_sys_4789) F2: tunnel(),in_port(vxlan_sys_4789),eth(),ipv4(), actions:ens1f0_0 F1 is a classification flow. It has outer headers matches and it classifies the packet as a VXLAN packet, and using tnl_pop action the packet continues processing in F2. F2 is a flow that has matches on tunnel metadata as well as on the inner packet headers (as any other flow). In order to fully offload VXLAN decap path, both F1 and F2 should be offloaded. As there are more than one flow in HW, it is possible that F1 is done by HW but F2 is not. Packet is received by SW, and should be processed starting from F2 as F1 was already done by HW. Rte_flows are applicable only on physical port IDs. Vport flows (e.g. F2) are applied on uplink ports attached to OVS. This patch-set makes use of [1] introduced in DPDK 20.11, that adds API for tunnel offloads, and based on top of [2] and [3]. It is posted as an RFC until they are merged. [1] https://mails.dpdk.org/archives/dev/2020-October/187314.html [2] https://patchwork.ozlabs.org/project/openvswitch/list/?series=218063 [3] https://patchwork.ozlabs.org/project/openvswitch/list/?series=217966 Eli Britstein (12): netdev-offload: Add HW miss packet state recover API netdev-dpdk: Introduce DPDK tunnel APIs netdev-offload-dpdk: Implement flow dump create/destroy APIs netdev-dpdk: Add flow_api support for netdev vxlan vports netdev-offload-dpdk: Implement HW miss packet recover for vport dpif-netdev: Add HW miss packet state recover logic netdev-offload-dpdk: Support tunnel pop action netdev-offload-dpdk: Refactor offload rule creation netdev-dpdk: Introduce an API to query if a dpdk port is an uplink port netdev-offload-dpdk: Consider netdev for mapping offload objects netdev-offload-dpdk: Support vports flows offload netdev-dpdk-offload: Add vxlan pattern matching function Ilya Maximets (2): netdev-offload: Allow offloading to netdev without ifindex. netdev-offload: Disallow offloading to unrelated tunneling vports. Documentation/howto/dpdk.rst | 1 + NEWS | 2 + lib/dpif-netdev.c | 49 ++- lib/netdev-dpdk.c | 138 ++++++ lib/netdev-dpdk.h | 99 ++++- lib/netdev-offload-dpdk.c | 789 +++++++++++++++++++++++++++++----- lib/netdev-offload-provider.h | 5 + lib/netdev-offload-tc.c | 8 + lib/netdev-offload.c | 29 +- lib/netdev-offload.h | 1 + 10 files changed, 992 insertions(+), 129 deletions(-)