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 EC2ED45962; Wed, 11 Sep 2024 18:06:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41D7443287; Wed, 11 Sep 2024 18:06:04 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2067.outbound.protection.outlook.com [40.107.244.67]) by mails.dpdk.org (Postfix) with ESMTP id B4F714325B; Wed, 11 Sep 2024 18:06:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HRDtv0mzEEsQMkZtESlirM7k7FPbdKb4SwVK3KHWOZKi7USBMb3Q7rcAsxWrY1EfddKumDRNSiUSEhME4iDQlBG8bvWBnzhBsxpacXqjj8mBO195uiy6NAEKOQNOSM3Y6qmG6O3n/F9+n5t25SHbqMBsR97QNCNLLh1bGM1JHbVQmRGGxS+lZVZBjN/NgsY+nKCel0W0AqcCoOZM30fSoMdd76zZFRbwT++zCtGL9z5iTq/PfLe+I4L4wxbXiUun09bdAipOA05gxDjf6MXSkDxPeK419lx5jVPSa+HiQG2A/xmxbA6D66WrsLujRGh54RSS9N4jCy+A7QAxUfsMbg== 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=dSsNBnKYkKCoBROO028dZkQvwzmgQl3UZhzatTPRrn4=; b=PiJiZExJC0k/MJvlMmvfHH9R0Y8sQADs30CZS08ZTen17BjigKgPuQmKb/CvacP1DuD0LfKfIFmbRu3ZXbkjU7/fuGSVuVYEVv0/bVw62bf10vfMVav1sFKvH0bcxjz1HrfkFZkSWXigsHccCqS0wIlN3EPOKlAEwq22c5j8OFY/3Ll9ZLoLol/9V2bti5JQ3DKcfcfixSzUmPPKtFuOsJaOTlPgi6ICHDwKXbikrSjpwV7bFvYRkWDCMY8IfiCDXsHbzn57E123bSIzKIcO6bDReLWqtbicN58Hv4asoIdnQ7MmbDf592d7+PKxEq/d6KPQYFmF4dF5l0fX11pw7Q== 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=dSsNBnKYkKCoBROO028dZkQvwzmgQl3UZhzatTPRrn4=; b=S17uRpUp5sK+SCfcJWQyRv5flAFrShjffs3D0HtLL5FV9DlYCIw0P64ySEHiOKBf9HCkO9cDTS06oF6+n+6Pi4Ufi/fYjBryBqv5s7kzo3pYlrlSqD1lgvsTtmVKFEdf09jD5jzNDVde/KoUzWiu28Ylghr8CHOe7fWB8oqxvaDFlaIKRqfaauR29q9y3fBB3Wbhe1zr8NPpngEyZB+UjNb7hxknJ1SWvrNz76TE8CJ0FJPeEcW3viHE+vPO8apBAzWy2P3RzspWqwxIaa/TK2x7ZwJ2yYEbEqBsKyHBbM899azrVEyYl72GREA6idyruqc2WBDQ9FprQay0x2UT4A== Received: from BYAPR06CA0030.namprd06.prod.outlook.com (2603:10b6:a03:d4::43) by LV8PR12MB9230.namprd12.prod.outlook.com (2603:10b6:408:186::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.18; Wed, 11 Sep 2024 16:05:58 +0000 Received: from SJ5PEPF000001D6.namprd05.prod.outlook.com (2603:10b6:a03:d4:cafe::38) by BYAPR06CA0030.outlook.office365.com (2603:10b6:a03:d4::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.24 via Frontend Transport; Wed, 11 Sep 2024 16:05:58 +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 SJ5PEPF000001D6.mail.protection.outlook.com (10.167.242.58) 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:57 +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, 11 Sep 2024 09:05:41 -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:38 -0700 From: Viacheslav Ovsiienko To: CC: , , , , Subject: [PATCH 7/9] net/mlx5: fix next protocol validation after flex item Date: Wed, 11 Sep 2024 19:04:56 +0300 Message-ID: <20240911160458.524732-7-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: SJ5PEPF000001D6:EE_|LV8PR12MB9230:EE_ X-MS-Office365-Filtering-Correlation-Id: 29cf669c-2507-426a-155d-08dcd27b9f94 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?PafLviUheBjMxOhsfLbpKfEy9oVaaBWxXl9bVR102gj7ruo3h91uPVSwGUbR?= =?us-ascii?Q?wRSJ2FmlhSA0G4rYM/MzKuLOguBx7hOhR2IhPQdcgJ17q7z/C4ssfat7ZkRc?= =?us-ascii?Q?FkRUEkCUl1Om4SC/xA/JCyRjXKDwfR3KC0pUztdTGa7VdddwfWZ/ujqDIJmE?= =?us-ascii?Q?FXy8TGe6nNKE+ATfOtGDBfGNlUWP1nTfN1ochfhCHIt+xw59Tb3FMH67kvpf?= =?us-ascii?Q?ZRjZBRzPqXIFhKYk76sogC97AhvWubXutKXuP4sjxXzoY8/bVvOHlRYUXdEe?= =?us-ascii?Q?W/u+Mo74G97fbst8yXCh5wQCF3kKtvYtuwx133NdkrPBybPyKJ9USUWUWFdu?= =?us-ascii?Q?/Rg3Kq13EYkt6rSO2ohrFYVM94vHmnLhkm3ceGCBQiAjGT3yzwI3cC52//mZ?= =?us-ascii?Q?1nKzbRXjQe2jtakMZwlrv3QYKwLB602ddkZaUDLgXw2QoGzG6GmI5qIsvZny?= =?us-ascii?Q?M31xwhp+38Ys6gGR6UI/x8JG2Km2NCCShk73Oy/bFPLAoHtDsWu8/7w2XUhF?= =?us-ascii?Q?Z7080KuTgAyo9YUyGHybLYa7fHXQNWZC9YASLWyfE1wDYIlyXg7KST5f9g7c?= =?us-ascii?Q?NatnG07gO9HZaULKHhEaD+HgGTYwxUdJMMVXC/+hjW28YpDoUDfSiHyrzuAm?= =?us-ascii?Q?H/CgybAq8YKFFXnwQTErU252KcFyc4m1wJSlvnMxG3SjVttkK311bs62M+FI?= =?us-ascii?Q?I8k6DTPxUsWqaMcl3uE46uxE66vck0PBpfqq8LeFsmRcww4XMCkvms2KoKSH?= =?us-ascii?Q?+JFg2EBejgGgz7FmauPDHiDoScvNTUCc52/MXHJribeGMGgFBb8CwhWiywNU?= =?us-ascii?Q?LhZVv4jRY/mi/QjsyJO0FNKL98h31EMoAirVxIpROhy6nm4LFpj/ZSz90JiS?= =?us-ascii?Q?qAxfyD+EMCFeoyywRMl35bcz2i9DS4I1S3dhOND7aH95J9Wbvzs8wZDeUazs?= =?us-ascii?Q?kiSY918QfWhCZIMlCEBzK1nuUxUPoznLYsm8OnKKXmp6z9ROQklBAdm10fuo?= =?us-ascii?Q?2Ujhd1cYw0wgk55+6lm9GtZlI2k/B4tdm1Z5WqmwKehDdPh5qPCdS0LWclrd?= =?us-ascii?Q?fwQTRrgf9ClNQKBXGIFmQbxxqoeN4mD9S6Fydh1r+goK7xSSPNyhzet86GsT?= =?us-ascii?Q?FxralbCVrP3TAfk9SiMKQy6kHqkcggw0YHwpq4A0/6ZCwfH8/U1S9NJU4nhJ?= =?us-ascii?Q?R/Gi9SdAT12It4ENbXZ0yDazRah8DReUKqqcpEM0nf9XhhjhPyaQideK9GHL?= =?us-ascii?Q?YNk7rXMljpodUC9OvCmwrlwUaj2dmGZXQUAiRSWN7msdf4koSyEuMTqbm7Oo?= =?us-ascii?Q?Qg5/dV0vnTkd2488aw56/YsEkV7LaN4o4EA62DCN1PrcouTSXjOsDmi7mHyz?= =?us-ascii?Q?ITNfvBQCFMnW79AevYmFJOWeWEcg0kT71AYvvWuNzRMM5AA27DdtN6eu4ZmE?= =?us-ascii?Q?UULAVwju8F+xa3zCwf9x/gH9mcO5w0rA?= 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)(36860700013)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 16:05:57.8454 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 29cf669c-2507-426a-155d-08dcd27b9f94 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: SJ5PEPF000001D6.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9230 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 On the flow validation some items may check the preceding protocols. In case of flex item the next protocol is opaque (or can be multiple ones) we should set neutral value and allow successful validation, for example, for the combination of flex and following ESP items. Fixes: a23e9b6e3ee9 ("net/mlx5: handle flex item in flows") Cc: stable@dpdk.org Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_dv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index a51d4dd1a4..b18bb430d7 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -8196,6 +8196,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, tunnel != 0, error); if (ret < 0) return ret; + /* Reset for next proto, it is unknown. */ + next_protocol = 0xff; break; case RTE_FLOW_ITEM_TYPE_METER_COLOR: ret = flow_dv_validate_item_meter_color(dev, items, -- 2.34.1