From patchwork Thu Jan 9 07:46:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Britstein X-Patchwork-Id: 1220187 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=mellanox.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 47tdVx406cz9s1x for ; Thu, 9 Jan 2020 18:47:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2118E87E09; Thu, 9 Jan 2020 07:47:19 +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 IrHid3CJRIH4; Thu, 9 Jan 2020 07:47:18 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 52C0187CB2; Thu, 9 Jan 2020 07:47:18 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 278FCC1796; Thu, 9 Jan 2020 07:47:18 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 39694C0881 for ; Thu, 9 Jan 2020 07:47:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 22E9E85D70 for ; Thu, 9 Jan 2020 07:47:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KkLfylihVgK9 for ; Thu, 9 Jan 2020 07:47:15 +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 fraxinus.osuosl.org (Postfix) with ESMTP id 9B59985B11 for ; Thu, 9 Jan 2020 07:47:14 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from elibr@mellanox.com) with ESMTPS (AES256-SHA encrypted); 9 Jan 2020 09:47:12 +0200 Received: from dev-r-vrt-215.mtr.labs.mlnx. (dev-r-vrt-215.mtr.labs.mlnx [10.212.215.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0097lCHB014600; Thu, 9 Jan 2020 09:47:12 +0200 From: Eli Britstein To: dev@openvswitch.org, Ilya Maximets Date: Thu, 9 Jan 2020 07:46:37 +0000 Message-Id: <20200109074655.1104-1-elibr@mellanox.com> X-Mailer: git-send-email 2.14.5 Cc: Simon Horman , Eli Britstein , Ameer Mahagneh Subject: [ovs-dev] [PATCH V7 00/18] netdev datapath actions offload 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: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Currently, netdev datapath offload only accelerates the flow match sequence by associating a mark per flow. This series introduces the full offload of netdev datapath flows by having the HW also perform the flow actions. This series adds HW offload for output, drop, set MAC, set IPv4 and set TCP/UDP ports actions using the DPDK rte_flow API. v1 Travis passed: https://travis-ci.org/elibritstein/OVS/builds/614511472 v2 Travis passed: https://travis-ci.org/elibritstein/OVS/builds/619262148 v3 Travis passed: https://travis-ci.org/elibritstein/OVS/builds/622253870 v4 Travis passed: https://travis-ci.org/elibritstein/OVS/builds/625654160 v5 Travis passed: https://travis-ci.org/elibritstein/OVS/builds/626692202 v6 Travis passed: https://travis-ci.org/elibritstein/OVS/builds/627132194 v7 Travis passed: https://travis-ci.org/elibritstein/OVS/builds/634603553 v1-v2: - fallback to mark/rss in case of any failure of action offload. - dp_layer changed to "in_hw" in case the flow is offloaded. - using netdev_ports_get instead of dp_netdev_lookup_port in stats reading. - using flow_dump_next API instead of a new API. - validity checks for last action of output and clone. - count action should be done for drop as well. - validity check for output action. - added doc in Documentation/howto/dpdk.rst. v2-v3: - removed refactoring for netdev-offload-dpdk-flow.c file. - dropped flush commits. - dbg prints rate-limited, and outside lock. - added validity check for output action - same flow_api handle for both netdevs. - added a mutex to protect possible concurrent deletion/querying of a flow. - statistics are collected using flow_get API. - added more documentation in Documentation/howto/dpdk.rst. v3-v4: - debug prints moved to netdev-offload-dpdk.c. - flow get returns full stats, not diff. - removed additional fields from offload_info and dp_netdev_flow. - read HW stats during dpif_netdev_flow_get as well as dpif_netdev_flow_dump_next. - moved actions offload framework just before support commit. - fixed memory leak in rewrite code. - dropped clone commit - will be posted in next series. v4-v5: - statistics collecting changed to populate dp_layer and offloaded attributes. dp_layer changed to "dpdk" for fully offloaded by dpdk. - display offloaded:partial for partially offloaded flows. - support filter types "dpdk" and "partially-offloaded" in dpctl/dump-flows type=X. - simplify code readability of rewrite commits. v5-v6: - debug prints improvement for partial offload installations. dbg prints for failed actions, warn for other failure. - fixed memory leak in case retrieved dpdk port-id is invalid. v6-v7: - rebase to support explicit drop action. - fix dpctl/dump-flows issues discovered by make check-offloads. Eli Britstein (17): netdev-offload-dpdk: Refactor flow patterns netdev-offload-dpdk: Refactor action items freeing scheme netdev-offload-dpdk: Dynamically allocate pattern items netdev-offload-dpdk: Improve HW offload flow debuggability netdev-dpdk: Introduce rte flow query function netdev-offload-dpdk: Return UFID-rte_flow entry in find method netdev-offload-dpdk: Framework for actions offload netdev-offload-dpdk: Implement flow get method dpctl: Support dump-flows filters "dpdk" and "partially-offloaded" dpif-netdev: Populate dpif class field in offload struct netdev-dpdk: Getter function for dpdk port id API netdev-offload: Introduce a function to validate same flow api handle netdev-offload-dpdk: Support offload of output action netdev-offload-dpdk: Support offload of drop action netdev-offload-dpdk: Support offload of set MAC actions netdev-offload-dpdk: Support offload of set IPv4 actions netdev-offload-dpdk: Support offload of set TCP/UDP ports actions Ophir Munk (1): dpif-netdev: Update offloaded flows statistics Documentation/howto/dpdk.rst | 21 +- NEWS | 5 + lib/dpctl.c | 28 +- lib/dpctl.man | 2 + lib/dpif-netdev.c | 81 +++- lib/netdev-dpdk.c | 48 +++ lib/netdev-dpdk.h | 8 + lib/netdev-offload-dpdk.c | 967 ++++++++++++++++++++++++++++++++---------- lib/netdev-offload-provider.h | 1 + lib/netdev-offload.c | 12 + 10 files changed, 927 insertions(+), 246 deletions(-)