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 0BDE4A0093 for ; Fri, 11 Mar 2022 09:06:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D3C340F35; Fri, 11 Mar 2022 09:06:37 +0100 (CET) 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 3F39A40140 for ; Fri, 11 Mar 2022 09:06:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IDl5hTA9+55gO/mXja0Gx9Vo+PIDbK5gYvLLdyvse8ABmlHYZ0KQN56myd3NMoG9gY8gjxxFeeglVHSlHi+UoIZ/S1bmJm47Q1nLkhPbi4n+gZ/tQCEnl+vcLUaAC6NRGGAKNAfwlaqcstJvRlaBor/QLhIBqRE7cDKf9cKT0GuhzW5Z9UNKs2JzCtfid+t/bH28frrtOzeSgiTViF4LRKkZfnNh7HpVoGX8j0q19eTtYB158hWXKPjdYwDMa+q/I+HUKY1o7jjk0TKfPhZ1DCLrHfImPv33v+Q6d7l6ffcdmzQa4jdUQnRGn2o8vwx35INuxqVhrhXSoI52FyVMfA== 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=1NgNsktuqCf06Mxcuimqa92L8Wj1ycKWt/DO/MzsQrw=; b=JL8M42U8aFjEPQS9f/6x6bEOoNATYgmESk7LAq3q4rLhduPOWCNtk/SQnEEto2xNVxO799j+D+jboEwIUSgiXkWgHvmzUnDm4/Blc8Xhl6H1qZNNukc+D4A8TKcSPDXOycn89hF8OXx2Ue7Gqa2OQQ6hTy2sfwwc1ZEiswtfLKbejIeOx6HPIVyffiXSUKsaG+WF/W8fLfKFZX3rp8tvKs0oDpd/RTe9WLi4ymm4ShQRS31alxkpMx4EClkQ0QO3zRHFZkxXuZPOhcQMwDWM0/enPf//67ZK+7rbEFt+a+Yd9WCH98vaOUbgMT1lnd9srUBy7hiCOlbDNIhNp+xPGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=canonical.com 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 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=1NgNsktuqCf06Mxcuimqa92L8Wj1ycKWt/DO/MzsQrw=; b=jtPBGizv+rHJddj2HzExoCL1gOsXsgBjNftibwEaCvJcA4CypC9XBpoGOhHQtZzbbfJOqja1x4J91uBsIA5QvhsW1fDfzjeNEIDtAF2cRVTFaNjS43cA9wKxMOtF30Fl42rpdQzCDovjGsGe0IiRRpn+rzj7nCwyJKJ9p9LMt1m9twOU/dfLssnGgHlCdmc2jfjtrpo7vZigd5ZYgzFNN3/4IGDAo9xisbs/ka3qOrpTaLzPl6Y8pWjcj0rS2zfN62EdCzS2wzJRUUJGw0hHBCazxt3Tg+wxjh9uGjrfGuyViavesIo5mjzMCXJ/rc8oxXVrQEEggKUMGhiwThyyDw== Received: from DM3PR12CA0091.namprd12.prod.outlook.com (2603:10b6:0:55::11) by CY4PR12MB1190.namprd12.prod.outlook.com (2603:10b6:903:39::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.22; Fri, 11 Mar 2022 08:06:34 +0000 Received: from DM6NAM11FT032.eop-nam11.prod.protection.outlook.com (2603:10b6:0:55:cafe::3) by DM3PR12CA0091.outlook.office365.com (2603:10b6:0:55::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.23 via Frontend Transport; Fri, 11 Mar 2022 08:06:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT032.mail.protection.outlook.com (10.13.173.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5061.22 via Frontend Transport; Fri, 11 Mar 2022 08:06:33 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 11 Mar 2022 08:06:31 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) 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.986.22; Fri, 11 Mar 2022 00:06:30 -0800 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.22 via Frontend Transport; Fri, 11 Mar 2022 00:06:29 -0800 From: Dmitry Kozlyuk To: CC: Christian Ehrhardt Subject: [PATCH 19.11 0/3] net/mlx5: fix link state detection Date: Fri, 11 Mar 2022 10:06:24 +0200 Message-ID: <20220311080627.1195847-1-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e63c24b-217e-4145-3ec1-08da03360e98 X-MS-TrafficTypeDiagnostic: CY4PR12MB1190:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jrf/Z48GUZk83nU9Q4IyALRkoA9HZzapRnalHChfFZMk4Dge+bI2HZ3AzbgRFqRhKxUE2UAaSSNES2hJT7APWEz6gZayA6yPGlXatIb9q63B7kaMXs0bpfF29COh53AID69n4jq23b5BH+wfg5csIUZkW6a2V+Fzsed083K2cluJ16/awT8AqPEiYYN0zOp4KFb0IQ+A44F7QAs+W9U7cicEireCw9ciZaXPjDMc3/j4bhUGLJrHze02t54vm3mCop9kT2FkE1jMeWtx6fEWvu24TQ2TwEq2/KHypjhvMyB+iHe8Hk0lTu4iBA6Z4U15AEmmLOY/ixJwuPdYvvSqLvMGSkF60nQAP3w/c/gdmeySqmfbA50xwNdDjxVDvSbtPmPGcfHzrpoyrpE0BuC/dar7oRxZ4CjCIGE5DYkm2E6p+MgMfhnaKBd4Rc9aj0TvhS9vMwsAJ/KuzBzdUIFnRsc8TfDojXF6zAahXpuf/Yko24HpejoPc8i2SNH65Dtpq/KS9r1dLjWU2JzhGrOP+4ir8umljBZBl6motP7RgtaJP3gSYLDpEuiNxBi+XWBQsk5MCTpS/3YmVFy3tLZz1yGihhWhiaofsYx5ecBZ84QCJj/hyLXHrPfHX/eZPp2gt0URxIxQjOC9sGoIRgFCHL5FwmpFRztLlt63QmSLo1wDKYH5lEKwYVTmEiG2O9q4XsQYrOIim1jK/oCehHXnngj7t1y8SrqyPyGIBoUWnFcmsThGqscuYGEGlB3cuY9MeNAfr5Bbezq8l8A7hLm1+M23KeV08HtJUXNoblvgZhM= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(508600001)(47076005)(966005)(6666004)(70586007)(70206006)(82310400004)(8676002)(4326008)(86362001)(6916009)(36860700001)(316002)(1076003)(186003)(26005)(336012)(426003)(6286002)(81166007)(7696005)(356005)(40460700003)(83380400001)(2616005)(2906002)(36756003)(4744005)(8936002)(55016003)(5660300002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2022 08:06:33.3072 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e63c24b-217e-4145-3ec1-08da03360e98 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT032.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1190 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 [ backport of https://inbox.dpdk.org/dev/20220301121514.41497-1-dkozlyuk@nvidia.com ] This patchset fixes two related issues: * In rare occasions with any HW link state change to UP was missed. * If a port was DOWN before startup, its netdev would come UP, but appear DOWN in DPDK (especially probable with ConnectX-4). Dmitry Kozlyuk (3): common/mlx5: add Netlink event helpers net/mlx5: fix link status change detection net/mlx5: fix initial link status detection drivers/net/mlx5/mlx5.c | 59 +++++++++++++++--- drivers/net/mlx5/mlx5.h | 10 ++- drivers/net/mlx5/mlx5_ethdev.c | 63 +++++++++++++++---- drivers/net/mlx5/mlx5_nl.c | 107 +++++++++++++++++++++++++++++++- drivers/net/mlx5/mlx5_trigger.c | 12 +++- 5 files changed, 224 insertions(+), 27 deletions(-) -- 2.25.1