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 D4B3DA0353; Tue, 1 Mar 2022 13:15:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97F3F426DE; Tue, 1 Mar 2022 13:15:57 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2043.outbound.protection.outlook.com [40.107.96.43]) by mails.dpdk.org (Postfix) with ESMTP id 1AFA440DF6 for ; Tue, 1 Mar 2022 13:15:57 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HNaw8/a3uKHK1uILpw6GNtB64Yg8QEqa6ZGYyCKkTrTOhnWQC2wLBCjOcmif31AxWOeephAtmGhXjmlTNXw9/wxj8qaAIhoNienG/yYhgwzENbwekpgXV8Hv4qIIsrf+VI0zWuKB9j1VuHXZpqZeSo/hjl8getqwy2lCDQ5MpZEmMoSaZ1N6Jsjy1bEbk2WnB3pYWllVx3au7BuAZTUOXZG20VVLoDY8fYKAtctdui4Km7PuQQkORJCiKWOGgt9zbZoS+D/++att64dGhKqCxbTdpSC9hD0xkxkqitr9rvHwXhOnMX6BWDXajN0xI4wC370VRI2xh+kRCkvqFRt+CA== 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=+iiYNAz1H7FI054NtywhO8/qDxd4K+Z/++/7xVZ8NVk=; b=NtQ/Cu5wnBFGXg6SJgFZKRB6WwJ+QrE+V5UIll1ck0rxIYVGrE9j+E7q4SablEAaLatyORrIrMMkuiLEUtFGTpOjQkOWpHaoBFBwfptt08t8OT8ZgsxPzZLXsHC+9mj5SPeIMOh34VzqtOm1YWfn772eQPFqZpMjVR8MkIIb8Rr5o/FZ1YrGjSK89BkoAxEDKJoF8CO8rSUjfCwAgPvoxjbsilvKOLdSWGd1j/zXgusrWmu1PdilG5QzfxREVAn003uaPVkMBIwqEo0RInIvEsvcLuiF9ZgOzvr4SgS9tkceCLorw34VXfvhi0LkNm/36Q50Ud3ySnmMTIFZX7mPLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) 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 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=+iiYNAz1H7FI054NtywhO8/qDxd4K+Z/++/7xVZ8NVk=; b=I3v4vD92229R8i+OGNFFJEOQswa29Z4sxWJR+CXFFiA2woZ7DifZCtfHZQisQsSMt+2y/WXq4/OlaOUqPNhD6eHbrDOIAQfW4vW7TvGWqPQ817JLM4WcuKseM5elmuBDIYDDZ+I4RnN/pKHjFsfSL4UvOPIj6SgJfOUXmJsxeYtfRDpPluGI0R5F98rMqD94V4zlQVZ2HPOFzn7oZ8SLVnjBK0x2+DXxpno5gE5kjD8q15cPCLCJNpxCtiFhUBT1Rl/vQPoUK7SNN9FO7OlqvOr4km2WTNytmRA+nc7dVdE8VXOT+PoQR6Jsu3w+JydxbOoYwIx7gWmKlmpwJs1qww== Received: from MWHPR15CA0070.namprd15.prod.outlook.com (2603:10b6:301:4c::32) by BN6PR12MB1777.namprd12.prod.outlook.com (2603:10b6:404:104::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.21; Tue, 1 Mar 2022 12:15:55 +0000 Received: from CO1NAM11FT035.eop-nam11.prod.protection.outlook.com (2603:10b6:301:4c:cafe::ad) by MWHPR15CA0070.outlook.office365.com (2603:10b6:301:4c::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.26 via Frontend Transport; Tue, 1 Mar 2022 12:15:54 +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 CO1NAM11FT035.mail.protection.outlook.com (10.13.175.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5017.22 via Frontend Transport; Tue, 1 Mar 2022 12:15:54 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 1 Mar 2022 12:15:53 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Tue, 1 Mar 2022 04:15:52 -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.9 via Frontend Transport; Tue, 1 Mar 2022 04:15:51 -0800 From: Dmitry Kozlyuk To: Subject: [PATCH v2 0/3] net/mlx5: fix link state detection Date: Tue, 1 Mar 2022 14:15:11 +0200 Message-ID: <20220301121514.41497-1-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220223164333.3834590-1-dkozlyuk@nvidia.com> References: <20220223164333.3834590-1-dkozlyuk@nvidia.com> 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: e9dc1404-455b-48e2-b42e-08d9fb7d3bf0 X-MS-TrafficTypeDiagnostic: BN6PR12MB1777: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: 0suzzkp2wm8WNEpv/4lM522KjagYm4axIXlvnm3h6/g53zBIc+uLL2ke4Z6hgEjw/x6hZ9xm871Dg+FVy18GZO8c6YSGQ9FQ2z0em8/HMr2a+mqJ823t0k6QWYbzkFyHbQDtvR1O0xXqct6YFzsQzm8i+x8nubNYc5IrclztvUGseAO6zuAoMQNyEVZilCOYAuUyL2wSV7TMhFOwOg++FTRjzaqNj3yzpCW2FyhPqDD00nvkRYybk65T96XFdluLIi9xuhg7C8rx/iBaTA+o6Ovf+/lxJs0XPiIoBfQqzJHuWaD+uFWTe0QVTkx7CuyDH/Cq6OdZuDl41Rj2gYM03MJIFz4mNpbs/V/cETwqvz3xrmj+kHB0sEWi/WwLgKdTMHP0S0AjnERRMhhSJrEE7ugI7lUAcZUUQH3zegyTgjaY9/16sCe2ifTs2X5vR+7XNOL81EwyjEa+ZgiLU7Khkb0+fSGd71pLQudgVDWLPfaBi4IFJniCG9qE9VcnHE6CqEMtBvCCrdd5+BKvm/vu4eq/eW44v/58DQTsvMsKcmQ5bG/bUP4LM2NsoAMO4Xm5JHeFm7L5906k0Ti9JrjYus7UHalBwukVj34Lfy98rsXziZCJk3W79ue0P0UqS/x9zkFO65MBZZWxYHyQzzQVe6wUSw2INUWccislADqCRLc1OgN3flBoAYyu7xdUUShWBeCvTSVGsgXF9kQxI4Z5tQ== 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)(46966006)(36840700001)(40470700004)(40460700003)(8936002)(508600001)(426003)(36860700001)(2906002)(4744005)(81166007)(356005)(82310400004)(5660300002)(86362001)(336012)(70586007)(55016003)(70206006)(186003)(6286002)(47076005)(8676002)(83380400001)(36756003)(26005)(316002)(6916009)(1076003)(7696005)(2616005)(6666004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2022 12:15:54.3656 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9dc1404-455b-48e2-b42e-08d9fb7d3bf0 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: CO1NAM11FT035.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1777 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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). v2: fix not detecting the link up when it was up before the app start. 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