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 0F8D643E57 for ; Sat, 13 Apr 2024 14:55:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A45940DCD; Sat, 13 Apr 2024 14:55:42 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2054.outbound.protection.outlook.com [40.107.220.54]) by mails.dpdk.org (Postfix) with ESMTP id CB36340294 for ; Sat, 13 Apr 2024 14:55:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cRtSi/p0Y7ACIfj1btb3Qj2G64RYJI2lcjQTx2OA0ozkp3hMlcj6isFLK6JnlfzCQSen8DRYydzevF8lZ7nQelQXxxb7UiOAyAlcYYDz8gM3BWYgDJTFlLPeXCSKV2QnO3eNONkTbgsnPgfF9xPPjiRNut7Rd6NRq1g/UH0/MAbZ5355WNNEhVNEGM2oZxCxoDjTgog4vRE1ejWP/EHp0NULEfOEMZEA1SSC+/53exXSyR6vKyawJ9C7DlLJQUO1lUAjQNVQ6ghPEDzVYt3D+taRicFXNKg3Izil0Sv7oIerekwTpdCe3MWoDufC/5MtAtaeT38vuetZw0FXWd+Jig== 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=+gLOoo7cErIlA1N1ZBnYIZBRS8xqqDkpJoR8c8/u8GQ=; b=gbGIQfs0WwsyK/Evc/XQZXJJEdwqbf5hUPJjEwcnvh5HiUlQRpw97WCM0Q3mAoWNDJG1jmThVzGKFOpuMlcp4lD/2jo35evvyQb/RP3GJ0aUW2uxNSGCTqLBuQTtGayfOT1OSaP/CDHKiQfW58ovnIOyI7ODbdS3tUcaUFLkfYchuE+uYeuuWXlGxURprGdHB0IyJtdoz8sgT8o+f7BTN3pgFw4XW9ETEhzpQLLFEDfFdHsxxZc4sb0eJokiYONac7G5TeVgGfsv0W/6LcoGyTcgOXM/mhX6pbwkcADNCiK+RMrv/6uROI4LOFoKeQvLSL4OnH+5HZDECpDqBIOuSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 (0) 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=+gLOoo7cErIlA1N1ZBnYIZBRS8xqqDkpJoR8c8/u8GQ=; b=KoYrR3HbYRIok2fEvK7lrnJ7WPq/8EomBZvY9M4eUmo5MXBdBUGgQ9o+ExMA6XwSzBj/95YlevqOpiAcpxT//CZ3NCMBV/kluVvzgIcTnuTgf6tPYtdufzFa5Kz7ITYH9wSOeiYDQH6yGoOa8nkz0BiSjybdARp4UlozCf/MwwUXXQhLatNv5jcZLGuZf5rL9a/Ks0TsJXso9EvIfBf1UdCaixPash+Tb04uBa7EzUr6nz78NowEhKiiCn869abpZMxgH7Y/WWm5VBfx3cmhiUpwm7csGGjWuX8QIJCDHUJJYYaUqitfJsoodkaFHkw0YGKqgmCDPFQrHB/Po95nHA== Received: from CH5P222CA0015.NAMP222.PROD.OUTLOOK.COM (2603:10b6:610:1ee::13) by SN7PR12MB6816.namprd12.prod.outlook.com (2603:10b6:806:264::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Sat, 13 Apr 2024 12:55:37 +0000 Received: from DS3PEPF0000C37D.namprd04.prod.outlook.com (2603:10b6:610:1ee:cafe::3c) by CH5P222CA0015.outlook.office365.com (2603:10b6:610:1ee::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.30 via Frontend Transport; Sat, 13 Apr 2024 12:55:36 +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 DS3PEPF0000C37D.mail.protection.outlook.com (10.167.23.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:55:36 +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.41; Sat, 13 Apr 2024 05:55:22 -0700 Received: from nvidia.com (10.126.230.35) 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.1258.12; Sat, 13 Apr 2024 05:55:20 -0700 From: Xueming Li To: Gregory Etelson CC: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix parameters verification in HWS table create' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:48:58 +0800 Message-ID: <20240413125005.725659-58-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF0000C37D:EE_|SN7PR12MB6816:EE_ X-MS-Office365-Filtering-Correlation-Id: d1c5c642-9498-4724-cc1e-08dc5bb903be X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ldSX74zur2P4FBjIc5j8zD5M4XHhdX+5g+HPYh3jcKThBWKgOb3iYkPHuozsYrG3jkV4pRcYovHwy1LU4YLhUWoTS4vSZ2eeasMaNWsiiKZE+saPDJiUNKBPqUbaTzRaEKSqI7tUGLOXcKJ0P+siJn8dyOyN/VYmmmT0ygu4tCZ03wNlszej9R3Rk8QrFTl7QlyS4z99evtwuig4AzZSUNKChDpo/WRV4WhmY2z3Xs6WCszhmp3myYjG/pYYhv0kCiyX9SmVVJGOa0W/gRb+RSjEgnLZ+1MvLbRypgtb4GDkuWNQrHimzUfPcWO0uYv1FKm7JAijMllSqxB35FQY/fA8QWdkf+uNqa4XvQEdkPdTNcDwe2CT51aT1Ijcip5vqjs87SHFAeUqxoPVOFmkhlbRW4kddEfT3R8L2zytlbJyu7PJW+EfFnSAXBSymGm9nZUX26nrKT2D6cLNcx90yEnyISyiZRnSuODYnjqwDvRRRLJil85Wk3SC/yorI4OK0buAIKcFN8A7PtF3rK3olOAKmUU6S1Eu1df47mbvQgqHOCFME5vK6Qie5yPI83hPkdnGdyqlEpYPOti1BhFtPFb5P0QGJMfNB/H+reAeURYZ+FunlXHCIu0y8nqS99fyji810/bcS6N5px5mOeNr6YT3FTQ2ohc3Xj2y5pXhtfrBV4ytX616chvWwYPs1G+Rn9SouPwQYte6jKrcM8cpaJqOw6RH2gThbmDsNh6JMKO9cCuE1YA/gr+JNeDNA9KW 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:(13230031)(36860700004)(82310400014)(376005)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:55:36.7962 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d1c5c642-9498-4724-cc1e-08dc5bb903be 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: DS3PEPF0000C37D.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6816 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 23.11.1 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/15/24. 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=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b90c42e4ff19cd494711152d52dabd0abdce4692 Thanks. Xueming Li --- >From b90c42e4ff19cd494711152d52dabd0abdce4692 Mon Sep 17 00:00:00 2001 From: Gregory Etelson Date: Wed, 28 Feb 2024 15:33:10 +0200 Subject: [PATCH] net/mlx5: fix parameters verification in HWS table create Cc: Xueming Li [ upstream commit 075796dcc692b50a7b3e89cf969210171d09a06c ] Modified the conditionals in `flow_hw_table_create()` to use bitwise AND instead of equality checks when assessing `table_cfg->attr->specialize` bitmask. This will allow for greater flexibility as the bitmask may encapsulate multiple flags. The patch maintains the previous behavior with single flag values, while providing support for multiple flags. Fixes: 240b77cfcba5 ("net/mlx5: enable hint in async flow table") Signed-off-by: Gregory Etelson Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_flow_hw.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 4927975461..93035c8548 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -4368,12 +4368,23 @@ flow_hw_table_create(struct rte_eth_dev *dev, matcher_attr.rule.num_log = rte_log2_u32(nb_flows); /* Parse hints information. */ if (attr->specialize) { - if (attr->specialize == RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_WIRE_ORIG) - matcher_attr.optimize_flow_src = MLX5DR_MATCHER_FLOW_SRC_WIRE; - else if (attr->specialize == RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_VPORT_ORIG) - matcher_attr.optimize_flow_src = MLX5DR_MATCHER_FLOW_SRC_VPORT; - else - DRV_LOG(INFO, "Unsupported hint value %x", attr->specialize); + uint32_t val = RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_WIRE_ORIG | + RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_VPORT_ORIG; + + if ((attr->specialize & val) == val) { + DRV_LOG(INFO, "Invalid hint value %x", + attr->specialize); + rte_errno = EINVAL; + goto it_error; + } + if (attr->specialize & + RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_WIRE_ORIG) + matcher_attr.optimize_flow_src = + MLX5DR_MATCHER_FLOW_SRC_WIRE; + else if (attr->specialize & + RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_VPORT_ORIG) + matcher_attr.optimize_flow_src = + MLX5DR_MATCHER_FLOW_SRC_VPORT; } /* Build the item template. */ for (i = 0; i < nb_item_templates; i++) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:06.830815337 +0800 +++ 0058-net-mlx5-fix-parameters-verification-in-HWS-table-cr.patch 2024-04-13 20:43:04.997753931 +0800 @@ -1 +1 @@ -From 075796dcc692b50a7b3e89cf969210171d09a06c Mon Sep 17 00:00:00 2001 +From b90c42e4ff19cd494711152d52dabd0abdce4692 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 075796dcc692b50a7b3e89cf969210171d09a06c ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 74a3133c13..76783145cf 100644 +index 4927975461..93035c8548 100644 @@ -27 +29 @@ -@@ -4397,12 +4397,23 @@ flow_hw_table_create(struct rte_eth_dev *dev, +@@ -4368,12 +4368,23 @@ flow_hw_table_create(struct rte_eth_dev *dev,