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 ED10B4301F for ; Thu, 10 Aug 2023 02:12:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E661440DD8; Thu, 10 Aug 2023 02:12:07 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2046.outbound.protection.outlook.com [40.107.101.46]) by mails.dpdk.org (Postfix) with ESMTP id 4A8BE406B6 for ; Thu, 10 Aug 2023 02:12:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gLswtG9e1bKuuwUIQgWC+vI60yPc8iXcKEd/abzPwsYWYF9EuHybCh3rkslLihuWjYjIiECcOcw+9Hqigws1tQh5mQISCFYDLXoxU0T8fGTF5OCLsBNtFrEGSRa2hKflD8hxSwswu053NWpWzksn9gkMnMxh3Uv4k6KWnPIOhUUdFMcjNBWqDS3T897lRiOw+azD0ZAQ7m37NJXkiVohd5IZIJqMosr/UShg0RCJ0UPt6Zkq1w0FmmneGMzQ+FfFW8U2IKItxiA4/tbwQHmF9LocNidyu7dJWlg0G1TU0G3b9xd40U33MrDIf7yNgAv/GdtPS0CRaN5oPWeNQ9IkiA== 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=YUyDJJG7MFUpEHjH2NJD00Bj7rBlhNydtn2Vlq1oenQ=; b=Bi8p2GX01eQ59tQwOIX5KiTiGcgQj8bqpcWQbyaYn5NfCtwJ3JiJQoWVy/Qgp3vU1xVyDwTfTnj8crAOIjAH4njKPl6M+Yp3mnxfpNPhI3OrNrGGtUNDTG5dUmjJ29+SkV5Ogda8I/8JY1ygOVrLi4LQZ/CHaMi97OpI62iRboTGstyXHunHHAjPYbXM8NEk4rDXqgJvfCqktU6quGmRQifPnusls3Xqtiuas+rYVR2Sf1zsQUlXnVh4mxQtgzVCKiuyrb3SDYohWUh0Pb0s0PrOxBy9ZNLG14UTfgcCmg5UU+fl/vbxfIZo13o9MGBUu2HFU6PFbvmEBhRMFjjluA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org 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=YUyDJJG7MFUpEHjH2NJD00Bj7rBlhNydtn2Vlq1oenQ=; b=EiKcTtxg9aC4NZpkURqy5BszCJN+zGKDeR5d5s6E7Lwg/Qvw0Hl4TB/QeriJ5lud6uq4rpsWy3QRQHeXaCOVZCSF2TRoC5xbMf9+bF0F0Te7quFO8186lHJOlKaVqrBq0lDoIwSg3hMvxhvCYzm2BMLhZ8GfWuVC9Lp3wy9vrIiyRT57IEsQSsUsQSMvQjCUdemscObDqC/8BxPsnv81oRBMdMNvvlSmidmtqvGMAx7NFwB0CmeI2z19DtFt+REmeHkJQZJvPa7jurVxMLGTcPwuTXhkhQALE/7F2IW1wSqJW1KUVQ3dO+C62Jt8oK3G7jArYDskdiUyW0b/qeJVcA== Received: from PH7PR17CA0034.namprd17.prod.outlook.com (2603:10b6:510:323::12) by DS7PR12MB5864.namprd12.prod.outlook.com (2603:10b6:8:7b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Thu, 10 Aug 2023 00:12:04 +0000 Received: from SA2PEPF000015C9.namprd03.prod.outlook.com (2603:10b6:510:323:cafe::b7) by PH7PR17CA0034.outlook.office365.com (2603:10b6:510:323::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.28 via Frontend Transport; Thu, 10 Aug 2023 00:12:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SA2PEPF000015C9.mail.protection.outlook.com (10.167.241.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.20 via Frontend Transport; Thu, 10 Aug 2023 00:12:03 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Wed, 9 Aug 2023 17:11:49 -0700 Received: from nvidia.com (10.126.231.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; Wed, 9 Aug 2023 17:11:47 -0700 From: Xueming Li To: Bing Zhao CC: Ori Kam , dpdk stable Subject: patch 'net/mlx5: fix validation for conntrack indirect action' has been queued to stable release 22.11.3 Date: Thu, 10 Aug 2023 08:10:32 +0800 Message-ID: <20230810001045.2662-12-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230810001045.2662-1-xuemingl@nvidia.com> References: <20230625063544.11183-1-xuemingl@nvidia.com> <20230810001045.2662-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015C9:EE_|DS7PR12MB5864:EE_ X-MS-Office365-Filtering-Correlation-Id: b66ddf9f-f7a9-457c-6e47-08db99366ce6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LEv2X44j5bvjp3nIMQLmvyuNWfuolkfe+ZLDFQq8cgKRcNRkVTr9OFjCRFGmgSaPIhxxdyVuTzblzUKJOYJfsH4zjEdfG0IitAs7bjP+wqqzzitdo5QuKCbEDvTlU+JYyW6DkfYHzA4tbEZPkiLgC7COl/MSGkON0w/ozxC6aDhChqtatzj+6hjv3bxlwu7BZmEEsl0fUbjcjkTgVIndgZSXZPNdDFCQAjHqfQUXlvOzdvBJwmnxidugh+NRzBbhHlQ5RSSjs7+d1L1+NR1K2xtIJ5M0lVtZy0pp3ETM7BeIMfdsxs9Sy8+TK9F9LzibcQZGGL16WT+kzoWQBgbOPb2dsvczPWppNu0tcYQiaQy9srRdhK8PuKhKITHkZvLt9bVw9+Aw1aZvfCn81dE/LAEegIb7rRQtfE+UpBiMJHDKaAB1rB+7UtVsWD91CUfR2nwUiP9vRfQhBf0ueC3AQfLRTJ1UfRVRkaEyxtAojA0XznGJAZ4HGbHKN7ajon5gfhIfc5MX73Tgo4X70NUVSrOG6EmWc9Q6X1cHFRwAboTEUkgONXYNYHw0426BSIRhz3acpUd9pbmE2CnLp8F7uG/aqKCLVcNTESTiJhRaM8u42Gy9Sl352wPMF2Z3xfDB6N3DXxECIvLq8x40QTjBgH+yfIg+2v7YxEf2wedo1o+gYt2iryP34qPm4wzpRNj6enVMmqSuAH+AUmxwnoHspkqtnN4pPgP+fATQm/B3BgpJTGW1Anm3w5buIH8tydzxwltge0WnS0qtGu/eW9JEuw== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(376002)(396003)(136003)(1800799006)(186006)(82310400008)(451199021)(40470700004)(46966006)(36840700001)(41300700001)(356005)(7636003)(82740400003)(8936002)(8676002)(6862004)(316002)(86362001)(5660300002)(70206006)(70586007)(6636002)(4326008)(36860700001)(83380400001)(47076005)(37006003)(54906003)(426003)(2616005)(478600001)(336012)(1076003)(26005)(16526019)(6286002)(36756003)(2906002)(53546011)(6666004)(40460700003)(7696005)(966005)(55016003)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2023 00:12:03.6131 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b66ddf9f-f7a9-457c-6e47-08db99366ce6 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF000015C9.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5864 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/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/commit/?h=22.11-staging&id=0495e8506e9682fe63ec77b3b294a00c9611b19f Thanks. Xueming Li --- >From 0495e8506e9682fe63ec77b3b294a00c9611b19f Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Tue, 18 Jul 2023 16:32:12 +0300 Subject: [PATCH] net/mlx5: fix validation for conntrack indirect action Cc: Xueming Li [ upstream commit a9156d685fa1b8927f68606c69521c5eae3184a2 ] After rte_flow_shared_action_* API was replaced with rte_flow_action_handle_* API, one input parameter of the update interface was also changed. A generic pointer was used instead of the "const struct rte_flow_action *" pointer. In the entrance of mlx5 PMD callback for update, the validation is called for all indirect actions. But for conntrack type, the pointer is no longer with rte_flow_action pointer type and it will cause an incorrect casting and error. The content for updating should only be validated when needed. It should skip the validation in the entrance. Right now, the content was already added before updating the hardware by WQE. So the type of the indirect action should be checked before calling the action validate function. When creating a new conntrack object, the validation is still needed since all the content will be used to update the hardware context. Fixes: 4b61b8774be9 ("ethdev: introduce indirect flow action") Signed-off-by: Bing Zhao Acked-by: Ori Kam --- drivers/net/mlx5/mlx5_flow.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index b98dc9ffb2..e3ca7b6093 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -10132,9 +10132,18 @@ mlx5_action_handle_update(struct rte_eth_dev *dev, const struct mlx5_flow_driver_ops *fops = flow_get_drv_ops(flow_get_drv_type(dev, &attr)); int ret; + uint32_t act_idx = (uint32_t)(uintptr_t)handle; + uint32_t type = act_idx >> MLX5_INDIRECT_ACTION_TYPE_OFFSET; - ret = flow_drv_action_validate(dev, NULL, - (const struct rte_flow_action *)update, fops, error); + switch (type) { + case MLX5_INDIRECT_ACTION_TYPE_CT: + ret = 0; + break; + default: + ret = flow_drv_action_validate(dev, NULL, + (const struct rte_flow_action *)update, + fops, error); + } if (ret) return ret; return flow_drv_action_update(dev, handle, update, fops, -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-08-09 21:51:21.084133500 +0800 +++ 0115-net-mlx5-fix-validation-for-conntrack-indirect-actio.patch 2023-08-09 21:51:18.284352000 +0800 @@ -1 +1 @@ -From a9156d685fa1b8927f68606c69521c5eae3184a2 Mon Sep 17 00:00:00 2001 +From 0495e8506e9682fe63ec77b3b294a00c9611b19f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit a9156d685fa1b8927f68606c69521c5eae3184a2 ] @@ -26 +28,0 @@ -Cc: stable@dpdk.org @@ -35 +37 @@ -index 4b567f61dd..9bd92f28fd 100644 +index b98dc9ffb2..e3ca7b6093 100644 @@ -38 +40 @@ -@@ -10753,9 +10753,18 @@ mlx5_action_handle_update(struct rte_eth_dev *dev, +@@ -10132,9 +10132,18 @@ mlx5_action_handle_update(struct rte_eth_dev *dev,