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 851D0A0093 for ; Fri, 11 Mar 2022 08:49:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 508AE40042; Fri, 11 Mar 2022 08:49:41 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2047.outbound.protection.outlook.com [40.107.223.47]) by mails.dpdk.org (Postfix) with ESMTP id E294E40042 for ; Fri, 11 Mar 2022 08:49:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P7DSuPWTyu0HhXCTHYZLWINaLWy8VL3Wkf2BJWlirK1OSSWJxkS4/OTz9TsEr3aNT/clG8ejLVZC6SdFP/nGk+jxh7intqMaMY2Ssao8EyUDtQmM9uEbwaZey22pEalPwcqUqqaLKykIdzw6nAKBt3kzQnF2C90K3wRx+l5RtxH+un/edjUIrvpQX8EZK1LNVRS5wxi7dh2WhpkXEuFQ3FeL0wLwCAFE+y4QTK7D3WDprjDkoRbPQhg7LfVDEwjmS4iPxuCwIkkHLK/9BUgtLG08LqdJSQQxuh87KwnaA+syWAWweRH88VifdbkLNZEWSHzYhK2Njjm1dHcfmE1AmA== 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=I5Ds2rC69AWfHjAQ1vQejtc8+eGdPKyggaqlxd00x70=; b=BMXeh7mje5j4aeJvFRp7Eq9vNnkiWJO5P3W0nwXg7keTo9ZOWOQotRHLNEbMEwZxrP/SyzXoirOGDbn/0x0PKTbQbMpHuOiao8j9f6sAisQ+6yh0G/iI57vL4I1iQGdpBj2QZFTngkMLtQfFJjWHshfZxXO88zIt6sfdFoDYuHj2kVxnCnxLgdESrJ4YAD3yBDqWoDOe7sMnDPwpneise74fZCPUKboH8dxiIFPALrQYuhYf/WRdEGmjoBp1qQNhYBeP6EQVhbNjAC9BigT10OVmqbGN8HjXEd1IM4eKzDbGc3XNCQcEtXZu+E99VzZeChNlWO+8CMjrRE2yYXWqgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=debian.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 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=I5Ds2rC69AWfHjAQ1vQejtc8+eGdPKyggaqlxd00x70=; b=P+mhy3R7slhmTfxPK7U6TFakCRv6jU3vN0Xjpi8azjxqiu7Zqo80Ecw++FlXEweZeuFvvNOjNyX9fUORFEfF2XY3BmthaVN5ZP+RFPUE9lBVnDOid4C+1RM8lwiRJYVmxelsaJcUxx/QL2jT//W2mcCLCP6RQJkh/IE9P6WL6HvCAdvCRdmOryufznRuAXsUS7/4JL0F3CBMOn1Dcxv5YaOKet3gQdzfDlQRzecXzWE/Ot/AO6SNM9MwkItH48ZDgTN5bP9S5kAmrYDjP740teBqu5j+wezkM2R939byLgf4eWGU6WYkKQqcIuoj5tJKOy/PQBvUt8bH4DYDVfugkA== Received: from MW4PR04CA0086.namprd04.prod.outlook.com (2603:10b6:303:6b::31) by BN8PR12MB2961.namprd12.prod.outlook.com (2603:10b6:408:65::32) 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 07:49:38 +0000 Received: from CO1NAM11FT059.eop-nam11.prod.protection.outlook.com (2603:10b6:303:6b:cafe::b1) by MW4PR04CA0086.outlook.office365.com (2603:10b6:303:6b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.20 via Frontend Transport; Fri, 11 Mar 2022 07:49:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.234) by CO1NAM11FT059.mail.protection.outlook.com (10.13.174.160) 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 07:49:37 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 11 Mar 2022 07:49:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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; Thu, 10 Mar 2022 23:49:36 -0800 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.986.22 via Frontend Transport; Thu, 10 Mar 2022 23:49:35 -0800 From: Dmitry Kozlyuk To: CC: Luca Boccassi Subject: [PATCH 20.11 0/3] net/mlx5: fix link state detection Date: Fri, 11 Mar 2022 09:49:30 +0200 Message-ID: <20220311074933.1194679-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: 9a0f929a-748a-4c6d-4e6e-08da0333b12b X-MS-TrafficTypeDiagnostic: BN8PR12MB2961: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: hfecdfFJYQCOWpWYI0qscNfW0mI5mL0QQm+2yKzTbnvViLvIkoVYhj5hCl9/KYfILLT7rQEcjVoTurwlEJCHr2SkRjWBZw3zxRgWSVRehwh+Hfe520W+GWIX0SzU5qkdX5omWWnjcN1JHyRepv/mSz5Rl/Liv3onvNFHKC/FhRxiMmFvvjC3OAcJXad8WV5ouXw7W8eRdlY8AEQLPcihAVKLIs1nyKEiqti4/K77wAREugnUOX/McLOGvO3gn3Wd507Htat9onakVC3E4Gvk6fAEapXZP9y53g80K2v9+c2QYK26Zwi/nVwpUOrJr0juljrZR4E6PH9i0esG6dkGl2rL0r/yk9eep4EI7rqID2wvyzJ1/vE1JyLMzlo7whl8OuSpPLi6DSIJPNoV5a3MK9vzUo+iFYN+eaN5z5FFdaPWbg3ubojzw1k1YVi4jOet18uFlBb2CBwf8Y52rDrAojcQCLoY2Gcfu/Qt5TuQSgxE07w63Gzaac1mpr8B6/9g1jBzKWQE9CEs6QilVDQEPboZCUA+SSSEmvXadlUTE0hbdvmM7guyogky5veFD9Ludo6KF06UEFNCG8UiLqpgdGbsssoG08HblWgYmEstaI3Pm61B3uXxSmuwd/AGxQiE1D5UTAWzpfLbUU0ojMwZF7gPqo0eKHpfPFrficyXSTFrcsSUkDWueYHmcMdTZSDcvNGn84vRbGxaGapSdmxkiZopdtzgCSa7q/4AGwPp/++JDIuIQmnqtNvrL/1gYUgpc2iE3ydDqVu9LUgJ4inHnCN54m0Km/1pi5K/jNHXNog= X-Forefront-Antispam-Report: CIP:12.22.5.234; 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)(6666004)(316002)(81166007)(70586007)(4744005)(966005)(8936002)(5660300002)(508600001)(7696005)(70206006)(4326008)(8676002)(356005)(82310400004)(36860700001)(86362001)(6286002)(55016003)(6916009)(1076003)(2616005)(426003)(336012)(83380400001)(186003)(40460700003)(36756003)(47076005)(2906002)(26005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2022 07:49:37.5717 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a0f929a-748a-4c6d-4e6e-08da0333b12b 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.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT059.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB2961 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_nl.c | 105 +++++++++++++++++++++++- drivers/common/mlx5/linux/mlx5_nl.h | 8 +- drivers/common/mlx5/version.map | 3 + drivers/net/mlx5/linux/mlx5_ethdev_os.c | 64 ++++++++++++--- drivers/net/mlx5/linux/mlx5_os.c | 66 ++++++++++++--- 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 ++- drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +- 10 files changed, 238 insertions(+), 28 deletions(-) -- 2.25.1