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 37910A0508 for ; Thu, 14 Apr 2022 12:41:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22A8940041; Thu, 14 Apr 2022 12:41:02 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130091.outbound.protection.outlook.com [40.107.13.91]) by mails.dpdk.org (Postfix) with ESMTP id 42D3540041; Thu, 14 Apr 2022 12:41:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cuAkd9PER8SXXnEe6ZrY0snYqdJElZqYRiqoRz+l04Bxu0FfYD4vIS6+4IBhwPiLNKa8GoVGcRLK2QeMc2ru/N7o3Pzd6EnUwR8FwENWJqLu6DDUJZB8JyKbKUhG1jPBIJ1lU08x6PwyGJ+lNe6tepfH72spyJirFcmUzxz/8c2Ito6XBSbB6i/rWf/Lb46Csp97w999AIdwOY1Dd31EiyGRJEirsAFz4HqADygOW6IMViuAGBFalJvINqTic4Urdh9DwEwTDxtbKxEzeyHidzDBoN53Y52PCEcnxsWbNE4p3xtrpJ6I6E3FaNMufLglqQ/2+WDv85845lVuusNRDQ== 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=K9LM43LCa37wKy7HeXLCKR32h+ew6KkEw1rnSgoWQLE=; b=LBDqxdm5jTcqvPrqkbP4wItyHg76QaQJfGbAPUbfp6h/e/Bu66AjHdfSVS48ipvxM28H/C2XAdf0BnKO+JdDUExMGfZ9tdqyk8GtBK1PS3HWTwu1mhrro/Zi4xEKV5efUjyw6cETi3VkXX7oTBBuiE4zA8WJcRiIc9aebLlmN0/ar3iS1dTRNUvsa8cZa6tNNRmgjd5EJL4Wf18mJrD+z8GkbCnHyvyaeC2NprhB5wTRMJ2q6Xt+c6h/Td3euGFrRRqyb/zpbiqagnbkUFqaG2NmlgC0lfkQ3FYtAbtOB3PCMlqrV6IRjR90Gvv2LcACfhxD/Ogv7GiFxyCC/pbgMA== 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=K9LM43LCa37wKy7HeXLCKR32h+ew6KkEw1rnSgoWQLE=; b=ggg3QVEGhKR5B5qlpHEGcn18Hve/CJpCRY8/005iX5aEVh4ivdUFxa9c+yaL7qFqOE7KtTDo5i2PVqere7DQscuXPR7O+xAmD3a8bwu35w3jZWWpnzQAbxYQI5wX8bGdVnt6l0Bq904VrOIlVqRT5j1p+ds9l8fD6JnGhewBk+0= Received: from VI1PR0402MB3517.eurprd04.prod.outlook.com (2603:10a6:803:b::16) by VI1PR0402MB3358.eurprd04.prod.outlook.com (2603:10a6:803:11::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.30; Thu, 14 Apr 2022 10:40:58 +0000 Received: from VI1PR0402MB3517.eurprd04.prod.outlook.com ([fe80::5dd5:47e1:1cef:cc4e]) by VI1PR0402MB3517.eurprd04.prod.outlook.com ([fe80::5dd5:47e1:1cef:cc4e%6]) with mapi id 15.20.5144.029; Thu, 14 Apr 2022 10:40:58 +0000 From: Jeff Daly To: "Wang, Haiyue" , "dev@dpdk.org" CC: "stable@dpdk.org" Subject: RE: [PATCH v6 2/2] net/ixgbe: Fix SFP detection and linking on hotplug Thread-Topic: [PATCH v6 2/2] net/ixgbe: Fix SFP detection and linking on hotplug Thread-Index: AQHYTpSxgnie9TYA7EmxFtoINkPBYqzut1YAgAAC04CAAIB+kA== Date: Thu, 14 Apr 2022 10:40:58 +0000 Message-ID: References: <20220228152937.21247-1-jeffd@silicom-usa.com> <20220412174220.31195-1-jeffd@silicom-usa.com> <20220412174220.31195-3-jeffd@silicom-usa.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silicom-usa.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1dc7adf6-4657-4075-c907-08da1e03432d x-ms-traffictypediagnostic: VI1PR0402MB3358: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: gO30GtjHa0vapu7j5nn2ylLcKtgg1L0VZfdRf8ctYe+1EwcBslYtForWsCpiOx02CNSb5AFCbciuLtlhCPNDtili/CITDw7tP7xqBY1qhP2Bn7pRswMT/qWb3QBHN/KmJmxDO6prDAbQVj8zwSRmoRo8pOUldxPmzWffhOreH4ryh8WaoentsYiQOaCsORkF8cqhpn+8aLS02mArWqMYKVmSCTsw8qnXjFbc2iGoJgBYjT4um9AAQfJ+WWF9FMt6uGnvebKXSFZ1FXuEAZyEHdr/pg9eiHh4Qq2htj02aK48xAUvhgYLT+DrpjqJWtErh+DMvW23PC7vzTQmxBCwjVWyqbwvgr306iecT37KCMuIMk6VzXDhCcVK6KCCNKaQduKoCkwUE7jx3uH38+KdPatturK4EtliVS1C6euER6XOT6beZYi4goCaPmFoT/rs9yyRr4iPmnwGA6LrdYvnEHAJH/j9yy+JasKcpU+Ywj7hQ8ctg9Dm3wFBRQ/3XnGChdDdjHoY0+tfromMmZwPMXa8+zkqc3pF/qBzFgxDZY2lIcN+rI9cytfj8VQVwUDgmC0inazGVYr93T4PCCO36+SjvnPbqJYvZTeXdwwEQfVaCGxHJvt4nRV6UISqfGJ12urorpuwCccyoJbMFDkTR5iA/RWVpGgod7B+97PcyIOulS0PiuG4SaFJqnPi4VN5BbXChP+Yd2oAJCUYZ/Y7tg== 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)(8676002)(316002)(8936002)(66556008)(66446008)(64756008)(110136005)(38070700005)(38100700002)(508600001)(66946007)(76116006)(186003)(66476007)(9686003)(26005)(55016003)(86362001)(5660300002)(4326008)(83380400001)(71200400001)(2906002)(33656002)(52536014)(122000001)(7696005)(53546011)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PiQKpuXyWFVVz9CK3iqH7YWleK9ZVE+nU3hMDB5zDcJGwpizog1jYNqU11Iu?= =?us-ascii?Q?top2NDD5sz17VORJ3HlK7MJxavgOZLgA1qFR3+l8qfIYaIpVjNzfDFaaPK+i?= =?us-ascii?Q?7KPM7iTVYmFuoH5QxBBld+TQT/8fuePCbkCJAsLGR9nPUBBjDlrl6dHMJdWZ?= =?us-ascii?Q?d1xbakiLwFcvUxIMQHbl2e9EUHYv8jOg1CfwRlUU22o+SpnHLqQLg51YTS1F?= =?us-ascii?Q?jkUIw2hRw+ILK7zJcjHARtnN5PP+LlJ+S1fAKqNu83YXKYoF/2HVWug8Rh7u?= =?us-ascii?Q?SAnZaTeq76hPqOAV+j8pD+Y46TZXxcTcVgAlU5EEezCOYtEv1oJVXr1nrZVu?= =?us-ascii?Q?nmpJ8fV1EibFVSObKusrgeRHY6oAItNWeWj3bRsvyUKK45T954CAHW2gQYU9?= =?us-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iU4dwf0Upfo9Bw+WK7ztrT?= =?us-ascii?Q?Xn5c33N9FQLn39hhL7N1yxPFTDuRm6NzJeugXUYSnmOsGJcraMHE6i1/PG7O?= =?us-ascii?Q?BM37Jj3bEMN2Z/j4oznj76XkTfH1fND2eqJFXKYZi2CwhqPoJ0niNihCBLHS?= =?us-ascii?Q?egR4DvOJvKHENw1O55fkIP/S58IG4BonDOkMMyy+zgzfFugnmneyL01hCooK?= =?us-ascii?Q?o6QYn9irkMzik78fXLJlPdkUS6ld8aqaQ8DBUzAIZGZJf8KA6JGUEDxZcJNq?= =?us-ascii?Q?EJ1bnO0KFb2YuCCRIcV0uoYtGZzaVY394mrNghSvT2elyF+xmfLGO2GBMoQE?= =?us-ascii?Q?PPogkvQFKS89zjCkpq9Q7pzqlzJ/qugmNFUamIyUpbDrRC59/Hsou5JPB5Zj?= =?us-ascii?Q?Gkr0RGAn4IjBrneoLmplMLtTkpA7Vfc3XMf+UjY1OKNeXPcPzODMvBpxAWI4?= =?us-ascii?Q?iEi2PphR1g=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3517.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1dc7adf6-4657-4075-c907-08da1e03432d X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2022 10:40:58.6218 (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: k5AzEHnqFtrUg22GV+sb3+VZC/Tq3fcq7oenMaoBKTfoo5O0jkTWYt+/HXlBZrjtN9J2EfpzN9KNiErxKVNTMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3358 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 > -----Original Message----- > From: Wang, Haiyue > Sent: Wednesday, April 13, 2022 11:00 PM > To: Jeff Daly ; dev@dpdk.org > Cc: stable@dpdk.org; Stephen Douthit > Subject: RE: [PATCH v6 2/2] net/ixgbe: Fix SFP detection and linking on > hotplug >=20 > Caution: This is an external email. Please take care when clicking links = or > opening attachments. >=20 >=20 > > -----Original Message----- > > From: Wang, Haiyue > > Sent: Thursday, April 14, 2022 10:49 > > To: Jeff Daly ; dev@dpdk.org > > Cc: stable@dpdk.org; Stephen Douthit > > Subject: RE: [PATCH v6 2/2] net/ixgbe: Fix SFP detection and linking > > on hotplug > > > > > -----Original Message----- > > > From: Jeff Daly > > > Sent: Wednesday, April 13, 2022 01:42 > > > To: dev@dpdk.org > > > Cc: stable@dpdk.org; Stephen Douthit ; > > > Wang, Haiyue > > > Subject: [PATCH v6 2/2] net/ixgbe: Fix SFP detection and linking on > > > hotplug > > > > > > 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 conditio= ns. > > > > > > 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 > > > > > > Signed-off-by: Stephen Douthit > > > Signed-off-by: Jeff Daly > > > --- > > > drivers/net/ixgbe/ixgbe_ethdev.c | 533 > > > +++++++++++++++++++++++-------- drivers/net/ixgbe/ixgbe_ethdev.h | > > > 14 +- > > > 2 files changed, 410 insertions(+), 137 deletions(-) > > > > > > > > > > > > > struct ixgbe_stat_mapping_registers { @@ -510,7 +509,7 @@ struct > > > ixgbe_adapter { > > > uint8_t pflink_fullchk; > > > uint8_t mac_ctrl_frame_fwd; > > > rte_atomic32_t link_thread_running; > > > - pthread_t link_thread_tid; > > > + pthread_t service_thread_tid; > > > > No need to rename this variable, >=20 > Let's do link related service now, so we can keep it, I missed to add my > comment. ;-) >=20 I don't understand this reply, are you still asking to rework the patch or = not? > > we can separate this patch as least into two patches: >=20 >=20 > > > > 1st, change the thread handle 'ixgbe_dev_setup_link_thread_handler' > > from > > > > run-once to as periodical, to handle the original issue. > > > > The name 'ixgbe_dev_setup_link_thread_handler' may be not suitable > > now, as it is a service thread. > > > > We can change it to "'ixgbe_link_service_thread_handler'" to reflect > > the change purpose. > > > > 2nd, add the SFP hotplug in this patch. > > > > > > > > > }; > > > > > > -- > > > 2.25.1