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 A289FA0503; Thu, 19 May 2022 19:43:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B29D40223; Thu, 19 May 2022 19:43:41 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2108.outbound.protection.outlook.com [40.107.21.108]) by mails.dpdk.org (Postfix) with ESMTP id 6F52840156; Thu, 19 May 2022 19:43:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MOXWhD3Qx6wePx8XuQ9F443KWyNBY265xN/iOkB05z7P7jbS0nl1pbKWi4Gp/SSJWJsW8qui6jfmwAtB6LdUTGUDpV/PRRxIroGc7CQZr6mHzB6LxNwlj7dCOzJw1gyi0EJ5rd0JxBz/C1WUshnxhj7jCSOSaYm13dM8aX3h/vSVQhk+XmSTtvxaYAWLSmVLtbc7eL9ql8Tc8cllb+Nc71/FnP2jXek5FPHbq3a2cS58NtfDQK7cj4hytVeIf4mp97jfFHUw+umPxhn8GMygP6fGMYlPBCVblZ30N1VDnU8MZ762gP122YI9rwVWHy36SOhHyrg+56ze9JrD8mGSbQ== 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=V8n7T4TOWCUylXICp9NAR0R4bcS9JF+mVi7j03K2J6o=; b=m1JVy2Kjso+DskjKbXlWsiE9FqpiG+XjyD0y7gGNtE9buqjKzcppslEtxlstIVq1P8D58WRJQLgPSJsmJIFVTiBJBBaNeX5XSufgPa1bJ1iOEi/gvGLDOwGPoa+J73HmVt6U9A6EHKsDZc2/PQ4jt0u1JaPB22K4RYnRstUKrEfHRiyujfzPyepHoGHO0uLvMOPBX04dnN0h4l2m1viwm7Fa9ZT8kM62QgTl9+o+rHB76WX/+MtaDB3R8dB/0MUo7MAb4+Z9HR8RLzYfsuY/ZDKDjgaur7wnD6A0IZJ4VI+sdxkRp7hlZc+CvA/W1rp9KSyjm0OBpmtNiUekzEwWyg== 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=V8n7T4TOWCUylXICp9NAR0R4bcS9JF+mVi7j03K2J6o=; b=ZijBzWyTjjTZMLlq9R8F/nmuNdNhtbqFEo0KrCG9B+dd//NQjlaLfn4WeDUk0x5T/0TYKuW5UyHeIhMkn2LHeOsne9dEjHvcWr6/cFflDY6q9eF7YGxWime2KZJADBXy6mrRnrbh9HBzelvm8laajJll3skmOXexjD/MLAZXR5k= 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 PAXPR04MB8160.eurprd04.prod.outlook.com (2603:10a6:102:1cb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.16; Thu, 19 May 2022 17:43:36 +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 17:43:36 +0000 From: Jeff Daly To: dev@dpdk.org Cc: stable@dpdk.org Subject: [PATCH 0/3] ixgbe: Fix SFP hotplug detection/removal Date: Thu, 19 May 2022 13:43:22 -0400 Message-Id: <20220519174325.23308-1-jeffd@silicom-usa.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BL1PR13CA0026.namprd13.prod.outlook.com (2603:10b6:208:256::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: de08cfba-1b3b-4b93-efd8-08da39bf19e9 X-MS-TrafficTypeDiagnostic: PAXPR04MB8160: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: FTrWSN/GfbA+fN4Pk5LgiS5BSfwBJLPTldd0PojR1zxFvw49SBkeWISa56JOw1XKed/xSptd6NYtgm7SP3/L+GFL3aksWdWB8gfGiQiIMH0ywJ0tja48pOgOnafWKKTs8aQmMrsk+7p1tqqZNSdnjcrhlosDfgE00jyjuj63ouAMpdo9gmSTq/cx8a7vSQbsSIiqRsio8DZ0n5aRz1FUHp161uRJHo2OAkRtaRncBRei8VLIstJR2B18Edt/51Y8SlbDrPzZbuHo7tMmZpb62G4lzlbF33hLyn77fQ+9A7QYSgBiex+DYWwsX4pBMCXrHzcmf7dJ7yJoVbhE+vHZrrsewsiIvP92VYxnBLiiDyUx5BwDDJTiK++yOAuZjoUFnTNyodcxNdxJZSmPmy5Pem8x8GjIkIOsOaI1l3x0/IbQackaHhTpHrahk235sqN9DsOG0h2g30oXnT4jjAZMV5mhg5xRhBnjChs4euHY/Q6YEbviRgafmKwug/9fbC6HTFxnEdEaY2zov2aF4e4+ye5A/A+e0eVQKO4b75zaPXvSSFEyn/zS1MNLmARHDvt9wrZCQKGZgo2TrZFcu7dahIydC7MmEWZiBCGWezjI6arNjx67TNU2iy29AWfB0I75nsR7shmbMriNOfuY/vAvhOXk/Yqr4hsh2JYIbA4db/VOPam78jLZcgPVtjNMOpKJUnUXUjAYDESb70wqkzba9Q== 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)(6506007)(450100002)(2616005)(6512007)(26005)(36756003)(83380400001)(8676002)(66476007)(66556008)(4326008)(38350700002)(6666004)(66946007)(52116002)(1076003)(186003)(86362001)(508600001)(2906002)(38100700002)(5660300002)(8936002)(3450700001)(316002)(6486002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?sey5kgFbWX/yvtYD0Osh5gNXNaKoAdp8iUI1wuWd/qmy71lXCi0zqgZZ6rgV?= =?us-ascii?Q?ol1YM34D34F1ZLgO1g4R4gy43fTG4S9whPAmga2Enn2mhsB0w5fqbw5+kFsd?= =?us-ascii?Q?scvAfNDm7zgofuoBBM5QDg4Wqxhgy2oM4etgK0I6qQZsBdXISvWGU3Gge4/7?= =?us-ascii?Q?/RUweAxDujhShCAKo9CJSBjBza73hVvMI6GBvP9KJfLh16UmFwrEVEd3EXFx?= =?us-ascii?Q?wOwDyP4+xPqN4uMG9/se7/ZnZ0VdJhTNkVyP2HZDr6EQfI8Frw/pCSRBRjsz?= =?us-ascii?Q?0XyeN4yygwzx/2I83wOTx4HGbK+PhclEeGa4IkQA1TGVg2kNTxbC0GfNmIb6?= =?us-ascii?Q?MFL4kS70mQ2VX6THBiCXQnNr1+Nq+uncV3RsQ0UpR37eT1aPjjUy7nCZVwt5?= =?us-ascii?Q?HVkD/k1V1pvuP4F49cCKxoJ6q2P0KlWGdK1BFlRLksQVfWXM4qH8A3uaznLl?= =?us-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cILe/AnlTeblzJT?= =?us-ascii?Q?tMWN7IqIsGNrjvnoTwOKrajrJ+2+X+lletL5JUfHufglRDas1fXxamh+CSS2?= =?us-ascii?Q?yHjhRbz2RuibTgNFhyCThIsdEqiEuFe4xl8VL1Pl0v1L9YMIw8V+xiMWVPvl?= =?us-ascii?Q?JnvQTx2Ki/rJeUKFq6SoL6ialHRrSxMrKrEFMgDC/uqTpYKIc4NVNLA0kucE?= =?us-ascii?Q?n/iYKivCgn/Bj++w5lAB02OhMORXlKief7m8rG2zZc2lWESu5PLWECAVB5Ei?= =?us-ascii?Q?kGluWxbrwBeVfE+yvZ095frLzqgj4k/YZ0+Cj84iRIn8qEufNtDmMkFTp/Fd?= =?us-ascii?Q?WmKkWEHRfapPzvq7j2OOwDCTTE6I6r18JwEIhvs02Igqt4ss4krrp9rOaM6v?= =?us-ascii?Q?OyL0v5BZew=3D=3D?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: de08cfba-1b3b-4b93-efd8-08da39bf19e9 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3517.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2022 17:43:36.4832 (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: rs2cHreWe0W1Dz9RrKp780DZqHdQ9cPaAPsafO1drdstQUG0l//jz/CDpbHMXknaK5xkfClijBd2QtIHztqB7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8160 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: , Reply-To: Jeff Daly 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