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 1810445CE3 for ; Mon, 11 Nov 2024 07:40:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FBB04067A; Mon, 11 Nov 2024 07:40:11 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2061.outbound.protection.outlook.com [40.107.244.61]) by mails.dpdk.org (Postfix) with ESMTP id 0826640E27 for ; Mon, 11 Nov 2024 07:40:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wcMy0VY5R7BegFzlUn10xLQLEnykLjBNkbDHBqL0H3Ccr1Cuq9IY9Tihh1/LYK3pj9tLr6ErDq/CChnLKdCjUuogTRvDvBzeyLDGOFPOGEtjqr8sfGJXhwwdMr7j4KH25bZPMEdpYPTqIfq5QKkMXJlAZ8iix4+Q7GESoH7ZZW1jFMFkV+wun+0W3AsyW61S7sKF/Qe5bfmf4K6x8cEEHg+1/z0tOHCX900f5bg7muNZGDlxhyGHDhc4hZuueDlJBL+6xu1MBTkbIkUteo4Nd/QGBSVZkd3q0Ad5G20jYTBGGR9cHRiSNn/1sInKTp34FG1K3iDsnETnOp7FDEuO6w== 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=NwtGt4JFh9L+Dts7Psny2jBMsy/+MarkCqHM6IuRSNw=; b=Y2bNAsZr5h5SJrUB0juByBMvAeoVg2iUkjCAB9Jkqwu5i+huBONW2/y7pwnD0Xalj/SSgf2v2DtUqneN+Z5prnMHQCryqvD5iEnQHVFXahUZIyMo9zoj4Xt2zncBskyYZ2Hv5qg6WmAh2i1DSgMhDYMjbOoFf3O+qacIRCSBWliWVx6W9n5kxWHdYs1NRMonCp+SAYj8HwseD9ZECdAP39tto/gOZxZj/Jj3lDTRVgbvLppkCozwIURTRRQ+TB56Xg6M2yR4Dg4ptn9/KWxrLpZPP/IwTsPBvsZSPtU4uLLEElfZSLe+tvRiH7tYosjPJsIiNDKk2U+bdsciLyU55g== 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=NwtGt4JFh9L+Dts7Psny2jBMsy/+MarkCqHM6IuRSNw=; b=Tw5QNV3VqIqHtgjRcOYPaUgmhiUzVgNhbqLo+SqO/wIHEZfpXEi6/nstCyricbHw9oH7b5KEwt6glrClzAAwBoQjZl2GsNNPjgEGNjhFI7bNt7X9H3ivZJZHOAXMwRVwnCT1tqSp6OMausWVEFet+6kV6q1lxew5RzyRUTwdB1THhnDsdk3VS/ZYKjk351LrjMsfkEUMBCmVh1b3fvRo08yLSdlwBPThb5tysppHT9X86piXAOQ3kai7nhwuna53xZ6yuR+DyJPRl8RWgp5zC+X2UHV27GufBEXM5QntwYV5Ia3vKMmukj9E2YHkF8wXloJzhTxd2UIwAYo8Af1nWg== Received: from BY1P220CA0008.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59d::16) by PH8PR12MB7158.namprd12.prod.outlook.com (2603:10b6:510:22a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 06:40:06 +0000 Received: from SJ1PEPF00001CE0.namprd05.prod.outlook.com (2603:10b6:a03:59d:cafe::fd) by BY1P220CA0008.outlook.office365.com (2603:10b6:a03:59d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28 via Frontend Transport; Mon, 11 Nov 2024 06:40:06 +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 SJ1PEPF00001CE0.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:40:06 +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; Sun, 10 Nov 2024 22:39:58 -0800 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; Sun, 10 Nov 2024 22:39:56 -0800 From: Xueming Li To: Viacheslav Ovsiienko CC: , Dariusz Sosnowski , "dpdk stable" Subject: patch 'net/mlx5: add flex item query for tunnel mode' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:28:32 +0800 Message-ID: <20241111062847.216344-107-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CE0:EE_|PH8PR12MB7158:EE_ X-MS-Office365-Filtering-Correlation-Id: 8ffc11f2-a5f9-442f-46d1-08dd021bae52 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: =?us-ascii?Q?eJbDrQL4xYVpQMjK39Wbbsr14wzB6SUlSvrHJ1HejrRoUqWCtsYPEYWbl+nO?= =?us-ascii?Q?Zwayp1WBGDTqh/aePBqLxchE+j6l2TM0g8shEOEaP04DI73H4LRBvddK75oH?= =?us-ascii?Q?/BaoMTANKWom6f4j6fr5FVylDMZ2qL+XdDH6xnOCK8apvQbABa6/FU22YI7G?= =?us-ascii?Q?bTf11X27Apvv9cbMj2EXgshjBubkZq36OeHXhIoXSqUvaxn+kEv4SROe0P5F?= =?us-ascii?Q?X0vayxkAk7QDZdgfX3yS9HwD/5bHOlPOXtf/aTJETT1XKX8fd3vmbbB1W86E?= =?us-ascii?Q?qLHqe0WqxjrFC9uZMh14xaSF+F83TctPFvZHnIooq9+HuUBSZVJOdrjoVTg4?= =?us-ascii?Q?WOFO68e+gsL4g8cyjdyBs6H9N9+4JaspKLi19lMmUizmaYU2HO8jxhRTnANO?= =?us-ascii?Q?VSikcfyErKJwQbqwfzyg/+0H4Q7defARdSsTDM7Wi5LjirLKBuDW0A8Nfx5G?= =?us-ascii?Q?8+kCZqauqPNJeDZSYivc338o+/zMhdx40zn4mkR0del9v4q9UpLNk2H8dFU7?= =?us-ascii?Q?Na3/ogQ8WYXxah6hrrFH8fhaBLGZ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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)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:40:06.8166 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8ffc11f2-a5f9-442f-46d1-08dd021bae52 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: SJ1PEPF00001CE0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7158 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/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=cb33b62e095707f9ad4c014f83e60359f06af2ec Thanks. Xueming Li --- >From cb33b62e095707f9ad4c014f83e60359f06af2ec Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Wed, 18 Sep 2024 16:46:16 +0300 Subject: [PATCH] net/mlx5: add flex item query for tunnel mode Cc: Xueming Li [upstream commit 850233aca685ed1142ae2003ec6d4eefe82df4bd] Once parsing the RTE item array the PMD needs to know whether the flex item represents the tunnel header. The appropriate tunnel mode query API is added. Signed-off-by: Viacheslav Ovsiienko Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5.h | 2 ++ drivers/net/mlx5/mlx5_flow_flex.c | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 0c81bcab9f..f48b58dcf4 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -2498,6 +2498,8 @@ int mlx5_flex_get_sample_id(const struct mlx5_flex_item *tp, int mlx5_flex_get_parser_value_per_byte_off(const struct rte_flow_item_flex *item, void *flex, uint32_t byte_off, bool is_mask, bool tunnel, uint32_t *value); +int mlx5_flex_get_tunnel_mode(const struct rte_flow_item *item, + enum rte_flow_item_flex_tunnel_mode *tunnel_mode); int mlx5_flex_acquire_index(struct rte_eth_dev *dev, struct rte_flow_item_flex_handle *handle, bool acquire); diff --git a/drivers/net/mlx5/mlx5_flow_flex.c b/drivers/net/mlx5/mlx5_flow_flex.c index 4ae03a23f1..e7e6358144 100644 --- a/drivers/net/mlx5/mlx5_flow_flex.c +++ b/drivers/net/mlx5/mlx5_flow_flex.c @@ -291,6 +291,33 @@ mlx5_flex_get_parser_value_per_byte_off(const struct rte_flow_item_flex *item, return 0; } +/** + * Get the flex parser tunnel mode. + * + * @param[in] item + * RTE Flex item. + * @param[in, out] tunnel_mode + * Pointer to return tunnel mode. + * + * @return + * 0 on success, otherwise negative error code. + */ +int +mlx5_flex_get_tunnel_mode(const struct rte_flow_item *item, + enum rte_flow_item_flex_tunnel_mode *tunnel_mode) +{ + if (item && item->spec && tunnel_mode) { + const struct rte_flow_item_flex *spec = item->spec; + struct mlx5_flex_item *flex = (struct mlx5_flex_item *)spec->handle; + + if (flex) { + *tunnel_mode = flex->tunnel_mode; + return 0; + } + } + return -EINVAL; +} + /** * Translate item pattern into matcher fields according to translation * array. -- 2.34.1