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 282C2A00C2 for ; Tue, 8 Mar 2022 16:10:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C08340141; Tue, 8 Mar 2022 16:10:55 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2043.outbound.protection.outlook.com [40.107.94.43]) by mails.dpdk.org (Postfix) with ESMTP id 071AF40141 for ; Tue, 8 Mar 2022 16:10:53 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K2k7OHAVbDa57bj2dKaiya7FLPFQWHdRQ6XlKS8OzGpnKUlAFRCoFD50g4xcvq0lSPnn4KnJDlPhoKQ1KTaGasnzutpxDlwmfx8daI12TetKhrwRNQXFRNIQl5beOsbh5Fz1pDVLkpJ744zrUB5x66teRF71+1jOBdU/34U4SZisS2Rx4JrMUj4Ju0G2osYMGctkFj4myxBVuA6eAdDhOjQUsYu7NanFyPoKdUhk1vupJET3em582goCW8pnkmNeiERwvsiNpaJYyDjinjHNSHS+jnYoqfqBPGBIGPTpf8IJwrLvWl5/xHAqWGcyUtCu3JQ/j6yO0+QYlJbUkzjBEQ== 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=gvv504bz5P8MfF9Lr3Q8k+9j1n/pJODmeNXC+J7T1/4=; b=A5zFqSAowNPbaay5ZpdUVYyhyBRz7sWmHSXpXWRcs066jUjc1c+Eb0ugBK9I/a6K58vKhI6H9ndeIBEnXIP1SwQ6mK3v+1tg9MaBmCItIcEJ69qh1SUJZQco3ch5Xlx8SRUc/7NlI+UvtBoI9QXbRAtqXAA8iHDboUCUXX/Ng5mPc9f9pol52EubcL7FaTierimRbGrD21sM2WTll1KK7FepBwxwJnOCRMFhWtOb+n+SKIYTm0m/S99+0THfTQJ43eqevovFAADO6OpBNe1VoCLLpAnXJdSoFvP07xRW7heQgMcozHvhjXZb4mvhHjAqFNkGzXAvSmdksKa6+tDyqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=redhat.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=gvv504bz5P8MfF9Lr3Q8k+9j1n/pJODmeNXC+J7T1/4=; b=umr+vBf7zHsMFjPbcEBU9gZe1RWiTIqoKZ5sH/Rj5FLnXe1j1X7763f3J/i16C1m9skZfBe+JlNf/Dfv+6D04SYTUG9Eb3uG9qGc8ntfOUeOO4vSUvKAu2Dn24MaAoRV/FIRYFlciTQ8e5mF41KiPk80fsmjgBBez3LgIYeELETf5/La60shjnNlCBTVhwYNDPN3+Uj7H4mQ5Uz9xaETx/YZU6FyArwezI/9I0bggLdQzLuZ7vimZU46wjFLywCsL2WQ3wlbog17hja+Y+jxVCGIhLAw116S5aMI2FWW3gvEyfGn9f3JyKeZbBWJ6i+4id1WKUVD4CKEjd+M9Eq8pQ== Received: from BN9PR03CA0728.namprd03.prod.outlook.com (2603:10b6:408:110::13) by DM6PR12MB5552.namprd12.prod.outlook.com (2603:10b6:5:1bd::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Tue, 8 Mar 2022 15:10:51 +0000 Received: from BN8NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:408:110:cafe::1) by BN9PR03CA0728.outlook.office365.com (2603:10b6:408:110::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14 via Frontend Transport; Tue, 8 Mar 2022 15:10:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by BN8NAM11FT041.mail.protection.outlook.com (10.13.177.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5038.14 via Frontend Transport; Tue, 8 Mar 2022 15:10:51 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 8 Mar 2022 15:10:49 +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.9; Tue, 8 Mar 2022 07:10:48 -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.9 via Frontend Transport; Tue, 8 Mar 2022 07:10:47 -0800 From: Dmitry Kozlyuk To: CC: Kevin Traynor Subject: [PATCH 21.11 0/3] net/mlx5: fix link state detection Date: Tue, 8 Mar 2022 17:10:41 +0200 Message-ID: <20220308151044.1012413-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: bd1da590-cf02-4eec-7fe1-08da0115d56d X-MS-TrafficTypeDiagnostic: DM6PR12MB5552: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: PU73PkbRhmxhnJx1E2VWmAGcjBx6OXz0dLKzP76g/5uuDINMgqn12eeix9YXSDYk5v/SwNAGrqqXmIwvIRPagzbNvOP4Whk6Xbw47GzVP1ksQMxgZaYGtLoB6/N2sSVLRRy7ocjsPcMcvV/Kp5OT2hHDAr7JywdVVcsdQeb8q24LKEoGiLopVEAy+W/yaiTy5FImTGBHpxeAgBgYtPbZgtuHC/MpCouYRq6b+Q9liz9TVFblCFQDknnk+gm7Kqlbyc9p1qmvgrkDy6OrJsJ/Vn41W1fZU28lUCMtO6Z8korIxx7x+DzM3ybwzfDepd3J4JP0xyDTvtPHpMKiJUmNAT/WkEppKso4MMhSUlZE48S8WwqwbiP36RGoJvs4m4zuWZnc/43e/+MRA8EyJCVkTL1MC7QWkYiEvmbJj+vn8d0p2ytuoh/njcbflUHCA+fmWKK4OKsvy6scvBV4Rek1UeAOD/QRiyCCaqASIf3TU4Okr1xRGjK0sQvlkOEC/IOQWu+S1ts3aRdZPty7VPO8MZlI/ZDkWa/vh6OWJ6uQmu+rExX1a+PGE/GaFpAbBcIZdmikMlqY2O5a1AgcGPTr3GeBXbFPabFbGUNUethS48pv1yxk4cFpXVnBlJaNm8OyL1cdHKtDUdz1DC1xSNe5E1asBtRmDOqhsaqKn9L6y3XvI9yEnFV1VwzDhhou+qXNKVdyL+Q7WVDE4W0VBUTtmmUJlO+TVzL+5mpZc3Zf1byAhl5SXSyvqOfo0iQQxfpu4mq3wICakeAm0k3FxZQcvyB2iw/+W5cQlGLSj9qf9kU= X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(55016003)(6916009)(6286002)(70586007)(7696005)(186003)(26005)(336012)(70206006)(36756003)(6666004)(86362001)(83380400001)(426003)(8676002)(40460700003)(5660300002)(4326008)(4744005)(966005)(82310400004)(8936002)(1076003)(2906002)(2616005)(316002)(356005)(81166007)(47076005)(508600001)(36860700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2022 15:10:51.1135 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bd1da590-cf02-4eec-7fe1-08da0115d56d 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.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5552 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/common/mlx5/linux/mlx5_common_os.c | 2 +- drivers/common/mlx5/linux/mlx5_nl.c | 102 ++++++++++++++++++++- drivers/common/mlx5/linux/mlx5_nl.h | 8 +- drivers/common/mlx5/version.map | 2 + drivers/net/mlx5/linux/mlx5_ethdev_os.c | 63 ++++++++++--- drivers/net/mlx5/linux/mlx5_os.c | 74 +++++++++++++-- drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +- drivers/net/mlx5/mlx5.c | 1 + drivers/net/mlx5/mlx5.h | 3 + drivers/net/mlx5/mlx5_trigger.c | 12 ++- 10 files changed, 241 insertions(+), 28 deletions(-) -- 2.25.1