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 5A0A044145 for ; Mon, 3 Jun 2024 10:26:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52FA542DFF; Mon, 3 Jun 2024 10:26:26 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2042.outbound.protection.outlook.com [40.107.223.42]) by mails.dpdk.org (Postfix) with ESMTP id B3E34402B7; Mon, 3 Jun 2024 10:26:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+uzEi5jnvkDsZA9uF/Q+eqIbe0OSFX6iRfCvxfMkLb+lnug4NztrLDZfYSIe0QcZdf9cJluh3qrABxb3OKH+CzhiZhh0ePxz7fNNv+ed2Gm5pFws+MYKOGbjiir+V8n6LID4jGWsC/qce+129DugpuF2WX6FSpevFOGPUny6MgqeSfnLHurWz2C99B7xQIvfLpzGu12Sb8YX8bysQNegI170YazOYzPTX0zVfQHoZb2KHvP/p8UEMpJ/z8b8Ayb5aPMYzKDkIjAZNJ6H7e0EP3X1ak7bz5jCT8/OYiDBG9HRvs819o6En/IWbJGiVupLqF4V8GRxMmDkzcQ852Y+A== 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=eO0Ff+QWz7MD5mGykgJ160EukrgXhsL+7K1zQiS+r2M=; b=B7Trmc1ZOTJZAN7h4jjys1TYflmP6pU40mc85nRFWP9YQ0NCGuHFdqVKe79szfWGSo4BtzppWNtNNSX1tsnwtnCIZbTYOKKiqCJGP36Ve8LaWcwva6rZeVXULjX8Yj4B3a1LjCGovOA5Kzf60Ys8F6r07pQVJmdhCnfZ+uu8AHZGG81PXDvhi6SJ21JIBqyEcguowuXUIc6Dn0IH0abMi1XXm2++uvdbNNQrn72L+IWn+i4K6Z12gnuHzhsNwa4frMDxI+24aIiFw7+IoygjziUAfZPM1aItuxqbbGczpd7AozcmwV+w8P73s0GI20GVq3uwdGzpXtR0oY6015V5aQ== 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=eO0Ff+QWz7MD5mGykgJ160EukrgXhsL+7K1zQiS+r2M=; b=O+Z/K7PDQU0Gzn3LpbZtcUthnNF8bsWHyPQr8nQpMVeNRYa0xwbhsQ15r10l8w71zu92k/C9idWdMi5CqzhTHfGJZSjEN61kF4ffki0pUZ6G2ZFW/UTXqB7ICy2AKQSBXnV124fYKN3YfCy1gktIXunriU7a40jgIB/jpAvbYdEkX4jAeUisNjKpMVhQ05taqFoGpSD0bhjG6XwYObKH5YBNIQOSagv5MEJUhwRSzgNh/6b2YH61WwHmuTFDbn9cX9WXFcCnFVnaWR7BN1zujfsg7YvtVTmJVwJdhIlSfaa8enTK8oeVuLck/SJojxGsKmHQ/yVCEVL4Kyo4Q/iF4g== Received: from CH0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:610:b0::19) by DS0PR12MB7510.namprd12.prod.outlook.com (2603:10b6:8:132::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.25; Mon, 3 Jun 2024 08:26:21 +0000 Received: from CH1PEPF0000AD75.namprd04.prod.outlook.com (2603:10b6:610:b0:cafe::93) by CH0PR03CA0014.outlook.office365.com (2603:10b6:610:b0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.28 via Frontend Transport; Mon, 3 Jun 2024 08:26:21 +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 CH1PEPF0000AD75.mail.protection.outlook.com (10.167.244.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Mon, 3 Jun 2024 08:26:21 +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; Mon, 3 Jun 2024 01:26:08 -0700 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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; Mon, 3 Jun 2024 01:26:08 -0700 Received: from nvidia.com (10.127.8.14) by mail.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 via Frontend Transport; Mon, 3 Jun 2024 01:26:05 -0700 From: Maayan Kashani To: CC: , , , Yevgeny Kliteynik , , "Viacheslav Ovsiienko" , Ori Kam , Suanming Mou , Matan Azrad , Itamar Gozlan Subject: [PATCH v2 26/34] net/mlx5/hws: fix bug in matcher disconnect error flow Date: Mon, 3 Jun 2024 11:25:54 +0300 Message-ID: <20240603082601.4173-1-mkashani@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20240602102937.197117-1-mkashani@nvidia.com> References: <20240602102937.197117-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: CH1PEPF0000AD75:EE_|DS0PR12MB7510:EE_ X-MS-Office365-Filtering-Correlation-Id: d336bf70-18fc-4d0c-d0ec-08dc83a6d96f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|36860700004|82310400017|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?SiVK1QYPMIbxr8hIrcqMPE8h0SIh3EyoJeZxTxpLMTzRRmr96xpUHXxi64KQ?= =?us-ascii?Q?zODJVuSVPhUYKQ3NRHcfwztSeOClCtgPQ3XoenHbaeXgeqvYnFOz99I3pel9?= =?us-ascii?Q?/QWWygGW7QHf3FdgoGNfoV73PEv7lvw5sJQJOiBCZUcJsQ2vo/tKfOC73AZJ?= =?us-ascii?Q?KOFRdXQt/r9c72FqJgYPG6kv3Gb1Spv7ehskKadtPD/KUlD5cf79sSTVlEqd?= =?us-ascii?Q?1Rv/UA++uPgv9P90hVHYNoJ/4IoKnr8h+nlIu3XdcaxS4p4Vh0yo6QTxedGm?= =?us-ascii?Q?hOg0Wdf+dJBZKVz5IPk+cwyOu2GViNKX3mipDAh3v4a7lTzOhr7u/leKbIPQ?= =?us-ascii?Q?+YQq5KTg5ndCfO84es850GJc8tASs3eeZ9vFiyf+uKe7JKrpC/Ne3taf8n1k?= =?us-ascii?Q?WfsaQMzmM+sj0w2DdXvcTTQcJIk1JLwoAj3n+eo1vk2iZY58rJ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CKpsZCPsM5M/BeC14EVa8U/FQsLGqgJhcJWbvPZylf29/3Qr?= =?us-ascii?Q?geHDJYAV/yGxIdEG7oTGn2LQhVgP?= 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:(13230031)(36860700004)(82310400017)(376005)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2024 08:26:21.3998 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d336bf70-18fc-4d0c-d0ec-08dc83a6d96f 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: CH1PEPF0000AD75.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7510 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 --- 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.25.1