From patchwork Wed Apr 8 22:51:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 221336 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E187EC2D0F4 for ; Wed, 8 Apr 2020 22:51:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AB10620730 for ; Wed, 8 Apr 2020 22:51:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="NMHrRMPK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726545AbgDHWv4 (ORCPT ); Wed, 8 Apr 2020 18:51:56 -0400 Received: from mail-vi1eur05on2077.outbound.protection.outlook.com ([40.107.21.77]:45409 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726492AbgDHWvx (ORCPT ); Wed, 8 Apr 2020 18:51:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cX/90JvWEkeYpwbKT8QouF6UzLBYm1vuotj2BDA7O4I0BX3D9npzaRqUe1bgPSMwZZ/GXrfuTvrKh/6q6/ubV8eZgRvjX+aIyWaGNtlHb/ZWgjoof0LLe+I1ma0meCEh9HbSmIvfUe1k3/lzykBHUTHCpPvVXPlcRUUXgJvwbmH3UUL7QwtxZZJkeFhMtTddbqndYox9NKeQZPpp2Nq0HHmK1SuJ5q2j81tsZ6f+4LwbjkHYIcp8rj4QLLwAeTFRB0ycA8lPc1omG2ahoCgU7xrSviEz1vn4hIuKzNTXu0ld+EJtCLMA0PQ7KAZ1o22c0BMunDBdBtoXW3ElVOnhWg== 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-SenderADCheck; bh=G3PVvsfm9F5BJCdlXoIrPNeFR3y8s+exThwWwY4kc3U=; b=kCedcMITaUUKoo/BwcqhnRkT9qoWgl135ajqvY/qSpbHzqUfA0+SXTVvEaufncp19fPARfA1OQPT7EEdBXpV1vzCv9FnMx+Iy2hVE6c2BHFV/ip+w8ScRskBOut5vE0ejKfTmyv7tZ083bzaAK8Gf5vw306e0K0nXzJ2Wew00S2JQ3xBC5xuiMmWhQ9aTOGqvu3gt/3KhWcweebZsTrC0ELeOw9BA0kjbfl+FjYoj/IXsqBppvssqlVxrV72UnI+UMB+XLHSdzu+X82OeTv5cus6V60KBpdnA2Ldxh1DS39xPpy4p/ZgNpcWvCCvPgMEJuEUa3VYC93QcssKJxQTlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G3PVvsfm9F5BJCdlXoIrPNeFR3y8s+exThwWwY4kc3U=; b=NMHrRMPKNzgDwv3gK3ikpA41s2acKV+Z48ox7KcYDiknmI5YuHvYdAlsByLH/kr7QC81VqgWL/vsu4tqYtKcZtG+UVFGrUfvsMqHY35KAqvVYXkAz3a79tyzuI5b9eVuonG+2nH/jbtXXVY5P3XRrP0pvc/zJs0A+7EWyPMSmKE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB6365.eurprd05.prod.outlook.com (2603:10a6:803:f3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16; Wed, 8 Apr 2020 22:51:43 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19%7]) with mapi id 15.20.2878.021; Wed, 8 Apr 2020 22:51:43 +0000 From: Saeed Mahameed To: "David S. Miller" Cc: netdev@vger.kernel.org, Moshe Shemesh , Feras Daoud , Saeed Mahameed Subject: [net 1/8] net/mlx5: Fix frequent ioread PCI access during recovery Date: Wed, 8 Apr 2020 15:51:17 -0700 Message-Id: <20200408225124.883292-2-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200408225124.883292-1-saeedm@mellanox.com> References: <20200408225124.883292-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR06CA0026.namprd06.prod.outlook.com (2603:10b6:a03:d4::39) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR06CA0026.namprd06.prod.outlook.com (2603:10b6:a03:d4::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16 via Frontend Transport; Wed, 8 Apr 2020 22:51:42 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 17f37222-f2da-4cad-f5e6-08d7dc0f68ae X-MS-TrafficTypeDiagnostic: VI1PR05MB6365:|VI1PR05MB6365: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 0367A50BB1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB5102.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(346002)(136003)(376002)(39850400004)(366004)(396003)(16526019)(956004)(6486002)(26005)(316002)(478600001)(54906003)(6916009)(4326008)(2616005)(107886003)(186003)(66946007)(5660300002)(8936002)(81156014)(36756003)(86362001)(8676002)(66476007)(1076003)(66556008)(6506007)(81166007)(6512007)(2906002)(52116002)(6666004)(54420400002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oNB+QsinHrcikeoKZrcm3ksL/5h1DVCaJh9bRP4/GPn1w8mGJDCNQM/q3yg9hL93H3ewfU5NF7LweGVbRrzRRUnJghTtPvWsNBPGnb73eJwZzCJxw1ZqSlqv5mDAd4CrYuq+xqSsHcMToVjz2JferrA2/l+byQAPzxy0qiS2ZgO9nUdThKfscXjdVUlbm3PghMOMGIFuA50tANjHZYEspM2yJmtfu5YkB12btX2J6lTq2FfJPMvH3555uI69HbWusbqRjk42G1YWkJnj2ptb+iSPyW2RGn8oWXC4DNuelp0X9kohCMtyrQ0wJhB/UwktI1jgNYGKTh60cXK0bfFpY8f3JtW0quuRNWv5R0ipoWqSv485DjKDFM0fKZm6IXQ9UbLoAJtkZrY618DB3op6JRkIIEgccyDDSbQFxJByUiJd491KZieQ4/+zj1uXpEfjMWLnbpzjDcaWf2v7vkmRyf0+7ytXUwWI8VVcTv32D99Q2xvtGR3DE+SuuMcXyHsv X-MS-Exchange-AntiSpam-MessageData: TjQJAujv6ZXrBAHrDOz0HA8kHRk73OB/u+XI0IEUD+Q3+V4t3XYE/Gg61TP2NzXRwoO+1HPjioJTtckJk4G5SVnK2ecFoTpWohVL72As3jm/dY/rnQxPKOwAezycKmEjp089ouhj2UlCDVNf++ZJIw== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17f37222-f2da-4cad-f5e6-08d7dc0f68ae X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 22:51:43.7300 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: C390j8GEbrGO0uNnFKRwMKA3jaZNHPTmf8ZfE9Y9igtF29cw6NSBJtPIsoYyM66yW/p5ZaM80l3/MHfw8a3cXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6365 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Moshe Shemesh High frequency of PCI ioread calls during recovery flow may cause the following trace on powerpc: [ 248.670288] EEH: 2100000 reads ignored for recovering device at location=Slot1 driver=mlx5_core pci addr=0000:01:00.1 [ 248.670331] EEH: Might be infinite loop in mlx5_core driver [ 248.670361] CPU: 2 PID: 35247 Comm: kworker/u192:11 Kdump: loaded Tainted: G OE ------------ 4.14.0-115.14.1.el7a.ppc64le #1 [ 248.670425] Workqueue: mlx5_health0000:01:00.1 health_recover_work [mlx5_core] [ 248.670471] Call Trace: [ 248.670492] [c00020391c11b960] [c000000000c217ac] dump_stack+0xb0/0xf4 (unreliable) [ 248.670548] [c00020391c11b9a0] [c000000000045818] eeh_check_failure+0x5c8/0x630 [ 248.670631] [c00020391c11ba50] [c00000000068fce4] ioread32be+0x114/0x1c0 [ 248.670692] [c00020391c11bac0] [c00800000dd8b400] mlx5_error_sw_reset+0x160/0x510 [mlx5_core] [ 248.670752] [c00020391c11bb60] [c00800000dd75824] mlx5_disable_device+0x34/0x1d0 [mlx5_core] [ 248.670822] [c00020391c11bbe0] [c00800000dd8affc] health_recover_work+0x11c/0x3c0 [mlx5_core] [ 248.670891] [c00020391c11bc80] [c000000000164fcc] process_one_work+0x1bc/0x5f0 [ 248.670955] [c00020391c11bd20] [c000000000167f8c] worker_thread+0xac/0x6b0 [ 248.671015] [c00020391c11bdc0] [c000000000171618] kthread+0x168/0x1b0 [ 248.671067] [c00020391c11be30] [c00000000000b65c] ret_from_kernel_thread+0x5c/0x80 Reduce the PCI ioread frequency during recovery by using msleep() instead of cond_resched() Fixes: 3e5b72ac2f29 ("net/mlx5: Issue SW reset on FW assert") Signed-off-by: Moshe Shemesh Reviewed-by: Feras Daoud Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c index fa1665caac46..f99e1752d4e5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/health.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c @@ -243,7 +243,7 @@ void mlx5_error_sw_reset(struct mlx5_core_dev *dev) if (mlx5_get_nic_state(dev) == MLX5_NIC_IFC_DISABLED) break; - cond_resched(); + msleep(20); } while (!time_after(jiffies, end)); if (mlx5_get_nic_state(dev) != MLX5_NIC_IFC_DISABLED) { From patchwork Wed Apr 8 22:51:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 221335 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A527C2BA16 for ; Wed, 8 Apr 2020 22:52:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F20D2078E for ; Wed, 8 Apr 2020 22:52:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="ddK0tvpu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726589AbgDHWwB (ORCPT ); Wed, 8 Apr 2020 18:52:01 -0400 Received: from mail-vi1eur05on2077.outbound.protection.outlook.com ([40.107.21.77]:45409 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726492AbgDHWwB (ORCPT ); Wed, 8 Apr 2020 18:52:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QskhgB1t+jVmV4B1RpV4JZJSCNBArMJCKWN5YGPIZmq+fILzFXjQNZ5Pk/kkxaz41m+yUOGiDUW8S3O/VD0u9cA+IiX5WQVoystKzqKGAMKmPJKaA9oPcIrrbD9d7qmtEOU1fPrtxjnogUIF4YbKQdpG0v5Wy/FMp+a6mtjNGGVwqauZDhfRm0bipI9Erv7b4mdyC47qqmO8rB/dKGTsvJqvr1HZ3QP62ZVvvY0KeAPaSgEbi8WqRWTHpWTKqqBW3a80dXnV1z3pGNQTJTgUDYtkUs6vFQ5Oub5shG+JiWyHegp2PWzCSZWvcMQnX2/PUxZ9tBF+H0q5Ne0GgxA2+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-SenderADCheck; bh=LiHMLeDml2quGTQCYSlVZ1KghaLGuJSjntHiHjX6d5g=; b=EULhjg1Z5KRMgeVMCmvgAOWPomP94oU2Ep1FSrgadk5EXHJAyS3Wy9TTyVxRAUTKiuksigMHYCtHVlo0uqWnHAfx3vrXdwLmWjzFMuP90FiArV419Cc1dGyWq1oMGyKjwfj0jRDKOXktEdli+DmgHmMEihg/W8Gkyjt3VZP2o1sgrb6IjkFjyiSymMRLc4U3EUL5GTigW7w6CZNn+HWNoy012tQHjn3lACCKkOd2SHJKcPsegkNkCteOuLfL0rdlOvuamXmARwgSWEs4k2kWaMT2lqKG3zZ2Z6heBL+nPzu03u/6HoYR1TlJk/21mcY1db1K4MwOw1SnYNbGPYJlkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LiHMLeDml2quGTQCYSlVZ1KghaLGuJSjntHiHjX6d5g=; b=ddK0tvpuXns1RyOOcqyjlFCadNU8kSKXda/VSBeiVQJ54XeKajg4Kkh6BJ1LwxfuAqZJBRYoDYlETXHBumdrYpnV5Hbw5v4SVKMVTOcXsArCqGH8Hut3Nr2z55aoOSLTX2GtEHvPib8t+WpMlbsERalXGzc7xrVu3sRN9m4cK14= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB6365.eurprd05.prod.outlook.com (2603:10a6:803:f3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16; Wed, 8 Apr 2020 22:51:49 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19%7]) with mapi id 15.20.2878.021; Wed, 8 Apr 2020 22:51:49 +0000 From: Saeed Mahameed To: "David S. Miller" Cc: netdev@vger.kernel.org, Dmytro Linkin , Roi Dayan , Saeed Mahameed Subject: [net 4/8] net/mlx5e: Fix nest_level for vlan pop action Date: Wed, 8 Apr 2020 15:51:20 -0700 Message-Id: <20200408225124.883292-5-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200408225124.883292-1-saeedm@mellanox.com> References: <20200408225124.883292-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR06CA0026.namprd06.prod.outlook.com (2603:10b6:a03:d4::39) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR06CA0026.namprd06.prod.outlook.com (2603:10b6:a03:d4::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16 via Frontend Transport; Wed, 8 Apr 2020 22:51:48 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: be0b9394-6b04-4c64-024e-08d7dc0f6c45 X-MS-TrafficTypeDiagnostic: VI1PR05MB6365:|VI1PR05MB6365: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-Forefront-PRVS: 0367A50BB1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB5102.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(346002)(136003)(376002)(39850400004)(366004)(396003)(16526019)(956004)(6486002)(26005)(316002)(478600001)(54906003)(6916009)(4326008)(2616005)(107886003)(186003)(66946007)(5660300002)(8936002)(81156014)(36756003)(86362001)(8676002)(66476007)(1076003)(66556008)(6506007)(81166007)(6512007)(2906002)(52116002)(6666004)(54420400002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p4zRNiCT9tbNR3AaQQsn/ZKcPpbBPBzYjCW+BpIImpTEVVkvg3Q8MQhK9xNBn7vZMZg6G3m4moTtpEpgj71/FwZBE1PImhAxuDsvYAEVEZAkDFASQ0YRyD9raYMWgLrp0FYqaFEaQ2PbyM7cyvLSQ8JAeW+rs0Vl+I2s7NcsFfh75tSHqmwld1F7kr1uGf0r3InkdH3v+UDnpCHdXhahdpG0cS2V74hWU0tQ5oKVkEBInpIdfG/OCwUfZrrHypmNAtDyo0Uwe8/oPwON1VJbikTU0ejl8uK+E7Nplt4p6DF21QkJ84pfrbcK2okaDpQCnhXN3D3uPjkBsE1pA8niyHvCvHhoLRr39qmCVfOoI6PcGnMFMSt483SD5jCTsCQMx+mhio/HCUxyEJX6PdyEx3W4YeHG7APO48xbgxw8r+1FyXa/subMRQ3vkK+5BFE5pGwI9I8FeyiYJwkr0IQebJZALnmV2n4meFjwoSnsaJevaelE53D21iEyyH39CERL X-MS-Exchange-AntiSpam-MessageData: zK47UNUi5Ijg2aNPLrhqRq+qlRfhv1B/mTnU2n5NmrrjDh+WUUFKyX+HZY8YBt3VW1gr/8JBv2IWTQTowsJW/cz9WKZqANq3dFf/K/7b2+GzHnFNqjxhB+5Qp8YkmmWzQldauU9GnYCnGzqHDzJiQw== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: be0b9394-6b04-4c64-024e-08d7dc0f6c45 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 22:51:49.7745 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: f0lpTYpptDv7u6DvJ8MZ2sdwl1vOdb0baBwLsxRTnavfRgwOBp1C5McYRorRdJ9imIGsp+I80I5PZ4eN1ZzfxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6365 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Dmytro Linkin Current value of nest_level, assigned from net_device lower_level value, does not reflect the actual number of vlan headers, needed to pop. For ex., if we have untagged ingress traffic sended over vlan devices, instead of one pop action, driver will perform two pop actions. To fix that, calculate nest_level as difference between vlan device and parent device lower_levels. Fixes: f3b0a18bb6cb ("net: remove unnecessary variables and callback") Signed-off-by: Dmytro Linkin Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index 438128dde187..e3fee837c7a3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -3558,12 +3558,13 @@ static int add_vlan_pop_action(struct mlx5e_priv *priv, struct mlx5_esw_flow_attr *attr, u32 *action) { - int nest_level = attr->parse_attr->filter_dev->lower_level; struct flow_action_entry vlan_act = { .id = FLOW_ACTION_VLAN_POP, }; - int err = 0; + int nest_level, err = 0; + nest_level = attr->parse_attr->filter_dev->lower_level - + priv->netdev->lower_level; while (nest_level--) { err = parse_tc_vlan_action(priv, &vlan_act, attr, action); if (err) From patchwork Wed Apr 8 22:51:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 221334 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10E3AC2D0F4 for ; Wed, 8 Apr 2020 22:52:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D042C20730 for ; Wed, 8 Apr 2020 22:52:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="gAONZUM5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726609AbgDHWwH (ORCPT ); Wed, 8 Apr 2020 18:52:07 -0400 Received: from mail-vi1eur05on2077.outbound.protection.outlook.com ([40.107.21.77]:45409 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726492AbgDHWwF (ORCPT ); Wed, 8 Apr 2020 18:52:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FeEGlXz+RupdCWzdT6yp3sUQEkCwNnUFJ3oSVkbLnNs8YkQlkwNL+slEncQ4W3f8wkjo1f+hSU0Q4ospKDvPYP6vVR5O9yN/xXLYPt9Rm+Lh5x8HTIp/G8aI7PvP4qipoOxqExWfIS/4JosPB5sJxPwoSu5IYzmNJaFi+AEbY1Ze0F4Qzgs+oZXlt678K8SaNWGtAk7FBLdRz8OIGhwBSPmGfvs76gkBVnFWZ19BXg++DCL5ZNwFuRTCW2oEslo+gkTamPWC/SI7/7lOpjRK8Xt0wmpNmRNc1hjar8qolSqolJruF6epgg/nYv7Fwqrpk9XzUW7sEmmwDjwoqR9WEg== 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-SenderADCheck; bh=JFYUKHU7HYu8XusIN36ngeu0Q3kbZU7Ou99DqhWtLQ8=; b=AbMpEJt0t1NBgDkIs0o5kjfsWED/u9TMevL1Qw327VYC3IeRlqMExMF2kG8mcKdKOAVmk6VIuekX+XmEfEX9Grf3ZQGjK25MvDitOitgmA5LYM/JvEPBK+GMvqCDmLC7Oo2/cS1xjSJSyMB4EDS12wD14GG+CL6l2L414zHJ9YA0ieucpsX9sJ7nvx7+fCeLj5q8EarxyCXEfdMEuMLirHmoyryorMp4Tnt9cNqImnvuYgw3k6AL/8ixRjuqGQyC3GZAXb2HSX8LjeQyxnq8X35ek7yikXxCHE9vZD4yNwO4+Ed/USywl3C44yH1f7Kx+o/SCUyNTB+mkUSaxVIJLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JFYUKHU7HYu8XusIN36ngeu0Q3kbZU7Ou99DqhWtLQ8=; b=gAONZUM52TkYpftYRsPQQmhLfsXMx2QffASiJOCU0uNyXdr2lPxZmRpmdw9Ge5OxXeEs6WjVKPPQXRXMRIqoez7BNHFyg8rpNbTIbUQb145V0wGxy1ApRmUABe+xDrMnYmAAUUXevo42j4m1sCMSjj/nYVaYuAhCjommGpamw10= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB6365.eurprd05.prod.outlook.com (2603:10a6:803:f3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16; Wed, 8 Apr 2020 22:51:53 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19%7]) with mapi id 15.20.2878.021; Wed, 8 Apr 2020 22:51:53 +0000 From: Saeed Mahameed To: "David S. Miller" Cc: netdev@vger.kernel.org, Parav Pandit , Jiri Pirko , Saeed Mahameed Subject: [net 6/8] net/mlx5e: Fix pfnum in devlink port attribute Date: Wed, 8 Apr 2020 15:51:22 -0700 Message-Id: <20200408225124.883292-7-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200408225124.883292-1-saeedm@mellanox.com> References: <20200408225124.883292-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR06CA0026.namprd06.prod.outlook.com (2603:10b6:a03:d4::39) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR06CA0026.namprd06.prod.outlook.com (2603:10b6:a03:d4::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16 via Frontend Transport; Wed, 8 Apr 2020 22:51:52 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: aba2feb0-0c47-45f7-468f-08d7dc0f6eb4 X-MS-TrafficTypeDiagnostic: VI1PR05MB6365:|VI1PR05MB6365: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2657; X-Forefront-PRVS: 0367A50BB1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB5102.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(346002)(136003)(376002)(39850400004)(366004)(396003)(16526019)(956004)(6486002)(26005)(316002)(478600001)(54906003)(6916009)(4326008)(2616005)(107886003)(186003)(66946007)(5660300002)(8936002)(81156014)(36756003)(86362001)(8676002)(66476007)(1076003)(66556008)(6506007)(81166007)(6512007)(2906002)(52116002)(6666004)(54420400002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: js9UlRk2tOCJK158VlniCNJ/0hq4UgrC8vSQO7JueFAsxoOYML6gEgBFUH2eL+AvDyFwk1sbApshYtP2xelWm9CNN8HPlXYrObAMU1OKaCDT9vlFFhleEjXM3xm/vqGEkRz/FxqqYZmRcYdkVwH3a8X3gIM+HfY1pA1QGTr2JIjXwoYW/Quu7c2KK+F79vlD9nIUuISQtgbytSFFP9FW7fMdl9RxK9Ctsra0eZGd5114Jgh6d3nfVEs9DaH6F4117+QYb0KsHwEk49VTr1DGDWO+UPo0VOftkYFF4IenVhrW8T8aEywMsBEYSx8wTS2xq+6Gn6c4i8lO6Aw+TUBsb3oGAqzWpUBsOTbL9NClx6+WsnsTaHxk/GTGLFmBBW/0miRPTFShcre6hlV2ghHzzORGjjYUrj8dH9/IfQOblfDf2Ingp1pkpcG29QqOkd46tPNuJmS6oO1eUY4bRR2d648AMUb3b0UEz3/uaTmk35XWHjr5WHUWmqdTL6NLJUSD X-MS-Exchange-AntiSpam-MessageData: ag3+ork8KIvh/0jQPEGi6QYIl3wJNb4iDHltDYE2w9K6iX8EV3V8otU9mbwBoidZ1OAUDaGe1fkD7QolwDE+0ZV/4CndACZEanjLjMI/cXUbdvb/6J6CPQ0ONZXF0rs6qq8m2qoUiir7UG6sMjpe6g== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: aba2feb0-0c47-45f7-468f-08d7dc0f6eb4 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 22:51:53.7871 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eBQLWrCvoJ5AsBYpbYwIXx4g355vnfXVPCqtWVMK7JWoRtJvIzMaEZuc5IFmKbdoRL6cb+5IPiDQAvdyGTyTHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6365 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Parav Pandit Cited patch missed to extract PCI pf number accurately for PF and VF port flavour. It considered PCI device + function number. Due to this, device having non zero device number shown large pfnum. Hence, use only PCI function number; to avoid similar errors, derive pfnum one time for all port flavours. Fixes: f60f315d339e ("net/mlx5e: Register devlink ports for physical link, PCI PF, VFs") Reviewed-by: Jiri Pirko Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c index 2a0243e4af75..55457f268495 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -2050,29 +2050,30 @@ static int register_devlink_port(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep = rpriv->rep; struct netdev_phys_item_id ppid = {}; unsigned int dl_port_index = 0; + u16 pfnum; if (!is_devlink_port_supported(dev, rpriv)) return 0; mlx5e_rep_get_port_parent_id(rpriv->netdev, &ppid); + pfnum = PCI_FUNC(dev->pdev->devfn); if (rep->vport == MLX5_VPORT_UPLINK) { devlink_port_attrs_set(&rpriv->dl_port, DEVLINK_PORT_FLAVOUR_PHYSICAL, - PCI_FUNC(dev->pdev->devfn), false, 0, + pfnum, false, 0, &ppid.id[0], ppid.id_len); dl_port_index = vport_to_devlink_port_index(dev, rep->vport); } else if (rep->vport == MLX5_VPORT_PF) { devlink_port_attrs_pci_pf_set(&rpriv->dl_port, &ppid.id[0], ppid.id_len, - dev->pdev->devfn); + pfnum); dl_port_index = rep->vport; } else if (mlx5_eswitch_is_vf_vport(dev->priv.eswitch, rpriv->rep->vport)) { devlink_port_attrs_pci_vf_set(&rpriv->dl_port, &ppid.id[0], ppid.id_len, - dev->pdev->devfn, - rep->vport - 1); + pfnum, rep->vport - 1); dl_port_index = vport_to_devlink_port_index(dev, rep->vport); } From patchwork Wed Apr 8 22:51:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 221333 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D28B2C2D0F4 for ; Wed, 8 Apr 2020 22:52:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AAF2D2078E for ; Wed, 8 Apr 2020 22:52:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="LDZa7SHY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726627AbgDHWwK (ORCPT ); Wed, 8 Apr 2020 18:52:10 -0400 Received: from mail-vi1eur05on2077.outbound.protection.outlook.com ([40.107.21.77]:45409 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726512AbgDHWwJ (ORCPT ); Wed, 8 Apr 2020 18:52:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GsT7cw+bEWos4ObJnHbxv0slezPBvnWgMFRIqcJpUDb7PhEtN11v0OFT11Ph9mqTurDKr8GnzOpQyx8FUvGT7szYCksu7dUAXBYm5eWIEJr4YdCiGdKfB/EsgVnu/N6AxMzHPCAG6UZnMLbHrJ4/S7D/mw0KJyG2PfqxNgaBxQvBbC1lN98JGuccmtJEdR/dCt1Fa3QZ8PFqpi6bp2QVzCUorgeiHCy3tKrJ8PaMg5ZQEgIc1WhSu4u5kE7+8f0DvHok4C/Bun5H062S51J16TCq76ICx/wUN3OFyV2oieoprTMZx+tPytzMFgUHeLC/F5BITjeiOx395U/WnkgNKQ== 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-SenderADCheck; bh=iNR2vwuOEKqtAI4bK8Wg4E2QWYAhpIZB26ap6VOvyFE=; b=WQFwtciPYXBGQ5YAWTfrUt1GMWyUT+8OAw2fTiQKLGE5jeEiXrl1VZc3Kuii9Jly/0kKkGZBQ3q3GXqb9uQQW73x1lae/be0wJGH8d7UANmcJx5zvi/mAAnLNVIEqVxvYu24cC+iIdXK9I++mdxxiWgmI89OXCdd24Qd98PsDcGbkW7EAIzHSIwlzAfMHDM4QkPsJJvXmRY9KLMkkc8RMGnlOBcWffAIzhEz4x8XCgTs9KUq2XkQg3hZnN8j4FEcCUX2dPs31JemnSYImCZhjrvTFBI4nkT9wcfg0ZLv5Iffn7BzCbR+lvtl3BoAhpQ9Xm76mXSO7pcvOrYVImtkcQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iNR2vwuOEKqtAI4bK8Wg4E2QWYAhpIZB26ap6VOvyFE=; b=LDZa7SHYQkmJ2wXKNgBne5tuTHJLZrGkILePzUG3s4sD0VzBPdeEW3Yzyc0Rn2LIGx1VKibvQpo58poQURQywlLVcztLzrC0/Mee1O84E3dqrYoR0VJE3LgK3+35dkaBw1pgkxE9MbpNlEgnwUIbDlLIJQyYBPzsvMEuviJbQy8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saeedm@mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB6365.eurprd05.prod.outlook.com (2603:10a6:803:f3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16; Wed, 8 Apr 2020 22:51:56 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::9d19:a564:b84e:7c19%7]) with mapi id 15.20.2878.021; Wed, 8 Apr 2020 22:51:55 +0000 From: Saeed Mahameed To: "David S. Miller" Cc: netdev@vger.kernel.org, Parav Pandit , Jiri Pirko , Saeed Mahameed Subject: [net 7/8] net/mlx5e: Fix devlink port netdev unregistration sequence Date: Wed, 8 Apr 2020 15:51:23 -0700 Message-Id: <20200408225124.883292-8-saeedm@mellanox.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200408225124.883292-1-saeedm@mellanox.com> References: <20200408225124.883292-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR06CA0026.namprd06.prod.outlook.com (2603:10b6:a03:d4::39) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR06CA0026.namprd06.prod.outlook.com (2603:10b6:a03:d4::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16 via Frontend Transport; Wed, 8 Apr 2020 22:51:54 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ca6c117e-d746-43e9-6eb9-08d7dc0f6fd3 X-MS-TrafficTypeDiagnostic: VI1PR05MB6365:|VI1PR05MB6365: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6; X-Forefront-PRVS: 0367A50BB1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB5102.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(346002)(136003)(376002)(39850400004)(366004)(396003)(16526019)(956004)(6486002)(26005)(316002)(478600001)(54906003)(6916009)(4326008)(2616005)(107886003)(186003)(66946007)(5660300002)(8936002)(81156014)(36756003)(86362001)(8676002)(66476007)(1076003)(66556008)(6506007)(81166007)(6512007)(2906002)(52116002)(6666004)(54420400002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WfeF2I+J11UIu+vplshM4TMq7Wt5TlRcWsHyIf1hpFrg4XlksppOfGzySqQXmyXIxqTZuRBMqlDkaewO7hOUdODtbE1zoMrNiKb1l9fODZItatq2H2jgLxAg6dLc/ZG/cexFUdUI0ihy5NhQYNsveEO/U0HC7rjsPYlWbuiB9c/WePyKcibY+7BypWZ2O1HqK3cl7jMy7rRjz5HqbsDCfJeCC1CRrObS74QhHRYY51p/TkboKfXb2qJ2wcxov6QzphwZF2Ixtm10fPrB6pj1dtcI9QYrw4Z1YlidQSAe6vNzI4H1IyN2rojX+ybpm+/oPCNtAUUbiyfA45VtqmUgLB772+BD9B3N6rn0lZ7JygKQd/Ox5B6JIPN2LQ3cb6ZSyEakupx60rwHyQGRszSDnmmkDrurSVaI0LRFRDyuWdq0PXnUGf9UGY8b5C4a0hU7GCwRi8WjatORzdbalnMWUChb4Y5QPe9GWSFEI0wZRVYOgpNBinWQW9sK7lbAviE1 X-MS-Exchange-AntiSpam-MessageData: jCEQArgVA4LJ5DF0uQw7rMjwh+VmVlXD/pQFme5K9f6kanxNdZgRB8MZmT/uG39nYp5ostXTaXceGXyQB0a1G10EuQyPYZS0aQOh8jGtCb2T3zqZ7M/1xjaqiO2iS8pRxDKnwlkOFHHcaCRLormsFQ== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca6c117e-d746-43e9-6eb9-08d7dc0f6fd3 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 22:51:55.8899 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TPG3B+Nw4vqqtU/3ayDQd6LPka6OR4aplqJKSPNtjj0nIUANefqPnDXtqZas8Qqi3cxtmGgbFuq+YpvfRK3zMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB6365 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Parav Pandit In cited commit netdevice is registered after devlink port. Unregistration flow should be mirror sequence of registration flow. Hence, unregister netdevice before devlink port. Fixes: 31e87b39ba9d ("net/mlx5e: Fix devlink port register sequence") Reviewed-by: Jiri Pirko Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index dd7f338425eb..f02150a97ac8 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -5526,8 +5526,8 @@ static void mlx5e_remove(struct mlx5_core_dev *mdev, void *vpriv) #ifdef CONFIG_MLX5_CORE_EN_DCB mlx5e_dcbnl_delete_app(priv); #endif - mlx5e_devlink_port_unregister(priv); unregister_netdev(priv->netdev); + mlx5e_devlink_port_unregister(priv); mlx5e_detach(mdev, vpriv); mlx5e_destroy_netdev(priv); }