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 9062BA0548 for ; Sun, 28 Nov 2021 16:02:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 801D34068A; Sun, 28 Nov 2021 16:02:09 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2066.outbound.protection.outlook.com [40.107.237.66]) by mails.dpdk.org (Postfix) with ESMTP id 2A6AE4068A for ; Sun, 28 Nov 2021 16:02:08 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iUQHYt6m1CVGbPfahMlC/WaC9GtlIazkcLkk1dN3UVL2Tbnw5RxdftJYk6b2ICFKYxd12z5YOa2rnh6V4rJmftUGbSfFfTBlwohfDcXEO/CxWi4HpGsWz+QGldvyE8Bi88EMhXKHpjHd+BHSgzOYDryKuB/XjEpnkZNpDd6koazHX8xBcsO4ww1DAUe/jbt+sRlyzoXILaiMIVeGiNEgNhTbA23QJlJjYFbu0Dp/OFj7oxLTP4kU6yk3kWPRFs+lfMhOe9K99el/u03s4oZPsAtNfmCos4TrIabrp/1M4HqkhKMBRhC2/6VngzSnuoQJuvMQbdMaPSVQCDghPwCpcA== 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=zbjDqk7PTAtE3rjcGC/6SgcJ/sGG82eLYtYzV+KW4w8=; b=OO8wMRfGX/IJGp++GUBXDpdPTFAJq6lYpchck65qZ6BiVtug7ksw8Ig95QFqC9X1dNu30a+snuRMX2wZ+IXU6mslw9RNtMSbrzTHUb9/KrK1d6iV++TCg0VKiWfHIWW/QYu1TXBMnOoiFm7AnUwauE04BtPTKlZGL7kEbdRykSYuHta/E5MaRQVNTuaQE+6s1+C+mhM6/45ZW+ocgEXrjTw2AfvAUXOXJg0iMdnI3vHMe/Kj0ugiNWWE6rcvqdvAH76iBH09a6ciEsVBU7wnCHpJRP/CyLwgfjgV/RSCwLx09njgN5G783Ts/0Hh122mBpXGcQgTi+/NAV6fTdbaYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=zbjDqk7PTAtE3rjcGC/6SgcJ/sGG82eLYtYzV+KW4w8=; b=YKqJfabZcaj/Icdi9ZEEL4Lo03iXlW169+RohxZ0xXemYX/wbKTm9eKaJAJ7Ng+TKzcuBMJM+ysTlmm0vta38H/q6Q2N8cqHZUtPeipggk2AKBtXEk0x0l59xAeFg5WeRvQHhB4/49kRi3A/a0U5ZIWoCuJeO802Tf9Malak92Y96iFoXYvWCEUXF9fAmPLuyc+GFYqUVgoF+zwbySlO2NVzQ+HCp+PZRvyj7Ia4nvdZpfsceUpwuL1zZoHcEgPpPHZ4yLkcFBuMZQgSyoJrDpUn2LI8uEV0uGtFDTCAHqriiZhE5ORMbZmJgGOswZbPIMMjwD2iWsCKCX7zMQq05A== Received: from BN1PR10CA0001.namprd10.prod.outlook.com (2603:10b6:408:e0::6) by BN6PR1201MB0130.namprd12.prod.outlook.com (2603:10b6:405:59::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.20; Sun, 28 Nov 2021 15:02:06 +0000 Received: from BN8NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e0:cafe::36) by BN1PR10CA0001.outlook.office365.com (2603:10b6:408:e0::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.19 via Frontend Transport; Sun, 28 Nov 2021 15:02:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT026.mail.protection.outlook.com (10.13.177.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Sun, 28 Nov 2021 15:02:06 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 28 Nov 2021 15:02:04 +0000 From: Xueming Li To: Jiawei Wang CC: Luca Boccassi , Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix metadata and meter split shared tag' has been queued to stable release 20.11.4 Date: Sun, 28 Nov 2021 22:54:09 +0800 Message-ID: <20211128145423.3974892-66-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211128145423.3974892-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> <20211128145423.3974892-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ffca671-2cd3-4f45-8c38-08d9b2800b62 X-MS-TrafficTypeDiagnostic: BN6PR1201MB0130: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cJM+odjEq1cby3YFyEjbDzhuaatXoFEYPUfpmUQOQwMMSMnGf8ZNl9UKfP4197wZMMO6DHRla/4vEcHWwCDYCJCLskTrylKDalmNL1uhJ8xXYzAJSZBcHNHJRcbv2TIJFqMZ7eghgei00BCiDj6COIxDQiwfAmCb685MMt0EcY/u1RCf4k51I/AJSyYmqUYNSSf89dVzKJ02QzrcOjw95JBCWMGlm5RhGQmmWjcKzZVY3lZjszd0q01XF2imageU+ss7M1aRmzSPckmpfUaNfH4eXIpXh/aJHE6ERr9dVz++XiYgCueLeIgcZyJqHbR/F6Dzh7vWi7wnOPHxCtrY3jY0MWkKGaucpRcq975iHNRlsjU72X+H3cuIflGs0gb8vtQiys7AbdeWED5GKKqQfJlGe3t62/qt0TBwcr8qrtLDD9H8xfjwWQqguibp2sc9J9lJNIUWc5aZMa9iHHCiL+PWHnQjhDH8HllyBK5VEBjrLEMCogregZouZcXfZV16z5TwJu2ILCBkewe1qihSHXkJ069oXo9ThIUyrEPVZd5pr1mb1XlyUiQFQSbew1OZdsAB2IjihnQI3FkA4Pbzf888fUy44s3sOwT4Z1u/sYeC0e3QaEkLjU3Ry5VscDjuDCVW+C2VN34PbzhWK6mmkOnVwFXsPvCfX0ZF9CUWpvgoW2pCMH5olNQtQ0RdoL6lpW+urfyHl1lZbrW0HWmD3La3/kKXs5bHxtjfspyhtQOFaEqOPb/+pAgtIuFORcaEV6qUmfPdiS4ULK5fv2mo0qytxNLTWtqVDk5uXT7AYy/e3uXpnx4cC5YOag6PchY+YWKPkLD+59SYE5zNiFyhfQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(426003)(82310400004)(53546011)(4001150100001)(2616005)(336012)(6636002)(55016003)(356005)(8676002)(7636003)(508600001)(966005)(7696005)(5660300002)(83380400001)(70206006)(36860700001)(6862004)(16526019)(86362001)(6286002)(4326008)(40140700001)(54906003)(36756003)(47076005)(186003)(70586007)(1076003)(316002)(37006003)(2906002)(8936002)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2021 15:02:06.4642 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ffca671-2cd3-4f45-8c38-08d9b2800b62 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0130 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 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/21. 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://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/32255ff0fe19aedcb65775a8242718b168b8b4bf Thanks. Xueming Li --- >From 32255ff0fe19aedcb65775a8242718b168b8b4bf Mon Sep 17 00:00:00 2001 From: Jiawei Wang Date: Fri, 19 Nov 2021 15:02:00 +0200 Subject: [PATCH] net/mlx5: fix metadata and meter split shared tag Cc: Xueming Li [ upstream commit 16f4aa57ca381c4283826cdfce2cd4e172744ca7 ] In the metadata flow split, PMD created the prefix subflow with removed Queue or RSS action and appended the set tag and copy table jump actions. If the flow being split for metadata was the meter prefix subflow, the driver supposed to share the same meter split tag action for the metadata split flow. There was the wrong check for preceding meter split tag action, causing append with metadata split set tag action and resulting the meter suffix subflow was missed due to tag value mismatch. This patch adds the checking before copying into extend action list, to make sure the correct shared tag is used. Fixes: 8d72fa668964 ("net/mlx5: share tag between meter and metadata") Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 2533a9102e..ba5ad7b87d 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -4415,6 +4415,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev, * Pointer to the Q/RSS action. * @param[in] actions_n * Number of original actions. + * @param[in] mtr_sfx + * Check if it is in meter suffix table. * @param[out] error * Perform verbose error reporting if not NULL. * @@ -4427,7 +4429,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev, struct rte_flow_action *split_actions, const struct rte_flow_action *actions, const struct rte_flow_action *qrss, - int actions_n, struct rte_flow_error *error) + int actions_n, int mtr_sfx, + struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; struct mlx5_rte_flow_action_set_tag *set_tag; @@ -4442,15 +4445,15 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev, * - Add jump to mreg CP_TBL. * As a result, there will be one more action. */ - ++actions_n; memcpy(split_actions, actions, sizeof(*split_actions) * actions_n); + /* Count MLX5_RTE_FLOW_ACTION_TYPE_TAG. */ + ++actions_n; set_tag = (void *)(split_actions + actions_n); /* - * If tag action is not set to void(it means we are not the meter - * suffix flow), add the tag action. Since meter suffix flow already - * has the tag added. + * If we are not the meter suffix flow, add the tag action. + * Since meter suffix flow already has the tag added. */ - if (split_actions[qrss_idx].type != RTE_FLOW_ACTION_TYPE_VOID) { + if (!mtr_sfx) { /* * Allocate the new subflow ID. This one is unique within * device and not shared with representors. Otherwise, @@ -4483,6 +4486,12 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev, MLX5_RTE_FLOW_ACTION_TYPE_TAG, .conf = set_tag, }; + } else { + /* + * If we are the suffix flow of meter, tag already exist. + * Set the QUEUE/RSS action to void. + */ + split_actions[qrss_idx].type = RTE_FLOW_ACTION_TYPE_VOID; } /* JUMP action to jump to mreg copy table (CP_TBL). */ jump = (void *)(set_tag + 1); @@ -4855,17 +4864,6 @@ flow_create_split_metadata(struct rte_eth_dev *dev, RTE_FLOW_ERROR_TYPE_ACTION, NULL, "no memory to split " "metadata flow"); - /* - * If we are the suffix flow of meter, tag already exist. - * Set the tag action to void. - */ - if (mtr_sfx) - ext_actions[qrss - actions].type = - RTE_FLOW_ACTION_TYPE_VOID; - else - ext_actions[qrss - actions].type = - (enum rte_flow_action_type) - MLX5_RTE_FLOW_ACTION_TYPE_TAG; /* * Create the new actions list with removed Q/RSS action * and appended set tag and jump to register copy table @@ -4873,7 +4871,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev, * in advance, because it is needed for set tag action. */ qrss_id = flow_mreg_split_qrss_prep(dev, ext_actions, actions, - qrss, actions_n, error); + qrss, actions_n, + mtr_sfx, error); if (!mtr_sfx && !qrss_id) { ret = -rte_errno; goto exit; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-28 22:41:06.558158347 +0800 +++ 0065-net-mlx5-fix-metadata-and-meter-split-shared-tag.patch 2021-11-28 22:41:03.413539290 +0800 @@ -1 +1 @@ -From 16f4aa57ca381c4283826cdfce2cd4e172744ca7 Mon Sep 17 00:00:00 2001 +From 32255ff0fe19aedcb65775a8242718b168b8b4bf Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 16f4aa57ca381c4283826cdfce2cd4e172744ca7 ] @@ -19 +21,0 @@ -Cc: stable@dpdk.org @@ -28 +30 @@ -index 43598f92ee..84e6f3048c 100644 +index 2533a9102e..ba5ad7b87d 100644 @@ -31 +33 @@ -@@ -5251,6 +5251,8 @@ exit: +@@ -4415,6 +4415,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev, @@ -40 +42 @@ -@@ -5263,7 +5265,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev, +@@ -4427,7 +4429,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev, @@ -50 +52 @@ -@@ -5278,15 +5281,15 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev, +@@ -4442,15 +4445,15 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev, @@ -71 +73 @@ -@@ -5319,6 +5322,12 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev, +@@ -4483,6 +4486,12 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev, @@ -84 +86 @@ -@@ -5773,17 +5782,6 @@ flow_create_split_metadata(struct rte_eth_dev *dev, +@@ -4855,17 +4864,6 @@ flow_create_split_metadata(struct rte_eth_dev *dev, @@ -102 +104 @@ -@@ -5791,7 +5789,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev, +@@ -4873,7 +4871,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev,