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 7DEDDA0350; Tue, 21 Dec 2021 15:05:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10B7C40040; Tue, 21 Dec 2021 15:05:47 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2129.outbound.protection.outlook.com [40.107.21.129]) by mails.dpdk.org (Postfix) with ESMTP id 0BFD04003C; Tue, 21 Dec 2021 15:05:44 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=irUecpw5GcAeOuDv1Gp3WIl7iKEubdfVCX1awfz3LtjP3AM2HPX6eMMNe4ZO7rjtYySNUcfH2RaylGD46ktmdLgJ1hudPD4hmSu/9eBU4sEt1TYkNHBAtJtOjbZjQkYEJGF9hTozSrnFUvKjkNvNrO23W1NtkIlk9p3dL5Pv6vDn+EVNyPZQeRc6+zOXFH9GMPRaS6lMfLU5+csyi6Fp/r7PeZXyFb7TASbtsn15K2xTBSEEuXq1KGp/yNMHTdb5IxoWbEYWJxXQMaGj56/6WzEZqG3UodDU9g8HW9pG41R4UTjpnkVZ1Ev1xmcuHe2i0afLyNorUc7AvN3nLsDIPA== 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=h8NSOOVOof+iR0THQrQnSpCOl86xjcTNi3DimHVloy0=; b=QGpp6GPKR7eTVqvDqggssPggrNeLsZTPQMFS1+IxPtY8pMZAZFeuOp80ObVEbvtEiUYVZP1MVnezBj6bU6VWIaKJiQv+0DdX2Qd//O1FIk1YuwXAT0pvwwD6YvtP2597IGjbArvuUJQpSJVcMOJl9HrHcSfInH1ZoymB2zuXVb8Ee9C/KKnHvU8Ob++CEMOJ8DBJlxzrM7wdB5jtx2tQqKhlx4WoKdhguvB5vGQegCAhsG2dukHt5jTjSedz59KZChc7Rc8HuQMNgqFuebztudr0UVvWsl+aF4/9yzodit5nhxkY4f55fTN24aY7ilAZMTEp/4T/bxugvG5g3DbKwQ== 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=h8NSOOVOof+iR0THQrQnSpCOl86xjcTNi3DimHVloy0=; b=Iz1lKs9ONDmQHn0Fokn9LQWZc/CGVXsv6YG26wdX17KRBlloNfA/o4CoQA8X/yqzxxDdV46JyAzZAUGHkgnZZMdrQUFQ9D3Mj6p4XkNkOtRDsQKSqS01mak7GfOqKLuuGt50yKvZunvwtzEeeSVt926k6G0DPvHEUWWUJntpNAw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silicom-usa.com; Received: from AM0PR04MB4083.eurprd04.prod.outlook.com (2603:10a6:208:64::29) by AM0PR04MB4548.eurprd04.prod.outlook.com (2603:10a6:208:74::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14; Tue, 21 Dec 2021 14:05:42 +0000 Received: from AM0PR04MB4083.eurprd04.prod.outlook.com ([fe80::f4db:d40d:a746:7bfc]) by AM0PR04MB4083.eurprd04.prod.outlook.com ([fe80::f4db:d40d:a746:7bfc%7]) with mapi id 15.20.4801.021; Tue, 21 Dec 2021 14:05:42 +0000 Message-ID: <8f8b59fa-6db1-55ee-45d6-9626c3f0929e@silicom-usa.com> Date: Tue, 21 Dec 2021 09:05:37 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH v2 3/7] net/ixgbe: Check that SFF-8472 soft rate select is supported before write Content-Language: en-US To: "Wang, Haiyue" , "Lu, Wenzhuo" , Changchun Ouyang , "Zhang, Helin" Cc: "dev@dpdk.org" , "Wang, Wen" , "stable@dpdk.org" References: <20211206221922.644187-1-stephend@silicom-usa.com> <20211206221922.644187-4-stephend@silicom-usa.com> From: Stephen Douthit Organization: Silicom, Ltd. In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BL1P222CA0030.NAMP222.PROD.OUTLOOK.COM (2603:10b6:208:2c7::35) To AM0PR04MB4083.eurprd04.prod.outlook.com (2603:10a6:208:64::29) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4b6573da-0c26-4e97-9e39-08d9c48af9ae X-MS-TrafficTypeDiagnostic: AM0PR04MB4548:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TTQfA5Ih4nDJUVmiViwYQqgQRrrNkkQLpWc77dGDwJIbrCQgmX7GMV3cIyNDzkmpYmvaOvi+cUe5Or2tUo2Asc5aJ6DzxqXXJCmX6fUW6akSxpG0Akc8PwAf4kjYzqdgpRacgBKQYDqfMvQ4gzVQOp339raPDplEzj9Hq3x8avGrGIxH82Z+eLayNdd3j5mjbcNuuqNpaX71O5kZvrm0cixILW5dVpsqN2wQA2OjqeMKxPMnCrt0E2bBGwska/7/MAxfJfkBVds8XvlcEqYhmlx2BJm99pV0nUzxavzELMQG4DW+itS5ovG+X6RPBubMHJl8yypfcDJwv9XtvpJ3bJAP9O2Vo3z6mZE9aTxgG5FeGtDw4hG3xlB5xOR5MFSHOfPOcCt7JZfhKv4ihfw89AK+kGRyZC15IK0EiPdpUiaN3W/zxf+4ERtihtaSYeptbp+hPe/phdXvXn6GMDRvQ+PWqH0JrwwCktndMXXtI1qoliZZCIMZEm2QRBd12R0aMZce3XJMBLyUHbXsYfbDmlS5KQWHS704gAf9KAwxWAR9QiOFmwQwB2gRQlV6++mEELPhVVSi3m/mQF5e7XqD57x1o+K+0ofmU0WN3VDGDAvPM6Qj02/YTNXwgd1iGHOWk5NNsOF2/CanUcZRBagp1lPBKxj5EnWGnXP0Kx2T0qF2YB7CIFju08QZ5LNei+CNswXh8B1hBITYnr/pkmNJYFLYBSA7xAtlDbdiKWKQbHY+kmFkpxsWPEXBTT1tb5jLse51fw21X8iMeRr/CQmnVrEnZOjIi7LvsGK1SendCqhFi1BVPrNBNQAmQ654pRZ2Sg+TgEjvTQxBOI+UtsEf/Q2wUCB6AaCVfVFptsUccwA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4083.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(66556008)(6512007)(38350700002)(26005)(966005)(38100700002)(54906003)(8936002)(66946007)(6486002)(508600001)(8676002)(2616005)(36756003)(31696002)(110136005)(52116002)(83380400001)(2906002)(3450700001)(186003)(5660300002)(36916002)(31686004)(316002)(6666004)(53546011)(4326008)(6506007)(86362001)(66476007)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V2duOUxseGkyRVZWb1QwUEdjSDNtQ296VERJMjhJM0JvbjNYZytsb2kramtS?= =?utf-8?B?ZmlUS1ZzUGYwOWp3SndMcGRDTmhYTGZYR1B3Q2RNd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P?= =?utf-8?B?MFRrUnBmSDJ2bTZoYUw0SDYrT2JjdUVVZ29QanIyRUVvdEwvbXhrZC9sNXZB?= =?utf-8?B?QTgzNlowZlFicnJtQ0pKeFdOSW10WFJKWmVNbHA3aDNqY2JVMWhIbVMrbmNx?= =?utf-8?B?c0lDV0pKVGdrMHVDdGUvTG5HRDBjVUpTQ3ZWemFDNDhFOFFYcG9YWnRJRnhO?= =?utf-8?B?MjhlL0d1bEYrbVlvUHZRcFZlMnR5VmUyYXF3eXE4ZFFYVTI2M0JWRmd2SEd1?= =?utf-8?B?Rks5T0hRckJjdjRSUmhHQTUxamM0Y2dsd2g0eG5lT3AvWnB1dW8vYUc5dDlW?= =?utf-8?B?bXN0MDFoMWF4NUpaTGFicXVadnk1UVdvb1RTblZHSnR6aTBNUWcweEFpTlBQ?= =?utf-8?B?Z1lLbHcyWEgveUQvb1hIakdGQjRBPT0=?= X-OriginatorOrg: silicom-usa.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b6573da-0c26-4e97-9e39-08d9c48af9ae X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4083.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2021 14:05:42.5835 (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: xnx/pnwZ7UL5DVruBQhs2HBNxKWnNah4qsAogc82o4QQFn1F5oBBAr+7qfdsyRNVFSYqFtBy1IMzf1oteax1cUoWgTr1gEXLrzrrQKQVzEw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4548 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: stephend@silicom-usa.com Errors-To: dev-bounces@dpdk.org On 12/20/21 20:15, Wang, Haiyue wrote: >> -----Original Message----- >> From: Stephen Douthit >> Sent: Tuesday, December 21, 2021 05:33 >> To: Wang, Haiyue ; Lu, Wenzhuo ; Changchun Ouyang >> ; Zhang, Helin >> Cc: dev@dpdk.org; Wang, Wen ; stable@dpdk.org >> Subject: Re: [PATCH v2 3/7] net/ixgbe: Check that SFF-8472 soft rate select is supported before write >> >> On 12/20/21 02:53, Wang, Haiyue wrote: >>>> -----Original Message----- >>>> From: Stephen Douthit >>>> Sent: Tuesday, December 7, 2021 06:19 >>>> To: Wang, Haiyue ; Lu, Wenzhuo ; Changchun Ouyang >>>> ; Zhang, Helin >>>> Cc: dev@dpdk.org; Wen Wang ; Stephen Douthit ; >>>> stable@dpdk.org >>>> Subject: [PATCH v2 3/7] net/ixgbe: Check that SFF-8472 soft rate select is supported before write >>>> >>>> Make sure an SFP is really a SFF-8472 device that supports the optional >>>> soft rate select feature before just blindly poking those I2C registers. >>>> >>>> Skip all I2C traffic if we know there's no SFP. >>>> >>>> Fixes: f3430431aba ("ixgbe/base: add SFP+ dual-speed support") >>>> Cc: stable@dpdk.org >>>> >>>> Signed-off-by: Stephen Douthit >>>> --- >>> >>> >>>> /* Set RS0 */ >>>> status = hw->phy.ops.read_i2c_byte(hw, IXGBE_SFF_SFF_8472_OSCB, >>>> IXGBE_I2C_EEPROM_DEV_ADDR2, >>>> diff --git a/drivers/net/ixgbe/base/ixgbe_phy.h b/drivers/net/ixgbe/base/ixgbe_phy.h >>>> index ceefbb3e68..cd57ce040f 100644 >>>> --- a/drivers/net/ixgbe/base/ixgbe_phy.h >>>> +++ b/drivers/net/ixgbe/base/ixgbe_phy.h >>>> @@ -21,6 +21,7 @@ >>>> #define IXGBE_SFF_CABLE_TECHNOLOGY 0x8 >>>> #define IXGBE_SFF_CABLE_SPEC_COMP 0x3C >>>> #define IXGBE_SFF_SFF_8472_SWAP 0x5C >>>> +#define IXGBE_SFF_SFF_8472_EOPT 0x5D >>> >>> Looks like this is YOUR platform specific, then this patchset can't be >>> merged. : - ( >> >> This isn't anything unique to our hardware, these values are coming from >> the SFF-8472 SFP+ I2C specification. >> >> The ability to do a soft rate select via I2C is an optional feature, and >> modules that support it are supposed to set bit 3 in byte 93 (0x5d), the >> "Enhanced Options" register, to advertise the functionality. >> >> Please see section 8.10 and Table 8-6 in the SFF-8472 spec. >> >> Checking the RATE_SELECT bit flag may be overkill since the transceiver >> is supposed to ignore writes to rate select control bits if the feature >> isn't implemented. I can drop that check if you like, but the other >> checks for a 8472 device (vs 8079) aren't anything different than what >> already happens in the driver elsewhere[1]. I'd argue that testing that >> a feature is supported in hardware before trying to use it is normal >> driver behavior. >> >> If instead you mean that the entire series is somehow applicable only to >> our hardware, I'm not sure why. >> >> That hotplug issue isn't seen on the same hardware when using the Linux >> driver; so it's a dpdk problem (at least on C3000 ixgbe devs), and not a > > I can't find your related fix in two official Linux drivers: There's no submission from me on the hotplug issue for the mainline, because the issue isn't present in Linux, only in DPDK. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/ixgbe > https://www.intel.com/content/www/us/en/download/14302/14687/intel-network-adapter-driver-for-pcie-intel-10-gigabit-ethernet-network-connections-under-linux.html? > > Normally, DPDK keeps sync with this kind of release. > >> hardware problem. Fixing the hotplug/rateswap issue was my primary >> goal, the other patches fix problems I found along the way while >> debugging. >> >> I can also reproduce the hotplug/rateswap issue on the PLCC-B, an Intel >> reference design for the C3000 family, so again, not unique to this >> platform. > > I guess this is just in C3000 reference board SDK ? It's the board covered by Intel Doc # 574437. > I recommend you submit the fix to kernel firstly, you will get more > experts' reviews and fully test: Since patch 3 isn't directly related to the hotplug issue should I pull it from the series for v3 to keep the hotplug fixes moving forward here, and in parallel submit just that one to Linux? Thanks, Steve > https://patchwork.ozlabs.org/project/intel-wired-lan/list/ > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan > >> >> Please let me know if that addresses your concerns, or if I've missed >> your point. >> > > > > > >> Thanks, >> Steve >> >> [1] >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/ixg >> be/ixgbe_ethtool.c?h=v5.16-rc6 >> >>>> #define IXGBE_SFF_SFF_8472_COMP 0x5E >>>> #define IXGBE_SFF_SFF_8472_OSCB 0x6E >>>> #define IXGBE_SFF_SFF_8472_ESCB 0x76 >>>> @@ -48,6 +49,8 @@ >>>> #define IXGBE_SFF_SOFT_RS_SELECT_10G 0x8 >>>> -- >>>> 2.31.1 >>> >