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 8C20EA034D for ; Fri, 25 Feb 2022 02:56:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72C7E41157; Fri, 25 Feb 2022 02:56:52 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6E4FF40141; Fri, 25 Feb 2022 02:56:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645754208; x=1677290208; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=d3HNANRQFD1zyMyOp+5kdJXM+qIiu/T+xSZz16KMA0I=; b=Dlnujl8Bv8bN1vbmUbo2xMwuWViInaqqYtYL8balBp1e2jpNq9sUvQJt YmqGvNO279zSt/33cDxMUGu+S9Ty0HsSE+i8/uobXaHFKe3M4SO9zmcoe MEM8QpAiOPbRk3xaLOYx/xqEoIQZZCtSTvIOnV4irWxOMNYYhiidvs3M3 7NG1ZbtbGHyOCOnPkJKi/vzXAfcqYmNBW3++aUxXhVdtA/hWAPfVwzg0V 9U7XkLniWnQ4gs0MkK/6Iic+dTHVBuzfHKkJpOQMXe3M4efsFtqnVtOFI 0k8bhsrMpzaN+i56Npb1OkTcpwe7bD0BXOAVF/AWgAM+20KoUNfyZ9GMn Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="239798700" X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="239798700" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 17:56:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="592304684" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga008.fm.intel.com with ESMTP; 24 Feb 2022 17:56:23 -0800 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 24 Feb 2022 17:56:23 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 24 Feb 2022 17:56:22 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Thu, 24 Feb 2022 17:56:22 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 24 Feb 2022 17:56:22 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=by2hyZRT+Tzi2XglaZsWyzSx72SfL/qJBr/7JLh46pPzJm1JQjgx3wxpvoarjgrYjuKfdLSPW3p5YaF/nxi3ORAdL7VlInxExznwkgebpa86/A3GdDZ/jg54pDE0qjo7o1myayod9b3KQ1shLspNLvLP9w/AESkIwj67JX3kI8cu1CK8myX6+FzUyRIstnwptJ6rbJdsMKEfjLiEkGax7lm1MP3JBdirY0NVpu2d6qHugha6qO40sh1BYfEMrtoasYH1Njjh5B265Wi03Vee9H40U9giOwJIZJkZIBo+8YZiOJJdlfC1uSPWRyjHEI3X6rjpC6io6HRI299QClIzvQ== 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=7kWVu5aNiEFajYDnF02ppQLGVV8/V4K3uei5PW5JHdY=; b=OQ/b3eXnRsenONqY8djvcIkeS/VPLdbDT6q/H7neSU6DcMByU3Z+rEjrHq5lXzgNUtLZtx6xBqd8olmyPn2Iu/3zKdVxdocA8wIv4lREiYBY3mJ/Y3LG8s9Ro8qF5QKeahbfDrXbKkM2SfRFiQga2+Nnp+JBM3Ui5sMUL7xW6G09E3KrgS9/rTikEN9YRzAibBmcPPWlEKwQciuSktVmY05BkBvq9MMxnyOczJc12AGLz7r8Y3wpHO6IbPYoxJ+uwj6ZrGxFd+BvTxC84uF69yzi3/s5/rWbskQrxd2cInVIFYgG43HCzQM5fc+OVwQIAbUjht3ks4FP/HIriP4V7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BYAPR11MB3495.namprd11.prod.outlook.com (2603:10b6:a03:8a::14) by DM5PR11MB1948.namprd11.prod.outlook.com (2603:10b6:3:112::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.24; Fri, 25 Feb 2022 01:56:20 +0000 Received: from BYAPR11MB3495.namprd11.prod.outlook.com ([fe80::714b:35f9:5767:b39b]) by BYAPR11MB3495.namprd11.prod.outlook.com ([fe80::714b:35f9:5767:b39b%6]) with mapi id 15.20.4995.027; Fri, 25 Feb 2022 01:56:20 +0000 From: "Wang, Haiyue" To: "Daly, Jeff" , "dev@dpdk.org" CC: "stable@dpdk.org" , Stephen Douthit Subject: RE: [PATCH v3 3/3] net/ixgbe: Fix SFP detection and linking on hotplug Thread-Topic: [PATCH v3 3/3] net/ixgbe: Fix SFP detection and linking on hotplug Thread-Index: AQHYKZLAq7Yz+FrRUE6uRGv98n0ix6yjgfiQ Date: Fri, 25 Feb 2022 01:56:19 +0000 Message-ID: References: <20211206221922.644187-1-stephend@silicom-usa.com> <20220224152357.12277-1-jeffd@silicom-usa.com> <20220224152357.12277-4-jeffd@silicom-usa.com> In-Reply-To: <20220224152357.12277-4-jeffd@silicom-usa.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e06cadb4-48af-4a05-b65d-08d9f802049e x-ms-traffictypediagnostic: DM5PR11MB1948:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr 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: /aIt2XQK2yUb1umMxjD4QUc5XWlzciyK5PJf4DfC1P56nZsQ1CxFDDs9pZy0K178mio4czGsI9lqzRPXwTOPCRutYBcIGWlqHaAEkxCWmeON0PC3GzOxnthwMFGhi49p4hKspOSgl8B+16ocXnxBF2hnrayLUrNRN/sNXsQIM5kqgwq+D/RCIcx4MJOyZv2bvC9TTFRCxK8pLdrq8ptvDxme5rgAOwJIwG5Ng7kZ/SrYqy+sIWENCvl+pqEob6WtoES/Tk8dP0k3HxJTOaKyxO25WRN6hJN5oayFk1yYAS2MCbVaEdQaKdVvG7UNHhfV8YjkRwW4FdzrGoI+SLmbITvLiQLVSF9FXC2eq+cQ0YJ2/Gy2wMD6xb7XNorrr5oXOFZZTtQLsap7orfIRUAnW2fTmCVG+2KgVIJ5ZCXhMLOeAkhu7iCVHSOIsL4BZ1XLwvmr/KILAHZMKf15ztQbhxAbqnLnpHrluEdbmLZK0HQtMgUmPxaMZq3uVVgXb4K0kuWa88nIjmUyRWXB8nVqWsxQXY6k++va6+iZUdpNujFG3UrpJXnvRSbetgJUumoZRa3FTn+L6Mfe9m2NZQExu6AtyU/k+F/terV8ztb6YqJKN/FIEP82Nyv8r3N4DXqpDyoxXjbO+86IkmQXoihnz0zUH+dMJA8/YpEEebVzbY+nC8rT5Rq9Dx4lBQb+wwi8QKdiZUqPISiHCYPcvnhBOw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3495.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(8676002)(71200400001)(55016003)(508600001)(83380400001)(33656002)(26005)(186003)(7696005)(6506007)(53546011)(38100700002)(5660300002)(82960400001)(110136005)(54906003)(122000001)(2906002)(86362001)(38070700005)(66946007)(66556008)(66476007)(66446008)(4326008)(64756008)(8936002)(52536014)(76116006)(316002)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?64PKaok3CUYWzp0umzoutamtdhUcP9MPO3ZgpD0B9eUc1T2l1SbDEKgLzMNV?= =?us-ascii?Q?b2Wkr48pZFTT9q0o6R8EJ3gxQe1DM/vKeMQeffm5tigiI8cBl0CePvaiUxV6?= =?us-ascii?Q?uSSJwH2BSgq/pvE3dek/r0yF2dEA30aXS6JiRj6cs81uM6LujLO6RkxmfqQq?= =?us-ascii?Q?jzapzLM10zlwpaLjvAA2w5lpDKAZIgZS5HJCz83H2tfbIElKBzOuVsCyV9Ic?= =?us-ascii?Q?8lv5xPQv5Hjc4UONadMuSDV55rD8P014PeCiASPbTM0PzQqMV49MpDPhWoK+?= =?us-ascii?Q?oXhf/d6nPfbau9d2Er27ML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i+?= =?us-ascii?Q?Nyy0UalIJ2n4L4L91hppgmYyWOAVv+u8ZBz48ycZIvXcszfor6uOykWGwZuq?= =?us-ascii?Q?sbu9SY+doDj7Byq9HJ3Qd0P1nfB+iX6XZwyoO6LanpjsxNUeWWrPnZiwOhGC?= =?us-ascii?Q?/lPq/GMfJ9aruLlPqxiAT+2icPs6KQRNhZnHkgO2Y4LdfW+/UFh6iLY7u8s0?= =?us-ascii?Q?T70gil2y8m21rfPDyHDLfPvS51dluKX2DeiUiGJFoXU4HJrghZ/HNREC4WXr?= =?us-ascii?Q?FKL8h1Y8vOvS0XImpplofDe/TxRq9n493A0I0/quSBOh5+Gr54M/i7rMUt+v?= =?us-ascii?Q?p9uW2w5+K3V+6kiPtUAVxjZPiZv1LHSXPRA+U+oG09Opf0q9Osqk0C/2hc3y?= =?us-ascii?Q?+H50BH9ETshBU630FGuuslfbJbLxRm6mNTI87ge+X7tkqq2uP1ZrGxTHsqtv?= =?us-ascii?Q?bQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3495.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e06cadb4-48af-4a05-b65d-08d9f802049e X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Feb 2022 01:56:20.0144 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3MrAkm6u4mrOEM+idcBZpJTXtvHIV/cO81I/M415JR8R99lC3KaI1nxM3LINk/zFLPzYBav5vUhSXjZgcfNTkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1948 X-OriginatorOrg: intel.com 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: Jeff Daly > Sent: Thursday, February 24, 2022 23:24 > To: dev@dpdk.org > Cc: stable@dpdk.org; Stephen Douthit ; Wang, Ha= iyue > Subject: [PATCH v3 3/3] net/ixgbe: Fix SFP detection and linking on hotpl= ug >=20 > 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. >=20 > For example: >=20 > * 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. >=20 > * 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. >=20 > 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. >=20 > Fixes: af75078fece ("first public release") > Cc: stable@dpdk.org >=20 > Signed-off-by: Stephen Douthit > Signed-off-by: Jeff Daly > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 687 +++++++++++++++++++++---------- > drivers/net/ixgbe/ixgbe_ethdev.h | 14 +- > 2 files changed, 486 insertions(+), 215 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_e= thdev.c > index e8f07cb405..2150b5ed35 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -69,11 +69,11 @@ >=20 > #define IXGBE_LINK_DOWN_CHECK_TIMEOUT 4000 /* ms */ > #define IXGBE_LINK_UP_CHECK_TIMEOUT 1000 /* ms */ > -#define IXGBE_VMDQ_NUM_UC_MAC 4096 /* Maximum nb. of UC MAC addr= . */ > +#define IXGBE_VMDQ_NUM_UC_MAC 4096 /* Maximum nb. of UC MAC addr. = */ >=20 Please drop this kind of indentation change, too many. Then we will be lost in your fix. > /** > * l2 tunnel configuration. > */ > -- > 2.25.1