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 1BE9345962; Wed, 11 Sep 2024 18:05:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 111DF42F57; Wed, 11 Sep 2024 18:05:54 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2041.outbound.protection.outlook.com [40.107.95.41]) by mails.dpdk.org (Postfix) with ESMTP id E36F942F51; Wed, 11 Sep 2024 18:05:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i9VZ775JzQc+WqMW2f4KmecRdmmnC4ODHvObHZhxK9Dn3t+hwcVYhTiczuKIdtxKZq/uLYWnUCBSjmp2JFD879AxnyryKZ7okQSdhKeG7RYGCntmkb1BSz1C2w+17QTDDtt1v0MVDGmmbTc9EaG44/viN6yhDwUzLhNRlQvxBgGRF0oHeZ62eCDd1fcAJwDObs+YBpfewFU8VyebxybzmXJiM0QxuQE2Bs6bM1mE34HBa2zFSc9jFf20xdc57WD6d9jdNe2lyTelF78FeiGDViEDWWOki2BeXytfxEwWW6s8yTd/D7UCYrHy0eEbf+kPyZ8xlL3u15Nxv1vPW7HIEg== 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=rdPmsvdslUaM1o5rEOuC5UU41/qiYF9UubL9o3sDPFY=; b=xcQTtSXb5R6sfgtBJi0jTIQtZwR74js0ggitlbmv8W7+Bi5kakKV6xSZTQnPQ+0WH0uPaQAjqE+tVruMWlamgSq7lH+0R5rI1fdVSKHrR/6s4JleHm2GVi9W5LXQO2L/cO76q0uW8+ITwvjaN0O8LZKgM6xO0ukDoSsNZWhqp8OPQ0z2dSG6QsFOmXWlaAd4VBdie0tWTXZFfC/ljM6St2PdH5cDmF75GYIPpjwUU5G4x/9axAWrRm5OGU2IYe2dgORgyQpyr7694NXPCsHbRJEeStoR11XhQzhQc/Gv43veG4/vrej9AmisKInrRWI+RTZXCJcGtcDB/6DBDU4m6g== 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=rdPmsvdslUaM1o5rEOuC5UU41/qiYF9UubL9o3sDPFY=; b=O2z/7mtoaO12Ce79DLOF4xqqP0z+FOZXI0lwwjMxdXMtOK5LdWdI0V9rDabZS7y05BTqXf5mNHdLY1nihc35bSNANJDnZLqmqLyn7UKLJ9TxPGbM+rOsAFaxieQergRBmkbCugWr8PK3Pq2tHl0tiMXLk5dgEjh1xMPf+EHstnXZKLShuvu4DA/lUz4nAY29yn/0rfvaaZqJIqryPffux3Eot2Hm7cfhRaAd6DW1b+PT2qzaxIrRgY+cDVzLZrRKmEMQKZ/VTsp6ouMCp2XU91bbGTt6ScnSyaSk+/mU6kDE1AqMvCiLkMDO5vFAXZWBKNOIP3iYAj3ZqxUT2L8JEg== Received: from CH0PR03CA0076.namprd03.prod.outlook.com (2603:10b6:610:cc::21) by SN7PR12MB6909.namprd12.prod.outlook.com (2603:10b6:806:263::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.24; Wed, 11 Sep 2024 16:05:48 +0000 Received: from CH2PEPF00000144.namprd02.prod.outlook.com (2603:10b6:610:cc:cafe::df) by CH0PR03CA0076.outlook.office365.com (2603:10b6:610:cc::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.25 via Frontend Transport; Wed, 11 Sep 2024 16:05:48 +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 CH2PEPF00000144.mail.protection.outlook.com (10.167.244.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Wed, 11 Sep 2024 16:05:48 +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; Wed, 11 Sep 2024 09:05:30 -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.1544.4; Wed, 11 Sep 2024 09:05:27 -0700 From: Viacheslav Ovsiienko To: CC: , , , , Subject: [PATCH 3/9] net/mlx5/hws: fix flex item support as tunnel header Date: Wed, 11 Sep 2024 19:04:52 +0300 Message-ID: <20240911160458.524732-3-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240911160458.524732-1-viacheslavo@nvidia.com> References: <20240911160458.524732-1-viacheslavo@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.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: CH2PEPF00000144:EE_|SN7PR12MB6909:EE_ X-MS-Office365-Filtering-Correlation-Id: bddf3a44-078d-40a9-fe55-08dcd27b99bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3bKKsth6ABphKbAkqNTG3sV6QRfjEvwyuKDDhtHkwMREzWNOLrmOQQhU7R42?= =?us-ascii?Q?vkczaurbUbDnYokHTrrOF6r8Aw9nD4OApM/lveSXIFmxbIAkMTrew43ppule?= =?us-ascii?Q?WdLUPaEeNTY7P7T9OzjraohuPl1txTbTT87Y+JmDP9ME3daEd8AZr0mlzZTb?= =?us-ascii?Q?/ylIXg6yvugj868DtSazaPNWYaANt0Lv9XOKGUcStdv7QnRK6Nt2R0kONx89?= =?us-ascii?Q?nhZZeN75Xj+qxx5mauCrn+gYuTWFV3+FuBSq2Gik7THceu41bfk0osjJzwnG?= =?us-ascii?Q?aSWTIWC5ls6vSz+K2ovwwB5tAG4+O82VS7PakIR3EttWJiXwMsQStOZ8/mSg?= =?us-ascii?Q?aYf5zK50i2KWIfrMlaIP0CU/JFilsHNYUeyjwjKpzzBpuJyxyL7J3UW7hpD9?= =?us-ascii?Q?UauOawN5p5uE5bR4jhkVae6M7d0br1QcmODfcc9E1lB/F5AMtYQRyNJcaw7m?= =?us-ascii?Q?M8LTjYnLhjJlFDG9H4gxEYDGHaoLzKeesNeAeMyc0S8bB8kAAnUjJ95TUXbs?= =?us-ascii?Q?0q9PhP8LtgY3q3LDn+sk+0+qhqLq1lqU5QSPHgy+4Mo8gy1oOkezaNnnD4Ys?= =?us-ascii?Q?UOc2xqv3Gh0/FgR/8o47582JlUhw/ORj9r2gwFvoyVPRTCX50y7IDLemOqJR?= =?us-ascii?Q?McLcnf+hRNcQUZk7D41kvHfmDT5zwLCOtYXNyOfVIfkMZGsnOwke3WmIs0qC?= =?us-ascii?Q?Ef1y3ri/5fpgbNajEY1T/KnEqSpNN2koL3C02xp98LIbWoCaxMuFTambR8Mj?= =?us-ascii?Q?Sj1qYBcdGmxhvyqtSRjP73KANxs6n4kNoU7k7e/5G4vZ3y7tzenqWO1Xx10H?= =?us-ascii?Q?2FRGT1vbfILPNBqzybU3Wd5g2wiGV8P5cZycZXSJnDXD+oMK5X55nDxw3ljV?= =?us-ascii?Q?oyveK6+Xjex6VarGdTJl47taiKJeaRX3vv7+8u7V7AWwvFUx0HGqYl6AoNGH?= =?us-ascii?Q?fiWJYr5TjleVOFwiuTFMHva10RZ4gEcfMJN5Qn3W09kD6sQyZVd9YfyLcT6d?= =?us-ascii?Q?pdj7sGuQvWG83B7kuac8B3git+B1dss0u7YeQfgyn6ss9RReZvO/OaB6NL7f?= =?us-ascii?Q?3E0poJU0YawXenIMr7VdzG/cZUoko+GO9t9yq7K0J7zIDRxL1ZJCejhTE5Kb?= =?us-ascii?Q?PVnNg3onipSLURsGmgxvVD4pwAz6QnM8tbBCZWRKdkeMnaw50lgKLGfHZGi+?= =?us-ascii?Q?t6LqomtVeDxdfV5rJZZawKVZgETuOG098NdrYqqqoikwwJbgr/0a7Hw/r6W0?= =?us-ascii?Q?XrSI5F1b1y8+DAyI8c/YbMdQEqFscX3egVSWopIXZ3hopM1j8Olf2KuwQeBD?= =?us-ascii?Q?sWTflqBaRav2luKqyylsGzuQmlwy9ueB1bUXI0V+8zXr8MP9e0ymM8GA5Rhm?= =?us-ascii?Q?fj9FTSAv/M4AXCzvQSulBwKFk7Kr0i+846MqCZ9msxdzJblSoeHtKLxKX+p3?= =?us-ascii?Q?QQJy1iRjd1Bzi31ppL1+2wIlxdqqKtul?= 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)(36860700013)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 16:05:48.0512 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bddf3a44-078d-40a9-fe55-08dcd27b99bf 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: CH2PEPF00000144.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6909 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The RTE flex item can represent the tunnel header and split the inner and outer layer items. HWS did not support this flex item specifics. Fixes: 8c0ca7527bc8 ("net/mlx5/hws: support flex item matching") Cc: stable@dpdk.org Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/hws/mlx5dr_definer.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c index 51a3f7be4b..2dfcc5eba6 100644 --- a/drivers/net/mlx5/hws/mlx5dr_definer.c +++ b/drivers/net/mlx5/hws/mlx5dr_definer.c @@ -3267,8 +3267,17 @@ mlx5dr_definer_conv_items_to_hl(struct mlx5dr_context *ctx, break; case RTE_FLOW_ITEM_TYPE_FLEX: ret = mlx5dr_definer_conv_item_flex_parser(&cd, items, i); - item_flags |= cd.tunnel ? MLX5_FLOW_ITEM_INNER_FLEX : - MLX5_FLOW_ITEM_OUTER_FLEX; + if (ret == 0) { + enum rte_flow_item_flex_tunnel_mode tunnel_mode = + FLEX_TUNNEL_MODE_SINGLE; + + ret = mlx5_flex_get_tunnel_mode(items, &tunnel_mode); + if (tunnel_mode == FLEX_TUNNEL_MODE_TUNNEL) + item_flags |= MLX5_FLOW_ITEM_FLEX_TUNNEL; + else + item_flags |= cd.tunnel ? MLX5_FLOW_ITEM_INNER_FLEX : + MLX5_FLOW_ITEM_OUTER_FLEX; + } break; case RTE_FLOW_ITEM_TYPE_MPLS: ret = mlx5dr_definer_conv_item_mpls(&cd, items, i); -- 2.34.1