From patchwork Mon Jun 29 09:50:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriharsha Basavapatna X-Patchwork-Id: 1318816 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.136; helo=silver.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=openvswitch.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=G7khE2zb; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49wNF74Swxz9sQx for ; Mon, 29 Jun 2020 19:56:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C3CE925E5D; Mon, 29 Jun 2020 09:56:57 +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 W7XLWbkX4qnE; Mon, 29 Jun 2020 09:56:55 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 6FADA25E17; Mon, 29 Jun 2020 09:56:55 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5406BC07FF; Mon, 29 Jun 2020 09:56:55 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 61C31C016E for ; Mon, 29 Jun 2020 09:56:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4E3668883F for ; Mon, 29 Jun 2020 09:56:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lLNDSDXJF-5I for ; Mon, 29 Jun 2020 09:56:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qv1-f67.google.com (mail-qv1-f67.google.com [209.85.219.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8006488710 for ; Mon, 29 Jun 2020 09:56:53 +0000 (UTC) Received: by mail-qv1-f67.google.com with SMTP id di5so2412303qvb.11 for ; Mon, 29 Jun 2020 02:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LDTBbaiTxe4UuPLAwQZcuSRK5csM/oCCqRAzK9bnZaE=; b=G7khE2zb7LNooGCUcFNj8EsGF90zLX/odIcc6VqrcDiLvlJGunEuaxrajCljcaREif gHWSaDA6rMHk+tkxnrbQegkfdnHuAXGfj5xKk3hoNvaA/O5K5+lWRAX5errxddlc2sQO 4v1imuEf8nRSK8KDerHUMSvf0Y4HrAyg2uuBI= 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:mime-version :content-transfer-encoding; bh=LDTBbaiTxe4UuPLAwQZcuSRK5csM/oCCqRAzK9bnZaE=; b=E3JzNba1M6QraPPSlkOAAlofW6bFw60DJVmvfJNAges78cQOzIEi6oFUVmM3rvhAmO 7lgknHoXsKlFSoKUVeMI0zUu1NFR8mUeHnw2O2QDVFebXdUrKZNfAcDgUTG2+eyseXGA Qotzj/t4LFTYTr9DJkt0JVC44d4Yz8CUeUXJrrH7RAiVtnhziNme1b+sqjTp2cOYPyr7 K3ers3qshDbuV2djrmDhvKmdN+n2CUhxvqOmG2/rbochiXofXRbD4lqwgU5TltJ00H05 fMc41SfDyLDlDcBtByxSRD+YTb6lSKtZ0YNcWMYKGfLCR6Uk50lKCSJUkqm9XvnByIPH 9CPg== X-Gm-Message-State: AOAM5308gk0DETWZBTsgLJmj6XIKQJsyEb9tQCorj4h+BXl/hYYsKhNk tqY+j61hWAA716e9J87mZC1ExgXDP3EP8266ZyHF1njefnmqmXYh1Y+PleFqrjCfxmzpFVdxAwv OkvPnpaQVKWiySHYd//yx8dnFmegEVWaJOTL0UFaD3YJraPtdl5XY+qmJklgIO5bRIkkfoq/CGO CDvZyUg6c= X-Google-Smtp-Source: ABdhPJwPhFrwsZkAR7+DeWdWpLQD80aYADdy7CD98uqk+wL4iGj+QxBCAlvjTC0qGHSZ5ayDDAWThg== X-Received: by 2002:a17:902:7241:: with SMTP id c1mr4928984pll.79.1593424230999; Mon, 29 Jun 2020 02:50:30 -0700 (PDT) Received: from dhcp-10-123-153-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id mr8sm1227888pjb.5.2020.06.29.02.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 02:50:30 -0700 (PDT) To: dev@openvswitch.org Date: Mon, 29 Jun 2020 05:50:15 -0400 Message-Id: <20200629095020.8491-1-sriharsha.basavapatna@broadcom.com> X-Mailer: git-send-email 2.25.0.rc2 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH v4 0/5] netdev datapath: Partial action 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: , X-Patchwork-Original-From: Sriharsha Basavapatna via dev From: Sriharsha Basavapatna Reply-To: Sriharsha Basavapatna Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Hi, This patchset extends the "Partial HW acceleration" mode to offload a part of the action processing to HW, instead of offloading just lookup (MARK/RSS), for "vhost-user" ports. This is referred to as "Partial Action Offload". This mode does not require SRIOV/switchdev configuration. In this mode, forwarding (output) action is still performed by OVS-DPDK SW datapath. Note: This patchset utilizes the full-offload framework available in OVS-DPDK to offload specific actions to HW. In this initial patchset we support offloading of VXLAN encap action. The changes are based on the VXLAN encap full-offload patchset currently being reviewed on ovs-dev: https://mail.openvswitch.org/pipermail/ovs-dev/2020-June/371854.html Thanks, -Harsha ****** v3-->v4: - Removed mega-ufid mapping code from dpif-netdev (patch #5) and updated the existing mega-ufid mapping code in netdev-offload-dpdk to support partial action offload. v2-->v3: - Added more commit log comments in the refactoring patch (#1). - Removed wrapper function for should_partial_offload_egress(). - Removed partial offload check for output action in parse_flow_actions(). - Changed patch sequence (skip-encap and get-stats before offload patch). - Removed locking code (details in email), added inline comments. - Moved mega-ufid mapping code from skip-encap (#3) to the offload patch (#5). v1-->v2: Fixed review comments from Eli: - Revamped action list parsing to reject multiple clone/output actions - Updated comments to reflect support for single clone/output action - Removed place-holder function for ingress partial action offload - Created a separate patch (#2) to query dpdk-vhost netdevs - Set transfer attribute to 0 for partial action offload - Updated data type of 'dp_flow' in 'dp_netdev_execute_aux' - Added a mutex to synchronize between offload and datapath threads - Avoid fall back to mark/rss when egress partial offload fails - Drop count action for partial action offload Other changes: - Avoid duplicate offload requests for the same mega-ufid (from PMD threads) - Added a coverage counter to track pkts with tnl-push partial offloaded - Fixed dp_netdev_pmd_remove_flow() to delete partial offloaded flow ****** Sriharsha Basavapatna (5): dpif-netdev: Refactor dp_netdev_flow_offload_put() netdev-dpdk: provide a function to identify dpdk-vhost netdevs dpif-netdev: Skip encap action during datapath execution dpif-netdev: Support flow_get() with partial-action-offload dpif-netdev: Support partial-action-offload of VXLAN encap flow lib/dpif-netdev.c | 330 ++++++++++++++++++++++++++++++++------ lib/netdev-dpdk.c | 5 + lib/netdev-dpdk.h | 1 + lib/netdev-offload-dpdk.c | 78 ++++++--- lib/netdev-offload.h | 2 + 5 files changed, 352 insertions(+), 64 deletions(-)