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 91A3045EEE for ; Thu, 19 Dec 2024 17:02:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D631402AF; Thu, 19 Dec 2024 17:02:39 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2063.outbound.protection.outlook.com [40.107.243.63]) by mails.dpdk.org (Postfix) with ESMTP id 813B74025F; Thu, 19 Dec 2024 17:02:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yY2Uzc6UM4E3IFq5ySPM5+EFBKDUwB9TXWZUXhPdh77x/0c2OlH6ZlH80ouYq/vvBHoqrnRxEahfxb6ramG7u1z5mHR4+1qi3RZkbKq6IkTeDFmollayRzwHAxcELeQ5W7xF/ftL1+kELT01FiwmcAcp4MwYEJiEeRc4AHIe1hQLWeZf5zo6U0enCVypjL2p4PyBhz7SV8Stulj0OzqDZGJJmZ1/AB85XRTEcUPGP68Vn1mgEM9zhG+5poIzT4fYpm3PIvUy0YIFm4jV3/DfWKtdt8JcJX54ahnzFgnBRJ6tphSzcZTCfjPHK0b5rL5o1wnvRW7fFSroVf41tQu7TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=A14Bm9iTQgvN4gMoRY1hyJfFE1+Fa0N/yQh1Y5YVwP8=; b=ouuRbn1pUcIg8wXNLyAuuqD17M9aMViS1vq0Txh/lTlm2bJsSapZp6cjQD1LFFAcGXc/Y6JEkk9RV9hif+PR8d1rHOG22XZ8le2RO9pKakdb1uWLgbXvMsgjn48SAkyKwXmdE+tLoipEaf2SxkzbsXXdflg49PtVmZsUqVF0hM+KWZm6bDll175v2DkztDSJvn/Q8KPBSp0NeJ0cikKCpKPkoInh0M/JVNWvyfyixH2Vj23vXIhLeEIv5z9EgyRH9jtc5egTGaW27tIyGYAyztxpNj/1XdKv8yTw3dC8BsKPpybwYlMCD7towAD7DGZEJYMBZLpHiY0NHvJaYmnCUA== 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 (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=A14Bm9iTQgvN4gMoRY1hyJfFE1+Fa0N/yQh1Y5YVwP8=; b=GFjUJ9WzuU7HoZBe1LSc1tVCXAixCi5K3alz3BtZOE4eLv2WKgYJj4O/fVJyPSa8Uzk9tRqRSqg82RkH9XbfoSAXM0y7/q664K5GWiMV6XbJp2u+FVAg8HTUvpNSI+kaDqEs0F5JXauThd0Tm/BUMG1XKYpTCBkwh3PZsDZiLev84cPhEe0lvanQELgZkvV1/J1uuWPsCatmGuH0vFW6Pk/Cxk5mFml+h1iqToX3AyWrmG9EkC/Vo5UtylclVjSneAmbkNc2triJMt56yr0kowrvhsD67psB/E+WOcAoaayR5H97ssDX44c4xlq4M1mdw3uHWZuLv6qJl+K/Sn28gg== Received: from BLAPR03CA0065.namprd03.prod.outlook.com (2603:10b6:208:329::10) by SN7PR12MB6839.namprd12.prod.outlook.com (2603:10b6:806:265::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.20; Thu, 19 Dec 2024 16:02:32 +0000 Received: from BL02EPF0001A0FE.namprd03.prod.outlook.com (2603:10b6:208:329:cafe::ac) by BLAPR03CA0065.outlook.office365.com (2603:10b6:208:329::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8251.23 via Frontend Transport; Thu, 19 Dec 2024 16:02:32 +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 BL02EPF0001A0FE.mail.protection.outlook.com (10.167.242.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.15 via Frontend Transport; Thu, 19 Dec 2024 16:02:31 +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.1544.4; Thu, 19 Dec 2024 08:02:15 -0800 Received: from pegasus01.mtr.labs.mlnx (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.1544.4; Thu, 19 Dec 2024 08:02:12 -0800 From: Alexander Kozyrev To: CC: , , , , , , Subject: [PATCH] net/mlx5: fix fragmented ptype match Date: Thu, 19 Dec 2024 18:01:55 +0200 Message-ID: <20241219160158.897255-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.43.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] 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: BL02EPF0001A0FE:EE_|SN7PR12MB6839:EE_ X-MS-Office365-Filtering-Correlation-Id: 05052a9f-ea34-4acb-1003-08dd20468bb4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?7qMuqX0CjBc3oPp7pB2fHqv/hQtHVlh5cqXSD7Q/bpLJmVoQcrj822tl3GQp?= =?us-ascii?Q?ORD/xs4GRUqd29CLsSEhhP8+YeJu0aR6FnHn5IRpbt4CQxG6XpNrwr9Rhpm4?= =?us-ascii?Q?loh8XF+t8PMuEbVhW0vSHcbHq+MZDwAk0rlOaMOjSKw7fLGRlml5cOj2XnSG?= =?us-ascii?Q?XhurkEWChkkc1A12JnlnCmfkOBYs9Pymkf+IByHIP0tMpiCv0HdBF7gBlAP0?= =?us-ascii?Q?F+KVY5zzUb4CUzpyKNThuQH0X4E8wGgE2XMHWRKLY9fB7XgrHUxhoGkV0W23?= =?us-ascii?Q?7fXpdwUArDyMv0imsmrpl0g6cFRM0xaqD8fhrorwleA83QFIUy77JrLTamOq?= =?us-ascii?Q?c4TDUoKJQb/bO7us2JrxVLqd132avqxj2vOEp6zjZGokz/y/c1P5BEfhONbu?= =?us-ascii?Q?48Y3Y48+3ZWNQqVo9x8n8kM0IklxS9DAdgV7HtakDfGBh/G0UmvCBFKLU2sA?= =?us-ascii?Q?pm7otiyOGa54t/hjwEo/etGwpJJXXmQ56xCtxFKMpP3RNEX4XDOabN+y2oSc?= =?us-ascii?Q?24eH2QIe1Y8iLnBWYvAZmlIyxgeqCykBBPudz5GnO5c5+YxjmdRkzbEOHrmz?= =?us-ascii?Q?CRLNNIE3OlPMBiC3OQq+5iVakUpybEfYvpa50PPr/YZ2JsEEVHe8biB+/DK9?= =?us-ascii?Q?iNm5xBbjf4PlL0tgFV956nklNQ6UMm3iw3oM8DMNENyDdmgrdmeJ/jClZpoB?= =?us-ascii?Q?vSx5gNIPH06J/VbOZ2e4Hyv97WDKULeqXFrqhSAZ6iRiSpswww+AeT7U7KYS?= =?us-ascii?Q?goi5WGUtuqArEnashlf/Il5bkit4I7J0eIFhYSNEUaMZiBOoa61GSBWCW2h3?= =?us-ascii?Q?Mqalfy5/gDBwRZlUuovd+Y4OXU906cOVMq0mKkvXW66ekBkGkMtSkZkBgyAQ?= =?us-ascii?Q?E3doQE4uNmKkquiaghgrEfwTtHSfdseuqnkBmImBO2VqE998E6YYv67cFcyK?= =?us-ascii?Q?OkuOa5mL/5YLLsjM46H9+iLkH8eob9BxUfNi8nxY5gzJME25vMxT683YjFir?= =?us-ascii?Q?BCOOjyrgEGTAgwyAayxVv0dd/vQa75SnyLkuKaa/G/msGP/WMt7dYO+bl/JD?= =?us-ascii?Q?gV0TMiNQbP0OXW65KQ+Mqcq1mFfCGc6YXcqHInAc71GrEMOlRSdqxMFe3TbU?= =?us-ascii?Q?5QNSYyMuk/H9PQc0nntOUCRpCbMIUavVwngrVFZc6y1Q2YJz188ViZQhPuun?= =?us-ascii?Q?8mNzhQrYzajTabkZRlDIXaNFB5aiGci0sxCdw1Zcg7TMhpoco6QEV3XZyQl+?= =?us-ascii?Q?ayzdTSnGV70edhsBoBKFa+3l+z4y5f46yw/+rAYhP2Wh9ZaANYiM0KylXG/U?= =?us-ascii?Q?kbiB15xPi2UYPQv+uHm0B0kUQ0/FsI9GAmbiZdGFx54VW/yOeLjlyuYcmpI6?= =?us-ascii?Q?6CXp2HSAZh9tYCQBuyvqDgVQZCVE2R26XQmTWay9QKYoLbiXgZ78CGDLEG4t?= =?us-ascii?Q?NlVCcWLnLXIitC9N1xiTERS+CObBl93DQh/ieVZVFCkVps1M0+bmoA=3D=3D?= 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:(13230040)(82310400026)(376014)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2024 16:02:31.8549 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05052a9f-ea34-4acb-1003-08dd20468bb4 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: BL02EPF0001A0FE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6839 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 Fragmented PTYPE macthing requires the setting the mask to the exact RTE_PTYPE_L4_FRAG value to avoid conflicts with other L4 types. Adding L2 or L3 types to the same mask should be allowed, but there is a check for the exact value for setting the definer. This prevents the fragmented packets from matching in case of L2/L3 mask is provided as well. Mask out L2/L3 types when setting L4_FRAG. Fixes: 761439a20f net/mlx5/hws: support fragmented packet type matching Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev --- drivers/net/mlx5/hws/mlx5dr_definer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c index e6d3dbfa46..837e0c47bd 100644 --- a/drivers/net/mlx5/hws/mlx5dr_definer.c +++ b/drivers/net/mlx5/hws/mlx5dr_definer.c @@ -2205,7 +2205,7 @@ mlx5dr_definer_conv_item_ptype(struct mlx5dr_definer_conv_data *cd, * Cannot be combined with Layer 4 Types (TCP/UDP). * The exact value must be specified in the mask. */ - if (m->packet_type == RTE_PTYPE_L4_FRAG) { + if ((m->packet_type & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_FRAG) { fc = &cd->fc[DR_CALC_FNAME(PTYPE_FRAG, false)]; fc->item_idx = item_idx; fc->tag_set = &mlx5dr_definer_ptype_frag_set; @@ -2227,7 +2227,7 @@ mlx5dr_definer_conv_item_ptype(struct mlx5dr_definer_conv_data *cd, } if (m->packet_type & RTE_PTYPE_INNER_L4_MASK) { - if (m->packet_type == RTE_PTYPE_INNER_L4_FRAG) { + if ((m->packet_type & RTE_PTYPE_INNER_L4_MASK) == RTE_PTYPE_INNER_L4_FRAG) { fc = &cd->fc[DR_CALC_FNAME(PTYPE_FRAG, true)]; fc->item_idx = item_idx; fc->tag_set = &mlx5dr_definer_ptype_frag_set; -- 2.43.5