From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 823B8428F8 for ; Sun, 9 Apr 2023 17:31:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D11F4114A; Sun, 9 Apr 2023 17:31:38 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2062.outbound.protection.outlook.com [40.107.243.62]) by mails.dpdk.org (Postfix) with ESMTP id AA54341156 for ; Sun, 9 Apr 2023 17:31:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ICSYFz4zi7DxnqjqQFmrrb9S+vQKibT2t7UgCyUo3M4e3jB/4wkhtf2S33KnnyiwU93GxpgqV1WaIL/J5qzBceBNLr8x2K/CvMFC+QlK5X7S+61V/bfhJBdSteJALOOzVyrXEzciuy/E2S/9ZxBd+Ite/e+l8SZWNaryOF1dRC+QLxLUoTL5u7mnih3S+Zf/RUat6m/9Z4AmaCrB8kGIGz4XRK6PXKTcI2lekuZSH0MUEuYc/rbmZRU8lByqcTcd23jWWBBNZMZ2Nd1IB9HN03HVlxB/vU/+A+zfyLGRDA0lC0X3/MOr58Ffd5Rh4vGC64GS4qqqxAc0fqObVAwVdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zZ2Kop9bhxecxiL3Lpm68AX3UwCUrYZ6i9tHUEeyvjs=; b=BZX+b5EUmNC5skMMP9VA91a4eLKm/0Fl3C9ujWApErJYxjZS+6+e5ByfDUsHqyZQb1MwKAZzV1X8yKiAWDg91tE9WUOJD99tVHyDbgcObvRDDbQVoQS5zXl1RGQyF2HvjD0JLKOteBCoPAQnuylllnbdp/ANhV1e9Vr8O88T6I4fHqtFBcZpK54ZoGBr2ss702aj27lTNK58NAQPjEnQl5BJuSh58wxcx7990snbYhSVCBHL4zK6bbAwOrZpNuDzHB/IIBZV/RS+Ir09X1tokiIYrgSyRsT+/isbYvZhZpZ/lQq3dogI/ITf0gbZWfz1yTbxp37il++SO/JPqq0Nqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=arknetworks.am smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zZ2Kop9bhxecxiL3Lpm68AX3UwCUrYZ6i9tHUEeyvjs=; b=dugoYq03xSUTQwp2AgdHi35qGCgii8Wmq1wBZDfaH4HSXTpVett8MDXH4ibneTHemTDY7UGDrM2firfPqw650Gek/M4nHbcKNlrKoXLNrvbh6F4kJiL5/3exTW36R/ezSRFteW/zPcBEJj/7ve3kwN4oqoforgDNz0eMjN8C6xVQ9XqRPinpL64MQ8NCH8rvUhfSONo8MfDv7zWDDr+OA38hmha+9qtSiexg5xMDMIuUaJBdInydW4Dicz/ub25Kkh0Ttkl7vvFBRJKTP9mNdebYqQO91tTUCSZB3Ks0DNoAjme5Rj6yphA4zvi1xQ9k1mOI8alEjrwGshUVBqkCog== Received: from DM5PR08CA0036.namprd08.prod.outlook.com (2603:10b6:4:60::25) by PH8PR12MB6769.namprd12.prod.outlook.com (2603:10b6:510:1c4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.34; Sun, 9 Apr 2023 15:31:32 +0000 Received: from DM6NAM11FT081.eop-nam11.prod.protection.outlook.com (2603:10b6:4:60:cafe::99) by DM5PR08CA0036.outlook.office365.com (2603:10b6:4:60::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.39 via Frontend Transport; Sun, 9 Apr 2023 15:31:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DM6NAM11FT081.mail.protection.outlook.com (10.13.172.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.25 via Frontend Transport; Sun, 9 Apr 2023 15:31:31 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 9 Apr 2023 08:31:16 -0700 Received: from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 9 Apr 2023 08:31:14 -0700 From: Xueming Li To: Ivan Malov CC: Andy Moreton , Andrew Rybchenko , dpdk stable Subject: patch 'common/sfc_efx/base: add MAE mark reset action' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:24:13 +0800 Message-ID: <20230409152529.5308-66-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230409152529.5308-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT081:EE_|PH8PR12MB6769:EE_ X-MS-Office365-Filtering-Correlation-Id: a002c35d-ee7e-4f79-fa42-08db390f7ea8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TTAoKND3Xf61qXswuRecjUAY1W6HHIgbr2zOlJsLgph2ZBdPbVgIimLaw81+ME7i6nMVQWPIsRhyGYx3FyspUOzO64Wcstk3SenYXL32rhBL3W3CcRIzC+4WtZt8XPyxG1zj5veMHzqN7wuiXeF6gArsZmFhrR0DbiFf3o31lcKLETajcI+EXIn80gP5QtNygIuwTZHeIUSbQ3VkFQexe7Fpeegofot2yaVKQlvhX1Ih20siO0jvNOxFoNI0r0TmZyLKvWgf4LJ6shuebi/bbbBBaOdIXKt+GOg/F/gX6yxrBkRPXBuN3j77pGgU2t8zg2aMHQHx8g/qWBDfEdYZr5TGIfyjl6cuSMJoLsW0uPb5YgE/e2zkrlD/Vb5rGrQmXcCIuwg8EpKKBcTOezlSckeruMrmEhfp1hhA+OSMP7WmrK3Gp6La75OdmGRiN6nEt4aiNaWZz+LXAtcGp7p+GxFiMbfVNmb7oenL9t0fjichi/apchQXyoWwcOA0veTK09s+HrMMLbeXBHP+wqzdaz3vUEur5pPhoGN2IjIyjpVNY8wwAmjWXGbOw/SjhJqsy/mfkoXlctRpOHQLAjXADJCRJ7084OYihidYrkGwQIwgGhFjxvuNVkvXy/g8DUvvMVDxe/XYbTKdNxgBvPJHf5Jhh7aQPHK3xDw/CO8Ud9g2UVqMiyKgrsCoRrZbIfn2QbnFy+sIbbIx9V/W9Pi3r9xnULk3sj7LWq0RC31QEYFMEVsw8uDT9gcaXmefXqMNclaz5xfMZObB9sIpz9uN2PiksAcW3K2sVxDVwTslAJCTLUNkFVy3s0lRBub9vHZqxBLkgVbdo9trI4AZQvGZsA== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(39860400002)(376002)(396003)(451199021)(46966006)(36840700001)(40470700004)(86362001)(36756003)(316002)(41300700001)(70586007)(8676002)(4326008)(6916009)(966005)(7696005)(70206006)(54906003)(478600001)(40480700001)(55016003)(82310400005)(5660300002)(2906002)(8936002)(36860700001)(82740400003)(356005)(7636003)(16526019)(6286002)(186003)(53546011)(1076003)(26005)(336012)(2616005)(426003)(47076005)(83380400001)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:31:31.3946 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a002c35d-ee7e-4f79-fa42-08db390f7ea8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT081.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6769 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/f6bdbdf6f2f9a7149d4442eb932fa88f6edea2bd Thanks. Xueming Li --- >From f6bdbdf6f2f9a7149d4442eb932fa88f6edea2bd Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Thu, 9 Mar 2023 08:28:41 +0400 Subject: [PATCH] common/sfc_efx/base: add MAE mark reset action Cc: Xueming Li [ upstream commit 13d3f0d2ffeac7308f72fed56b2c8c545ac73fa5 ] Previously, DPDK sfc driver received support for tunnel offload. In it, MAE needs to set intermediate mark from an outer rule (OR) recirculation ID in order to help the driver identify packets that hit the OR but miss on action rule (AR) lookup. But, for packets that do hit an AR, the driver wants to reset this mark so that the end receiver of traffic does not see it. The driver has a call to request such mark reset, but it does not work as it comes via the regular mark populate API, which must not be invoked after final delivery action has been added. Provide a suitable dedicated API for that. Fixes: 3a73dcfdb255 ("common/sfc_efx/base: match on recirc ID in action rules") Signed-off-by: Ivan Malov Reviewed-by: Andy Moreton Acked-by: Andrew Rybchenko --- drivers/common/sfc_efx/base/efx.h | 18 ++++++++++++++++++ drivers/common/sfc_efx/base/efx_mae.c | 12 ++++++++++++ drivers/common/sfc_efx/version.map | 1 + 3 files changed, 31 insertions(+) diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index 92ec18761b..f4fa88f169 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -4582,6 +4582,24 @@ efx_mae_action_set_populate_mark( __in efx_mae_actions_t *spec, __in uint32_t mark_value); +/* + * Whilst efx_mae_action_set_populate_mark() can be used to request setting + * a user mark in matching packets and demands that the request come before + * setting the final destination (deliver action), this API can be invoked + * after deliver action has been added in order to request mark reset if + * the user's own mark request has not been added as a result of parsing. + * + * It is useful when the driver chains an outer rule (OR) with an action + * rule (AR) by virtue of a recirculation ID. The OR may set mark from + * this ID to help the driver identify packets that hit the OR and do + * not hit the AR. But, for packets that do hit the AR, the driver + * wants to reset the mark value to avoid confusing recipients. + */ +LIBEFX_API +extern void +efx_mae_action_set_populate_mark_reset( + __in efx_mae_actions_t *spec); + LIBEFX_API extern __checkReturn efx_rc_t efx_mae_action_set_populate_deliver( diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c index 31f51b5548..7732d99992 100644 --- a/drivers/common/sfc_efx/base/efx_mae.c +++ b/drivers/common/sfc_efx/base/efx_mae.c @@ -1916,6 +1916,18 @@ efx_mae_action_set_populate_mark( EFX_MAE_ACTION_MARK, sizeof (mark_value), arg)); } + void +efx_mae_action_set_populate_mark_reset( + __in efx_mae_actions_t *spec) +{ + uint32_t action_mask = (1U << EFX_MAE_ACTION_MARK); + + if ((spec->ema_actions & action_mask) == 0) { + spec->ema_actions |= action_mask; + spec->ema_mark_value = 0; + } +} + __checkReturn efx_rc_t efx_mae_action_set_populate_deliver( __in efx_mae_actions_t *spec, diff --git a/drivers/common/sfc_efx/version.map b/drivers/common/sfc_efx/version.map index a54aab0a08..aabc354118 100644 --- a/drivers/common/sfc_efx/version.map +++ b/drivers/common/sfc_efx/version.map @@ -103,6 +103,7 @@ INTERNAL { efx_mae_action_set_populate_encap; efx_mae_action_set_populate_flag; efx_mae_action_set_populate_mark; + efx_mae_action_set_populate_mark_reset; efx_mae_action_set_populate_set_dst_mac; efx_mae_action_set_populate_set_src_mac; efx_mae_action_set_populate_vlan_pop; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:40.444680300 +0800 +++ 0065-common-sfc_efx-base-add-MAE-mark-reset-action.patch 2023-04-09 21:45:38.669042200 +0800 @@ -1 +1 @@ -From 13d3f0d2ffeac7308f72fed56b2c8c545ac73fa5 Mon Sep 17 00:00:00 2001 +From f6bdbdf6f2f9a7149d4442eb932fa88f6edea2bd Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 13d3f0d2ffeac7308f72fed56b2c8c545ac73fa5 ] @@ -22 +24,0 @@ -Cc: stable@dpdk.org