Message ID | 20240918134623.8441-5-viacheslavo@nvidia.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Raslan Darawsheh |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 28A5C459CC; Wed, 18 Sep 2024 15:47:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 991CC42F0C; Wed, 18 Sep 2024 15:47:12 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2052.outbound.protection.outlook.com [40.107.236.52]) by mails.dpdk.org (Postfix) with ESMTP id 7A91F42F0C; Wed, 18 Sep 2024 15:47:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HowodyZkmlv9ev2FDOR68J1UM15rWVcD/FrCgjuXE23HGRnio6jkCqkGoZHYMBJ43W9AKpY4ChWuBaV7Na9SCnFNWM0rfrtMW9qWiWu74eihVahBhIuxaWQYfaiXtWWBnLwUL7CzCEmNrg1T1Fh+mNhpahPy4do0C32Nj2pZy9Oyfkj86fMH41uBP2do+DU6xd1YGUcV6jFQY5I/DCiUKsETYjFL0xfgnNGomoEJJcDNmVT2dzwRmm+jXVzIAL+XaJ1aIpSj/hI0e5XqgKHrPthl2AWkbTMx0ymlZJLJCYZ6dHaG1w0hykBzzpMo3k8NdkZ3EpGNm3034/00ffPEqA== 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=ekHb84D5H1lBgzjFvABy1weHDcCZWFGuPxka959+A6I=; b=d2+8kUZQ7vtkL4j77PYA7feUz9p83uCKQ6knGZdhQL9rEKouaXBXPtCQqHYR9R/uSnd54MQYxG+RSKoI7/UnNvFFH0/MHBuAMP4+jNP2h0YkoK78NLdl2kaYbaTNXz7CHvK/H2KOfhl6zgW56+ktmYv27KUhYHC9bMIwXIqhl9ynuqQcdWM7fWagwNQEIaQnD7g73fUEDhx/rBYwsdja/yveKvCKNKnB4/tZkbU24+72F/MwEJ4sdHgmoSFdPqQ69eqtEm47w6Fn11dc+zBxq2GucZNOT4lu6fsXVWe6jmxBAVywOXJL7QV658l84x37hJAkOR4COIImE72JEcZntg== 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=ekHb84D5H1lBgzjFvABy1weHDcCZWFGuPxka959+A6I=; b=XD0JKd2z1SwrCVppdayjbdvYK0GBMbJ7S0yljWfUU5gHLwHTVK8KZlgjDJwrGvxjNeFe6ezWdysmBnhb8127hIE4eT4af4akOC72DupfONO/ekIpyXkSqyrgOoR1NuMYco7YVkgfloInUGeN2BK2ULXpFxgt1q3iulHT4WsbJxtZCtiNxJnw4LV3QJqFiq6j8tdkOYvlSKzfQ1ZdbNwHNDanhmMF92cIqdCXobjDfqXow+G3jn9f+6pHw2QMBLAkNpnWaBD4XySAkUhUTTzjmIr3hqMu7piaoRZDrUQOAUqngOpYk+xbrLHwXacf0guAvMRsBqAT/bHQE28IFxGvsQ== Received: from DM6PR08CA0054.namprd08.prod.outlook.com (2603:10b6:5:1e0::28) by BY5PR12MB4306.namprd12.prod.outlook.com (2603:10b6:a03:206::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.17; Wed, 18 Sep 2024 13:47:08 +0000 Received: from DS2PEPF00003443.namprd04.prod.outlook.com (2603:10b6:5:1e0:cafe::db) by DM6PR08CA0054.outlook.office365.com (2603:10b6:5:1e0::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.25 via Frontend Transport; Wed, 18 Sep 2024 13:47:07 +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 DS2PEPF00003443.mail.protection.outlook.com (10.167.17.70) 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, 18 Sep 2024 13:47:07 +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.1544.4; Wed, 18 Sep 2024 06:46:55 -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, 18 Sep 2024 06:46:53 -0700 From: Viacheslav Ovsiienko <viacheslavo@nvidia.com> To: <dev@dpdk.org> CC: <matan@nvidia.com>, <rasland@nvidia.com>, <orika@nvidia.com>, <dsosnowski@nvidia.com>, <stable@dpdk.org> Subject: [PATCH v2 4/9] net/mlx5: fix flex item tunnel mode handling Date: Wed, 18 Sep 2024 16:46:18 +0300 Message-ID: <20240918134623.8441-5-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240918134623.8441-1-viacheslavo@nvidia.com> References: <20240911160458.524732-1-viacheslavo@nvidia.com> <20240918134623.8441-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: DS2PEPF00003443:EE_|BY5PR12MB4306:EE_ X-MS-Office365-Filtering-Correlation-Id: b18a5041-9da1-47c7-ea6f-08dcd7e86351 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: 7cIIhdUP2bBfxPwo7PJAZjlrNoDN2yfLQJGNry8hepOK06wtKedgrYcFg18xXoq37veQbzSZEiAHg+h152tSmeLsesHXxk33QTWkkh3mMKRYN8bl6E67q94VipDYw8Dwt/o/k8VcCOCt72YZRM8fylClfaqt60cVA4A/UiGhZ8yPIDb94ZYBgdNCzZEvsMoWAzxV+oo3R4GZ3izrV1ul8apTruXnOWgzpVZqGDgem4iFdhVA19okmq3+/9cnty/QNjWhwrAtouGXQ+1PKfUQj0dpPHw64UyK/WDJegrk82Nfi2vS5lu/Ngzy4ChNGJaNPyDwuJLrE5RYhbKnWbTerEEViA1I3Obr2hbBRRG3GlP7Fdu6Wr11HEZ99r7DLvtzcZbNF6K2Qk9ajwPA5/rYPodTOldztgNOFUJiMn9SKhLIksDfrchJ370bRgjRimuU9u/rfGhSQZNUMO4hYSmQgmyqea76jLgnb4A8CrHh0TItWiKZtjfvPGPUXXX0bHqEpFPpJox80LBJkfsOxTci52fa3Z1Q5b9kzre6hM3Ud/xKTit3HsfsxtLaI05xrH5HDpIuRvhzaXwRPwqL7b4f/J7ADk+szIDnbC12Td3wAnBKSjkpqWB0rEpPTM+obiEAZBJgd2IhfXuJqxog0jDEaRMIIDE9TyhZ0VsJpEeJTze1EoP3eIyObzeMefoZb6P3B+gL8n6cqRI/1EUhzvdoSzn2KieSq8URQFr2eBuWQdXcHMkSFaojnk1kGamaRlnDtmdG+Hyvn4khQ3viN5IH4JpZ9IvwVo8j7wu+pBzDgtVwm7EhBfAqU3pe8RwXsPcZEICH/U16ZGe6ySaZDWva8mi7XmgWEi47wzKFlbV8G+eR/I8WpdWwEVaDjWqzMvL+zAShMZGMAi474pHn5V75JT6NRp3afeyTkkN5vZhIjurerZAgu0t2LBmIteDTagGnbUP6UHsqAHyc9Lc8SfEfa/8ZdF3F2hfZ31Tc4ebsuBUiz3XCY8DxEjkb5Q946dNPDrhvVRJX+QL8/5M6FwJOfse53A6RKEyOvmxuAXnvuxf/dqpzr8Eyutxx2hGnI3gTPyc8Z2EG9++WKZnxhkFkU+Hvprb7ZaRQtgMx/90x/nT2UHGb3xgDNYwoRMCJn5ewo2YdEtAp0vk220X8ovyuYLYKq1TWphruRDjir9Ez9sm2rykxG9QscxGifNCX5DemAxky1jl+gS3YS9dOGcxnD48NuxzPy4C96nnawenq3o6t5B1EVIctTrpl2AgC2JUEi6eA/FTQtIaKAndTUhkyv8mrxuy5enCBPP3U7QrEEnDdmGZLEGJmx8uWpFllBqbidPPQWmcIRReRFsyAbWQ9SG2VVQQKBJVfyzynctUfwuSU3YVFW6vu8+IDW/YI/A4zqYFO2jesJIWYMWuLYLeLyUJcSNvIGHFd6U7T9w+agWcSaaiBaX5oQnlnIG2yKf4c 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:(13230040)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 13:47:07.6433 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b18a5041-9da1-47c7-ea6f-08dcd7e86351 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: DS2PEPF00003443.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4306 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
net/mlx5: cumulative fix series for flex item
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Commit Message
Viacheslav Ovsiienko
Sept. 18, 2024, 1:46 p.m. UTC
The RTE flex item can represent tunnel header itself,
and split inner and outer items, it should be reflected
in the item flags while PMD is processing the item array.
Fixes: 8c0ca7527bc8 ("net/mlx5/hws: support flex item matching")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
> -----Original Message----- > From: Slava Ovsiienko <viacheslavo@nvidia.com> > Sent: Wednesday, September 18, 2024 15:46 > To: dev@dpdk.org > Cc: Matan Azrad <matan@nvidia.com>; Raslan Darawsheh > <rasland@nvidia.com>; Ori Kam <orika@nvidia.com>; Dariusz Sosnowski > <dsosnowski@nvidia.com>; stable@dpdk.org > Subject: [PATCH v2 4/9] net/mlx5: fix flex item tunnel mode handling > > The RTE flex item can represent tunnel header itself, and split inner and outer > items, it should be reflected in the item flags while PMD is processing the item > array. > > Fixes: 8c0ca7527bc8 ("net/mlx5/hws: support flex item matching") > Cc: stable@dpdk.org > > Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> > --- > drivers/net/mlx5/mlx5_flow_hw.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c > index 50888944a5..a275154d4b 100644 > --- a/drivers/net/mlx5/mlx5_flow_hw.c > +++ b/drivers/net/mlx5/mlx5_flow_hw.c > @@ -558,6 +558,7 @@ flow_hw_matching_item_flags_get(const struct > rte_flow_item items[]) > uint64_t last_item = 0; > > for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) { > + enum rte_flow_item_flex_tunnel_mode tunnel_mode = > +FLEX_TUNNEL_MODE_SINGLE; > int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL); > int item_type = items->type; > > @@ -606,6 +607,13 @@ flow_hw_matching_item_flags_get(const struct > rte_flow_item items[]) > case RTE_FLOW_ITEM_TYPE_COMPARE: > last_item = MLX5_FLOW_ITEM_COMPARE; > break; > + case RTE_FLOW_ITEM_TYPE_FLEX: > + mlx5_flex_get_tunnel_mode(items, &tunnel_mode); > + last_item = tunnel_mode == > FLEX_TUNNEL_MODE_TUNNEL ? > + MLX5_FLOW_ITEM_FLEX_TUNNEL : > + tunnel ? > MLX5_FLOW_ITEM_INNER_FLEX : > + > MLX5_FLOW_ITEM_OUTER_FLEX; > + break; > default: > break; > } > -- > 2.34.1 Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com> Resending the Ack for each patch separately, because patchwork assigned my Ack for the series to v1, not v2. Best regards, Dariusz Sosnowski
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 50888944a5..a275154d4b 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -558,6 +558,7 @@ flow_hw_matching_item_flags_get(const struct rte_flow_item items[]) uint64_t last_item = 0; for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) { + enum rte_flow_item_flex_tunnel_mode tunnel_mode = FLEX_TUNNEL_MODE_SINGLE; int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL); int item_type = items->type; @@ -606,6 +607,13 @@ flow_hw_matching_item_flags_get(const struct rte_flow_item items[]) case RTE_FLOW_ITEM_TYPE_COMPARE: last_item = MLX5_FLOW_ITEM_COMPARE; break; + case RTE_FLOW_ITEM_TYPE_FLEX: + mlx5_flex_get_tunnel_mode(items, &tunnel_mode); + last_item = tunnel_mode == FLEX_TUNNEL_MODE_TUNNEL ? + MLX5_FLOW_ITEM_FLEX_TUNNEL : + tunnel ? MLX5_FLOW_ITEM_INNER_FLEX : + MLX5_FLOW_ITEM_OUTER_FLEX; + break; default: break; }