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 69F6B44145 for ; Mon, 3 Jun 2024 12:56:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62B9B42E1C; Mon, 3 Jun 2024 12:56:57 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2041.outbound.protection.outlook.com [40.107.94.41]) by mails.dpdk.org (Postfix) with ESMTP id B7CEA42E12; Mon, 3 Jun 2024 12:56:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=THpY3hIVncUxj+oO6IvNiG2kX0PrnfxNCZIs9YhLBtPqwo5F0UKRey2eos/ECpTwt43/+R1LfNhfzKLV1j6Hh0ZZnrGsghyOR5EgfYKSaguGxRGaxqrKTNTpDQJLq0Gc4fY66CGfsPWq4j14vgK2wv2AQAkND4uJARrilt/whRi00JTrbz0P/ASYIicbEhem/m3m7YSvTpd2wvLHJyIADEMzehap73yyOkNaAfznDN6WFDzWAoVwQho7WNGMoaDMWhzXgreCADe6ms41Rr40rkmEXBYypqmE+9K2+ImLaX8AWluWzgTH7yHs8o7qynXzym7J1eeKvsuXD+YnUs9zsQ== 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=RyRC4NDCYYGW1A0YvZs4BbxKn2K+FRpZiI+L2awe0eiU4vfS8sqrhN3F9jtO5lxo0wkfBaNqT7HKu2honICbtSt7ILK3Isn0R8MdyYG/Sq6TnsussG9HseC5gfgIITSjyuwGUytrCip4+x4EajDknrZknQ9HwjCNapfgN7V3TIyMr9So+c4cQGEFnz8MjAfz+7eoYgpGg0qW6IaSHNaXJYV1ARXSGCiL/o+ti1cfIJpdq1e7flXMaQaUJFt9AYfaRlcq4I5GmKCvQn3S2Tg+L5lgVQQ76vgxQ39CJwHrVdSBu8nch6k4vRmnSgSjrz+EKA0YGCqn29rA7on7IAzJ7g== 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=eO0Ff+QWz7MD5mGykgJ160EukrgXhsL+7K1zQiS+r2M=; b=Rp5dfGEP4XUfL1HyYvdpQmZv0WYqgXDHtj2w/GzlbxXFlUsd/1Q48+lvJ2FyyEKBPd5lhHPdGXj0b+VxdSf60vCAb+r5aMrU47StprVMAximgZmndpI/UYTm+E4jrHOA/NjBjDWjuj6FvVNu/yJZCEYNQKOuAQXszb1sbk5LxSYdVCFZSfhBnMRRHvzhinq8LlRv/Dau7CzrPZ+s7h0iciYZmXO9msURGX8Lb545chtGDUz6v0jM2S7JfLSHq/ofAMoFzTkRqeTdeLNdXHCXYA6uqvIVzmhUGZ/ExGON+sq7ZWue6EXh2LWQrlB3o/ogjmIyn7sbgMWmf5FVJ4yOEQ== Received: from SJ0PR05CA0042.namprd05.prod.outlook.com (2603:10b6:a03:33f::17) by SA3PR12MB9132.namprd12.prod.outlook.com (2603:10b6:806:394::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.22; Mon, 3 Jun 2024 10:56:53 +0000 Received: from SJ1PEPF0000231A.namprd03.prod.outlook.com (2603:10b6:a03:33f:cafe::f5) by SJ0PR05CA0042.outlook.office365.com (2603:10b6:a03:33f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.14 via Frontend Transport; Mon, 3 Jun 2024 10:56:52 +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 SJ1PEPF0000231A.mail.protection.outlook.com (10.167.242.231) 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 10:56:52 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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; Mon, 3 Jun 2024 03:56:42 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail202.nvidia.com (10.129.68.7) 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 03:56:41 -0700 Received: from nvidia.com (10.127.8.14) by mail.nvidia.com (10.129.68.6) 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 03:56:38 -0700 From: Maayan Kashani To: CC: , , , Yevgeny Kliteynik , , "Viacheslav Ovsiienko" , Ori Kam , Suanming Mou , Matan Azrad , Itamar Gozlan Subject: [PATCH v3 1/7] net/mlx5/hws: fix bug in matcher disconnect error flow Date: Mon, 3 Jun 2024 13:56:28 +0300 Message-ID: <20240603105635.11124-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: SJ1PEPF0000231A:EE_|SA3PR12MB9132:EE_ X-MS-Office365-Filtering-Correlation-Id: 6524bc5c-3627-4a0e-a18f-08dc83bbe038 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|1800799015|36860700004|376005|82310400017; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?eq5fXUP+Jmf3z2tk8Q5JRwtihjyHiMD1oCk0Vylyyjx3QcPz4cNcnd+rX9LI?= =?us-ascii?Q?GurCOoC9dWFcFTXapTlYSsSvzQkVq5oW2yMpndrAjTZZj0M2nzST0PClyhi+?= =?us-ascii?Q?CgbkCmi+pV2G7CsQWiLtH/1ys5LqjGIw8iuLUIjsIUfkCEs04W84rD8ZkwdB?= =?us-ascii?Q?cFvryEWOOmSAIDRB/AS/ZDUrkE55np34Xf+JY6LFP/9EsNx+RVUCC25fH+l4?= =?us-ascii?Q?NLyHlrFRyqG80J+vL7lxHCzN9vaAuCD2T0lvt7hmVwEpCzl4ty7to+rXgYKG?= =?us-ascii?Q?+AwreJ2IFbqZQ1vraPNf3a2SVk4ZybsRVJa6QN7PDcIlajo8RkVU0OJe4t1K?= =?us-ascii?Q?5cRS2ytFt3EChrDe6N9DwS5Q9Z2LtM7n9Mrc01SNgVPFQbrhUDCYer3sNmp0?= =?us-ascii?Q?HFesDEE75Da5PKi6lBSPky3OLZFn0hxrAMZ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go7XjXB6qhS+LF261nKX++/IwPVrGvJ8mmKmaMGIteK73?= =?us-ascii?Q?WZoRVe4sddATEGTfHamDttyp2xOM?= 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)(1800799015)(36860700004)(376005)(82310400017); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2024 10:56:52.3386 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6524bc5c-3627-4a0e-a18f-08dc83bbe038 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: SJ1PEPF0000231A.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9132 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