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 65DAE43E57 for ; Sat, 13 Apr 2024 14:54:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5FCA940294; Sat, 13 Apr 2024 14:54:18 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2075.outbound.protection.outlook.com [40.107.236.75]) by mails.dpdk.org (Postfix) with ESMTP id A7B2D400D6 for ; Sat, 13 Apr 2024 14:54:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c9SstQpmqYRDTuBwhS+RqVXLKliUBkWh5VpEwcJWpM/Qdo7aeiOBRdm0MQocV3+ni6n2dm44l1Q4riMHaXd1Z+mEFisQwGV87TStcqlFFHDt2AoH0hVbRfr1ppGyD86u2Dq40wfYnpz7AeVvNH5ktnaX7sq/o92AkrNudGcfxvo40yc4X7jVFk6x90J9QpQjDb5cJDCiiLa18Cwf4htYuPW0L4zX7o8io2Xih4huo/yk2R1hkAScmg7Dkyf2xIOTukg4QOrmlP3W0w7wgAzjgOzmWJQNzpmEoScxSN5wlgxwzLGejKMHEkdA14L4VnZQzb2+pIa24PPdC2vb/nLRpA== 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=40QSgtbBnMXugcjZu5hIwT68dGhc38J9b7xSY+KEAmM=; b=HiIVgKTMgLwoCAQaCc52XFrvDBxbBz+IZkB5TLrndlagJAAis4nqQjSpReRQKP5+a4wPY88d+IYjRhS9Rb7FQkOk+lY4CDTGg48b4lnnRM6o4vnBXT6MgjykAbxvDk2iajqgNOwYToHousjLvATDJpurLkljBZBJ3HLYUc4IosOxWSmY6cbcwzpUqpHKzpZBn2zrttaZ4mNdopquXmAQ2p6zbs3iCcEq5G+9jeaKMgPc33P0LV5Sk6qpdY6mwi1kn5eGP2Nji1nh64beMunRlTug+xceuqQ53zDJBK7N0VNoytyxQmtSDU40V50n9F+mqH50RP1FcqkaGcdzUsE2sA== 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=40QSgtbBnMXugcjZu5hIwT68dGhc38J9b7xSY+KEAmM=; b=mbI9HOlHD5ge5s5UmBjkgng5o3yHqoTh2ZPqTR1JI1Fzl+yI6QDDjkbp2Of0RA8vLNTQEpMItwR9no5VS63UdGyPx483ATc31glhLUuRcrUEVVlzwvkfr0sVOS4pTtwCVvxP2b77tQ6aJdwT9LFk0+M6cN56dkYZyQgD799PQkTpimf12U0QU8DiDFV8iMxedkoyJ3pvLpE9sIbYHwJqkAUlT84avs2OHLBiM5i/Qo5K7homgGuVXXy6OyFtrb7UIeVlxgacRxTMN4Fi7AkGdVX1u2KpNEZ2Nxu7aZ19CrDHk6c9PkvX/uZU9uJosgFhKesUNGeJ0Vv/ataNvpXUAQ== Received: from DM6PR07CA0115.namprd07.prod.outlook.com (2603:10b6:5:330::6) by PH0PR12MB7960.namprd12.prod.outlook.com (2603:10b6:510:287::12) 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:54:13 +0000 Received: from DS3PEPF0000C37F.namprd04.prod.outlook.com (2603:10b6:5:330:cafe::5a) by DM6PR07CA0115.outlook.office365.com (2603:10b6:5:330::6) 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:54:13 +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 DS3PEPF0000C37F.mail.protection.outlook.com (10.167.23.9) 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:54:13 +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:54:02 -0700 Received: from nvidia.com (10.126.231.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:54:00 -0700 From: Xueming Li To: Itamar Gozlan CC: Matan Azrad , dpdk stable Subject: patch 'net/mlx5/hws: skip item when inserting rules by index' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:48:45 +0800 Message-ID: <20240413125005.725659-45-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.231.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: DS3PEPF0000C37F:EE_|PH0PR12MB7960:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ac12441-d65b-4a19-a28e-08dc5bb8d21c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?rVq4jp8QJbshrALrYdT95fbC512x6/y6Az1XfolHIdqxchqvtFIS3G5tAWFI?= =?us-ascii?Q?jzZQdZfGeda+XuiVWsEwnx9xfiuvrh5Zkzw0zle4RrFl17N78D6hBSH0wx9S?= =?us-ascii?Q?BOi3YCMCuHlBwJMx9Q2vyno10Kz0fbPCVbaAlMjvRoljJ+AhNbk/LFec9sVj?= =?us-ascii?Q?exT6D7MFIggUQQvaQiFP3QCGNRDU3H3NRVnaS0UUwFVPqUNGnSTL20OYuUNn?= =?us-ascii?Q?l7SXvsicZmY8zhxC8yycALbTeSdt/G8D0X4Cc+TVeTTqF+ze63i2FxJT4i84?= =?us-ascii?Q?kGAKDtnvwWzyjLpNGNDAMaVVdhJo8hfX4/TQR06siMFyjWBIe18s7kbjX5uv?= =?us-ascii?Q?UY9Nuzn7pg5yGzy8KSWpjPcnJy8u5FIKsOKwDmYGW1kGmFQ5SEbM6sCHF/aQ?= =?us-ascii?Q?rnklpQX6gUq0ztE2WKZyu7/k0UKz38kvlSVw+NcyHHUOeKwLMLKyTjmj0dvp?= =?us-ascii?Q?WM9oCmC+IH9D52l63MELHvJ05U9wQbbm39zG69cIGQQ+BXwH3RarT2uKCelg?= =?us-ascii?Q?2iXq0oitM74WoAS6RzqXFchsDQuPnRaBKQj9eRQL9K6VUHlo6a/Ynt2+CUW2?= =?us-ascii?Q?3PCd2lT1wYrt6vYk9XgV7yZyttjQ5P22KGGiyDqhFSNnPV6H1hsIWbSLeN7C?= =?us-ascii?Q?bWzHsUS4dimikLbaM+0RkSS8DRDONez5W0n5yAZpB9cdggbgoeogi2xkD9Y8?= =?us-ascii?Q?X+K7OwoWIICva3hrKEGH7jl7ds3P6mCY3BvC3sDh2HwhPHN8ZUvdVBiL8wKQ?= =?us-ascii?Q?qEm9iEDZ7KM0TvXG3+ofdZVrymzS0WNGndm+CZcPKAFj2bXWy4OtLQayhgX0?= =?us-ascii?Q?x2KeTpHQEaWBkvYiYNFJoDlU1BrVJXrOkwCfjfy+60AWJ0YeCAn4hQyDLvwh?= =?us-ascii?Q?aAW1ge/Fvyp6wBfvafIDRU4DjIvRdS+7PNMaVYsyALSvNqBV0auHvNzcnhPY?= =?us-ascii?Q?Q+5FT4Ib6x1aRvF4gAInsdhLNn3qpVnR/FntdegNaXvyJRkVijr7W7mhSaxh?= =?us-ascii?Q?QW0G14n9PGZU0/gphUioyEUe6Mphm5fTbfGIsHczNYf0K+b8RWmvGJhuuIWV?= =?us-ascii?Q?0EJf9A/CVF15Dy3XxzjUbwl/TPjlii+/m9QosMxIaZq/t7jhtSvKG2LD2Evw?= =?us-ascii?Q?whn6daT4I4t8W41DInnyGelvb36FzdD3EosJTpmuKBKFGvGiQ04dqnTVnuHJ?= =?us-ascii?Q?NWsq/nux193RQ22JV/lsT5ziMXMpP5m7/pnS+Ri/hIEWoJEHkmyErzzmAl+G?= =?us-ascii?Q?0fpBFAaZWlJ9HHFTprKv0tYbnN57w0aLhM9Y/acwHycACPE8WuGxKvw083F/?= =?us-ascii?Q?q3a5ZMW5/Pwb2qtJ0HRj2aPQv6rTErEn8TRNdF4RQwz7Ko76s8l1mD+eY2FA?= =?us-ascii?Q?uR1IIGQcB1heRvx1yDA7rnZODgzR?= 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:54:13.5563 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4ac12441-d65b-4a19-a28e-08dc5bb8d21c 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: DS3PEPF0000C37F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7960 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=b80ca5960e391dc055f9571beaf0a2927929d6d3 Thanks. Xueming Li --- >From b80ca5960e391dc055f9571beaf0a2927929d6d3 Mon Sep 17 00:00:00 2001 From: Itamar Gozlan Date: Sun, 18 Feb 2024 07:11:15 +0200 Subject: [PATCH] net/mlx5/hws: skip item when inserting rules by index Cc: Xueming Li [ upstream commit e23edbc509f68b67b55ee6c06920402c9ac5db2b ] The location of indexed rules is determined by the index, not the item hash. A matcher test is added to prevent access to non-existent items. This avoids unnecessary processing and potential segmentation faults. Fixes: 405242c52dd5 ("net/mlx5/hws: add rule object") Signed-off-by: Itamar Gozlan Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_rule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c index fa19303b91..e39137a6ee 100644 --- a/drivers/net/mlx5/hws/mlx5dr_rule.c +++ b/drivers/net/mlx5/hws/mlx5dr_rule.c @@ -23,6 +23,9 @@ static void mlx5dr_rule_skip(struct mlx5dr_matcher *matcher, *skip_rx = false; *skip_tx = false; + if (unlikely(mlx5dr_matcher_is_insert_by_idx(matcher))) + return; + if (mt->item_flags & MLX5_FLOW_ITEM_REPRESENTED_PORT) { v = items[mt->vport_item_id].spec; vport = flow_hw_conv_port_id(v->port_id); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:06.439454649 +0800 +++ 0045-net-mlx5-hws-skip-item-when-inserting-rules-by-index.patch 2024-04-13 20:43:04.957753984 +0800 @@ -1 +1 @@ -From e23edbc509f68b67b55ee6c06920402c9ac5db2b Mon Sep 17 00:00:00 2001 +From b80ca5960e391dc055f9571beaf0a2927929d6d3 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e23edbc509f68b67b55ee6c06920402c9ac5db2b ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org