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 1CA6844172 for ; Thu, 6 Jun 2024 11:55:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07AA240EDC; Thu, 6 Jun 2024 11:55:55 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2070.outbound.protection.outlook.com [40.107.93.70]) by mails.dpdk.org (Postfix) with ESMTP id D029F40E64; Thu, 6 Jun 2024 11:55:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cfYkjN+Yl9U3y+Hwf1gpZ8bY4ByEyhPcEhUHviU/OsWSCZki51Qx5J2mp67EzJGj+Ia0bcHe1sb951cHMsWOuEAb+Ynd7TzxcYQIz+n0OMc6Ydq7f7xjZvEVMn3/ylavlWqCXXl+eDDpOLjfmQhmZKl2qmO8ystXqusCK4X7sehRwLbsHa2Xn1Z0FSOm5xJjwBxsMdIhU/u7c8vKr7adxayZ9e9cXA3Omm7c7ydqI/7T6e3eM/l8Oa+g0l8vwc3bFsNSR/cFqCddS6xT20kuiBXAdifX/zmfvv3J15ywG+0y+1VErcElYivg8+FG6AQuw2SA2lQEviLW2GO9JU4+iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=y/IUvWOyLAmQ2QMVNXz38YOB4QwuEV8tdcqmwGf+Sv4=; b=YaIbZNto2olorXiLe3kPd+w5vlHe2G4xE2YSuTL140WCMMjkA/UgNBiQQ7zi4EZIanV7M/AxEDJt0wNRf9nUtXsThgteFTqQ1hwAMr8fkzyxeuDHBgrhsz8WTsDGHOoRq6sfKJ8Y16FQycLrxeVeClp51omHVTwUY7nfVth3Yl8owWwVTdYsnKev6ty62yo7VaHP2/n8zR858M9hwKVTU0dL4Dl82IvnRbIQAbfzb3w0DJDvyPCAGhLVZx/WaLfIWAjnkzouF/GMuyN9AEJt7kk/Qsj3J9sCrZQsCIFi9Nmcj5nxY+UllwoUwMQjnTmZGM5i5owI4mD5VI1u7ZCz5g== 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=y/IUvWOyLAmQ2QMVNXz38YOB4QwuEV8tdcqmwGf+Sv4=; b=N0eN6cfRKJ/48bSe4/CegBZ5vuLbaU02RHlypd49XLvjB2p035yu9cEJOkwWTcfSQRghhUroQrPE7geBfoFNdmSNB11MT6607uNGNs5mpT8E22ZIbBkCkJqacSxQosg6JBTQ8aceCQIT3xh+ViBErR/uMFVz0ekmTEf1KVOudpY5xuuwP/LWHlGUEjhkxyuDbfuYgiY0Y+fACXYPUn6oJ+7glB275PjUuONAyHsXtHnqWVe+qqnvvJtX6K5oKCcUjLZNQjZMdsiDEOvJMo5l4CIN3SPDWdzQlu96JxaE4cl/p54z43OEmT4D5SRZKEcVmBPYnPOcu7XjKhwlSjbX0Q== Received: from CH2PR03CA0023.namprd03.prod.outlook.com (2603:10b6:610:59::33) by SJ0PR12MB8137.namprd12.prod.outlook.com (2603:10b6:a03:4e5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.24; Thu, 6 Jun 2024 09:55:48 +0000 Received: from CH1PEPF0000A349.namprd04.prod.outlook.com (2603:10b6:610:59:cafe::c) by CH2PR03CA0023.outlook.office365.com (2603:10b6:610:59::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.17 via Frontend Transport; Thu, 6 Jun 2024 09:55:47 +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 CH1PEPF0000A349.mail.protection.outlook.com (10.167.244.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Thu, 6 Jun 2024 09:55:47 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) 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; Thu, 6 Jun 2024 02:55:35 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 6 Jun 2024 02:55:35 -0700 Received: from nvidia.com (10.127.8.14) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Thu, 6 Jun 2024 02:55:32 -0700 From: Maayan Kashani To: CC: , , , Yevgeny Kliteynik , , "Viacheslav Ovsiienko" , Ori Kam , Suanming Mou , Matan Azrad , Itamar Gozlan Subject: [PATCH v4 1/7] net/mlx5/hws: fix bug in matcher disconnect error flow Date: Thu, 6 Jun 2024 12:55:09 +0300 Message-ID: <20240606095515.171170-2-mkashani@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20240606095515.171170-1-mkashani@nvidia.com> References: <20240603105635.11124-1-mkashani@nvidia.com> <20240606095515.171170-1-mkashani@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000A349:EE_|SJ0PR12MB8137:EE_ X-MS-Office365-Filtering-Correlation-Id: f0e669f0-1e61-4e52-d7dd-08dc860ed710 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|82310400017|1800799015|36860700004|376005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?OeACmiDlCZkh3W6r8Rna8NnFBESh0MfzX6Rk5kvDCXwaus4RAyp/YxjfpPkp?= =?us-ascii?Q?qYnrx0bXmm1vzSGt3tAq6CishIQsYoHry9Rh4riOA7Ti1dWEs7MgRJLhqaqA?= =?us-ascii?Q?nXGiKd/AABQ7gE4g33ouB60us/6HhB46LZUPgVPEGPfHaD+NDpIiNXOTQZlN?= =?us-ascii?Q?17k7FSOv0uKyj0Zh607invrw6J1PxUI8sMBijSEDSOc6g78bpPZn3CxlSbV3?= =?us-ascii?Q?c6NGVMRPHabkoP2zAMxFzVCtOQcDhNBumpS3qOYScBThu9iky1Tygwg2mPdp?= =?us-ascii?Q?phNGbT5ZcOZ8CD4lmwJSYRXsXHhZkxl0FFe4smxOjivxUbRFUGIf50fL524C?= =?us-ascii?Q?G8nJ41suyaZv4zvbbrhlYjLdcnTA0GFoqTreuUHmgT6EJKxoQ1t6/KNiXE+c?= =?us-ascii?Q?314I4/T42qyGnJttELsTuh+4A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ik3?= =?us-ascii?Q?H6U4o0W/jhcSjuHk2UcDIUVXEC8q9VOTulUb/vMv72PpbpMGWhpDrQ54r4Xq?= =?us-ascii?Q?LGflAweOmQWPm9er6ESNSnEiUI9kHwBsEfAyKvUx38JYCtQQRA=3D=3D?= 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:(13230031)(82310400017)(1800799015)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 09:55:47.4074 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0e669f0-1e61-4e52-d7dd-08dc860ed710 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: CH1PEPF0000A349.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB8137 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 From: Yevgeny Kliteynik If error happens during disconnect of the first matcher in the list, the matcher should be reconnected back as the first matcher. Fixes: b81f95ca770d ("net/mlx5/hws: support default miss table") Cc: stable@dpdk.org Signed-off-by: Yevgeny Kliteynik Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/hws/mlx5dr_matcher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c index 79e7401dfd..2a84145566 100644 --- a/drivers/net/mlx5/hws/mlx5dr_matcher.c +++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c @@ -340,7 +340,7 @@ static int mlx5dr_matcher_disconnect(struct mlx5dr_matcher *matcher) return 0; matcher_reconnect: - if (LIST_EMPTY(&tbl->head)) + if (LIST_EMPTY(&tbl->head) || prev_matcher == matcher) LIST_INSERT_HEAD(&matcher->tbl->head, matcher, next); else LIST_INSERT_AFTER(prev_matcher, matcher, next); -- 2.21.0