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 76279A0503; Thu, 19 May 2022 21:25:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B9BD40223; Thu, 19 May 2022 21:25:37 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140122.outbound.protection.outlook.com [40.107.14.122]) by mails.dpdk.org (Postfix) with ESMTP id CC11340156; Thu, 19 May 2022 21:25:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TDrhbznXEv8xcmYVA5RslfNB1oWNzFZQn5KKwzxWGnwU+pzyjK9QZn4k5LtAwy3v6EvDmDo4x+a5uSyeNE7If/m8/uaJlOY7oQWjK91a+FInwIm/WYXqb/7xr5kviTG6ZZ8EU4ys+OXa12MMzNf6LcRQK4eIhdiYim3ARyFLaHLRx/Q+0r5sp4HzT1XpVhH6/lcgFQxmOnzf40RGcnV/lY7EXuaz2t1JGbB8RxptcZB9QG4KBL/nc1AJm13kndn3GjwFndDfzfJ8aipGpL1C0im4StV1TUDsR9WWVwt/deMHXWxmIcsunhG6UYwcu3WUi4t20Zs1BQjvAsVt4foZGQ== 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=NBr57xWCQSNQO0mNge0lsCJamDQ7sHewiBmMdwxBWfQ=; b=mrHSIRtIpBWiMtaVclWRZhAI6ZQM7MR3HaTzNq1G5KyBT82LQhgTPszVQDQoSI83k86P2KdPQW1mnhn2ebNu1PIDWRjvGp9ayzKpU/Uij3aMMc9BNcmHgC5vJxQ+vXUgRQBLMI2BriGtL45lHjezvIUjcOn7qwXTy7TAw7Smdk5RSzDhl2x3pM47S89pEacTKQ2RwMKV0AccIXGUT1wcNYNCcCWFAoCCaxyuZXgVeO3OlS8dja/Uq48Vv2P4UlR1yP6wqropBZqI9aZGf6w404vjmQpxUP1OtFqKPJ7QO41/i7DiofTervNJbsx6o9yq9euGnKvs4gufATNMZkdc4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silicom-usa.com; dmarc=pass action=none header.from=silicom-usa.com; dkim=pass header.d=silicom-usa.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=SILICOMLTD.onmicrosoft.com; s=selector2-SILICOMLTD-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NBr57xWCQSNQO0mNge0lsCJamDQ7sHewiBmMdwxBWfQ=; b=otSArbO2R3tX1/KWgRS8r59aQTLfddeZjEnJjgn9VKLk+UpHgskNWNlUixMq0ZxamSdaldKnAlCtkZJpy/UJllkAKqks0YlSC7TVWxa8R6RbqmquFLWiiRCQINfC2xB/h4zei/mz9CyGNMk0OCQ8qadt503exMjvSPMIxBlYUjc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silicom-usa.com; Received: from VI1PR0402MB3517.eurprd04.prod.outlook.com (2603:10a6:803:b::16) by DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Thu, 19 May 2022 19:25:33 +0000 Received: from VI1PR0402MB3517.eurprd04.prod.outlook.com ([fe80::a8d9:7211:83e:46db]) by VI1PR0402MB3517.eurprd04.prod.outlook.com ([fe80::a8d9:7211:83e:46db%4]) with mapi id 15.20.5250.018; Thu, 19 May 2022 19:25:33 +0000 From: Jeff Daly To: dev@dpdk.org Cc: stable@dpdk.org Subject: [PATCH 0/3] ixgbe: fix SFP hotplug detection Date: Thu, 19 May 2022 15:25:12 -0400 Message-Id: X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MN2PR08CA0026.namprd08.prod.outlook.com (2603:10b6:208:239::31) To VI1PR0402MB3517.eurprd04.prod.outlook.com (2603:10a6:803:b::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ad0f9a71-132f-4072-cb97-08da39cd57b3 X-MS-TrafficTypeDiagnostic: DU0PR04MB9562: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: WGvY0Y86cMSEhgR6AzvineuXWH07GJ48eWhZBoM9uUuFG5b5sSGKDiMC9JJZ8HSuRD0e5lRkTwa2cFYKChb/9QLYvipR1BlN66RJwUYfX32cQFl/KBwVqA5wVy1sdWbRMITFi3HDI4q5WKUi2YDIWI0XSw2Ilin2UBN3dmylAmtJoryzjplVNTBhIC47xv2wI2DEnzJIUMm7V/3nXk2nWrrZ8UJqhvcBHbNK8lUckRkOq99Onfse3LXgYgZ3H7n2HmJM24/vnR+zQfwJyPK/8dIU59OepwvmIPadfr+RVBnsZWYYBVscrNMw5n2ESw6/+54owYX5eLkIj9BLZmd7W/vDFjvQLar5HmFXKJtUD3IfaMV7mvm8rCMjFIUwvFTzGwW7V2Hv19BcM5nujmrSY0Dza5VvlAFDk9Q8HBrCI0KWCYAmOyduaOshUI/QlcP5yJyTNNsTnoCprJFh1EX4JYKO8J1QmWh6RCy5HXtkGcjOnxuk+AUs/kcLrKwMeI8JcQoaMVIAJwFFUFxzNKysdrVmNrAqaKRd1CVVrVZB0tjD6rdKdWXh1KKge8RhYAl8qi6A0hnMVyllEiemtTsEuw9yaeYZrQPvJueWtHOanFlKEFT5evbN7RbwkwSWf8qsqJkyW5oHUQCQM832p8fLMds37/BBfATMiTDGwrpuYvQyqiakDsIae3EP7W+LqpakEA/R80t1zKVbO4KkWpqsmg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3517.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(36756003)(66556008)(4326008)(66946007)(66476007)(8676002)(86362001)(450100002)(8936002)(6916009)(316002)(6486002)(38350700002)(38100700002)(5660300002)(508600001)(52116002)(6666004)(26005)(6512007)(186003)(83380400001)(2906002)(6506007)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Dnj2L/H6TMI3JRkwtwPV0oyNiVD0id0cuJvRZ8RwXoH7sS/hziUfk6Bc08Fy?= =?us-ascii?Q?sA7AANfqjf4E7koAP6ScN8dB1OEf7MKSqtoEr/FLRGCZu+hbrp72yvvscsKQ?= =?us-ascii?Q?CtC7PSAsVt0cZWhKARdgipMPHXyFBIIgLEt/MfLYlfm2VoFoQVHfFILQOBIT?= =?us-ascii?Q?HCWmhTjVGodeEWj86eT1RjjamqWEvTs0RFXRayprb8+yF/Vbdmc1d7JBomMb?= =?us-ascii?Q?7KgOiu3ltd3davoHkpTIptTxrLbjXJFVNtqt2KLj6tEO29MLmvLdqH3UP8Ai?= =?us-ascii?Q?e58go+fVlB7KxsghcjGy5ewlEmYu3YIAAMzUtiRNfl9ugkPraxOPNV4VjLul?= =?us-ascii?Q?f/GIKx02+l+pPZoHjyts8KN1yfBOrjzzRX4lA/r5y5E8B9pTDrYbMSYzLYNp?= =?us-ascii?Q?bA/6g294o6FogfguSAbeVrqzdwPVBgTFOsBFD3xVOio/uZ5OsEri+OxbjkdC?= =?us-ascii?Q?5Ght6zSIllreuy90F6G9dcoSVM6IWGVYwOHO2tc6k/SV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QVuWODfAl4SsWFSxNxbRi/JpneheNj?= =?us-ascii?Q?PyabbLM/TvJv5LztBTF+zxLXHww5onPmXMB259oo953Z3nTOmsxVTrIA/hxn?= =?us-ascii?Q?ALQITsatvYt6yBQW5rCEJHqG/K9HlEs8JNhzrYCpAZMygTx0AyiyJeuyGf/e?= =?us-ascii?Q?Rie5syEui0F+em/Ou7tuUmQ7bLYjycPByunuAK1anMiQIOhejn4TNYanHr+I?= =?us-ascii?Q?CSoGtAaJwcAG0WX4yS3C92/JivbVplHHA7CalcaNFcm0Dswar8xN8pVpBjNd?= =?us-ascii?Q?ka1xWMEfMm9pqIkjVPGsRJXzR1XMDTu3bXspd4R/Hid4O94HaKS42AubCxuh?= =?us-ascii?Q?Mj25nd/aJg=3D=3D?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad0f9a71-132f-4072-cb97-08da39cd57b3 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3517.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2022 19:25:33.4294 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: c9e326d8-ce47-4930-8612-cc99d3c87ad1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FUpp4moyLyodqXzOhirKtOek/mPEQ29NP8Hw732gRxatiFtaS74Q7WCLNqpWIpUCUzIw/I+L/TMfGS937K1yww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9562 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 Currently the ixgbe driver does not ID any SFP except for the first one plugged in. This can lead to no-link, or incorrect speed conditions. For example: * If link is initially established with a 1G SFP, and later a 1G/10G multispeed part is later installed, then the MAC link setup functions are never called to change from 1000BASE-X to 10GBASE-R mode, and the link stays running at the slower rate. * If link is initially established with a 1G SFP, and later a 10G only module is later installed, no link is established, since we are still trasnsmitting in 1000BASE-X mode to a 10GBASE-R only partner. Refactor the SFP ID/setup, and link setup code, to more closely match the flow of the mainline kernel driver which does not have these issues. In that driver a service task runs periodically to handle these operations based on bit flags that have been set (usually via interrupt or userspace request), and then get cleared once the requested subtask has been completed. Fixes: af75078fece ("first public release") Cc: stable@dpdk.org Jeff Daly (3): ixgbe: make link update thread periodic ixgbe: move periodic link service work into separate function ixgbe: make hotplug detection aware of changed SFPs drivers/net/ixgbe/base/ixgbe_common.c | 4 +- drivers/net/ixgbe/ixgbe_ethdev.c | 471 ++++++++++++++++++++------ drivers/net/ixgbe/ixgbe_ethdev.h | 9 + 3 files changed, 374 insertions(+), 110 deletions(-) -- 2.25.1