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 C987C45962; Wed, 11 Sep 2024 18:06:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04B8842FB9; Wed, 11 Sep 2024 18:05:56 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2042.outbound.protection.outlook.com [40.107.94.42]) by mails.dpdk.org (Postfix) with ESMTP id 3C03342F61; Wed, 11 Sep 2024 18:05:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JDqa4xTeQhzFILUrgziyjZSiN7iFHQrwXbvoiagNAQEckDcDlipgOFww4sLNcWGb2YFMSg+nyjYGRiPuSj5nsBP7zKWL9bHOCPYpYCkFyt/LB/8+UdFwXY8/tZOQQOxO4QI6QJ3UUZrgmBIWJywlQ9lp0AbPepCseAiNkb/mJdJlTMqW/FKTefuXqs5+Biz0SNpf5O8YibcV/AqnZJAPNhud6vPUCXsJpPgtoAaLVrxYR/lPK7vHD+gpeJekIYX2jl3zKe240jceUXJZyzPbupTRcCaKWw4m4Sxe8cqu63c6R9GpRWBIGMC7SSn2Tac4da24d+v87qsMfp8Ay67KfQ== 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=aQ9Llya9tCQOd4Pj41Hd6g4165uwniHSOIfaJy9trzzNIVon46de2YullfbSXThu9uYzqRqWUbfFaS9eRKXpQHe6dM+N4pJbT74lh2Hlt8I9+x0mxJ9P2H1B51l2Ju5o/e8cQvJESODolhjwjfzZG9S8HQ8XScJwVrsaKhVNUENIgo84KdZ8i0c6KBt1MZequeXGk208Pp4OJkwRwJocBe7KGekqX5hKMUvOmvHhhIgU80iPkanLtKLa05uOF4BigDFX2NIIk4TpgkV7XHlLw9t9j68KhHIaHnmnXysrAYLz0gr4u7NSrf5TZpecWh7lsfVcFjZ7iiv7xZ2eB+1h7w== 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=ekHb84D5H1lBgzjFvABy1weHDcCZWFGuPxka959+A6I=; b=RUmSkQ6i/jj/zj1MRVUAM3VUuniSiY9ylS7ewy+q+tLeoMe7mxXHdPmmfC5qoUKQ0qBd8qfEKX/dydFRpo0Qhp1lDH1JJEzyJPDHWyT2YArT9rIqX+eD5v7D+dwRH9Kt+gC1mJ63nHMx3vFtSZQKVdSA/13+sEPnzo/xEYon2FWhdhcDm9xetM+Bg82OQRlG9jSsn69dupiqFp8MaDclrf1EqII4Xffj8BzOKIBKmZMXAfcX6BirN8pwQ/rzaW1co/QHCnJimU0dOt2/jzFtwQPm/LrbcflTRhP0dY1Z3wC8gXmGWg9SGm+IMqNsFORYa2rPsBAknHKmGJJwvC4VAg== Received: from CH0PR03CA0068.namprd03.prod.outlook.com (2603:10b6:610:cc::13) by SA1PR12MB7101.namprd12.prod.outlook.com (2603:10b6:806:29d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.22; Wed, 11 Sep 2024 16:05:50 +0000 Received: from CH2PEPF00000144.namprd02.prod.outlook.com (2603:10b6:610:cc:cafe::77) by CH0PR03CA0068.outlook.office365.com (2603:10b6:610:cc::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.26 via Frontend Transport; Wed, 11 Sep 2024 16:05:50 +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:50 +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:32 -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:30 -0700 From: Viacheslav Ovsiienko To: CC: , , , , Subject: [PATCH 4/9] net/mlx5: fix flex item tunnel mode handling Date: Wed, 11 Sep 2024 19:04:53 +0300 Message-ID: <20240911160458.524732-4-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_|SA1PR12MB7101:EE_ X-MS-Office365-Filtering-Correlation-Id: c984ca74-7e38-4929-8c03-08dcd27b9b12 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?l0ydL+KeapRf0dArJQw0MNxXXHhjZiXdNpbtKh9DJRxpxRm06FkZr/bfJP0K?= =?us-ascii?Q?f2RSEAM4k9m5YgRcFVcp4WBkPV/itsL7A+ADqfJK2APKTmhe7/PpGipedyU6?= =?us-ascii?Q?7ePc5DYhLDOE2XEWQBjsIwWYe9+o7tT2YTIl8aAlwDFUXX94xDv9Fn0XuQBF?= =?us-ascii?Q?S+snZpyIE6Hfqvvcorsrbkj+c4g7cCnQO2P9AfZqQvqM2Ud7t7jj4AVWgGnl?= =?us-ascii?Q?wHFv40Qp6XRrmldVKprtN5atZhqQvrjiOjh/sHG0FP8bQaIZUxtk+GifdthR?= =?us-ascii?Q?IFnRsSjzNjcLuHoaITcvahCzjxLDR1CHjnxlD3A9IN6pjlaiFLeU5zBEv5Ph?= =?us-ascii?Q?lliU+CPg9xYwR5DG+DInacYrptQzjRuGYN6aw8WuKSljnBdfrF4FA6+t8lIF?= =?us-ascii?Q?MJWZVS3QKCuVN0VUvEtpGEpNYTheZz37EZz0Cc7+0CHrK30JjSL5LOVnsuIY?= =?us-ascii?Q?19gWj2d+5/I/9K9TE1cCX8BkujAlSLUJuwMig7Q1FjA9sJxERQ9w92jObl9S?= =?us-ascii?Q?r00G3XBlgcbww5AoPnB0tONbXt4eGDrya0Eq1vBZVPDWBjelnOTq/M488A/E?= =?us-ascii?Q?pPK6g2wZXvoRBhvmM1ChHGr2yI4r831GEserxFSFMfH4k32ErZ2q2J4u4kFe?= =?us-ascii?Q?KqcJtPHOqo+mRieXk74Q1581a2526WTrkVPcsvs+ukWKZBkc0kQGvX4MCRU/?= =?us-ascii?Q?+JnL96PFUUr/Ni21c9MCmULYJxoAMw+LgezPxgTd82M7xyuBTmyI41eYDLen?= =?us-ascii?Q?aFiJRcE4cVoeu74pA5He7M0o45wFo2dNwFyA8eTq50iEE6OwEY5WNtchlXni?= =?us-ascii?Q?x9/2kE4mDRMtYN5XXRos2Y7fr/UUDNlwfpXmhE2k9KvGkQ/e6T3/v0ntHIKl?= =?us-ascii?Q?7O9ushxB8TO+siFnhfsgIeljf8lYBlFA9re4rkxto22Yzn1B1NKP27K2cA76?= =?us-ascii?Q?07MPxBjoa/lBBX0ofASfD/wfn/VdlkL4RNteyB7IEtSCUBHN4B9BtbM/b1lS?= =?us-ascii?Q?uugm4aaYv2V5LE0t3kjWnXyLIls94aepeEci8fWPa3yOfGJ7fcB1qqTM+7Vg?= =?us-ascii?Q?oJjtcfVU3HuO2Gt2FHO97kiSao2AADLmro9kRx0YmhzD9ZdlZlAc9+P5bDD5?= =?us-ascii?Q?SrtRHhpaA5AMjuoZhe/RInfc84bVA0J5YNwFnX72QWei73n8f9dpuofcHGde?= =?us-ascii?Q?P9jqKovmeQ62RHMf6IyAzGZ4e3fPRhwUDc+LVHMnmzVAU4PwzrsAtMYEp8bH?= =?us-ascii?Q?R1tuz1EUaKGMVaHpB3B8x1h1WJhmbu8KZ97qiEHvG0gaW+4168Ni8qA7621d?= =?us-ascii?Q?lAr84FLGUUx1x2nftwX7RzbQRJuGGPmaLIKqyqpWPO1GwCRUM9DN85uHs0ra?= =?us-ascii?Q?ssx5ZA0O0TfeyXLlZ6LQ23kXnXWtibLoiS6L5CcShmqFGNmqsgLfV+JNf+VG?= =?us-ascii?Q?9bAxhcTcFcsXOhDTzu8S0XNf/d4SLMZm?= 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)(376014)(82310400026)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 16:05:50.3324 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c984ca74-7e38-4929-8c03-08dcd27b9b12 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: SA1PR12MB7101 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 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 --- 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