Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C01AECAAD2 for ; Mon, 29 Aug 2022 11:40:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230522AbiH2Lk2 (ORCPT ); Mon, 29 Aug 2022 07:40:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiH2Ljp (ORCPT ); Mon, 29 Aug 2022 07:39:45 -0400 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on20624.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e83::624]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EDC212604 for ; Mon, 29 Aug 2022 04:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bVc5ON6b7b5Nc2Ojur+qCFhhR3Jl5oQSy205VX+LFaeTB/8wa7M641x838cgzBSVBSCSMzL9Pus/1F8PCunk7YWYU73XBfOVaqbdnWjp3Hh8BgJ++K9a58a1K6Gb78jvxxcyE/guuenqDrLUj+gpad9+aqCr/5YPRbN6qkuIy8zwjaLGPMD/7GD0iMSjv8x4LEIoxTNEs+SL7yUqYpKVVywAngs/5Ql365e4bS7AEVeWm0MTFhE20No+GI1PegsZfGFmo19MfSknhZMTP3gCsAykG4OFFZagHbMQ34gLPwLkcIeypmYaDnWRBO/WTT6OldHsgpYOTLLUEXiZUx7Qiw== 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=ZPTBe98UHA6gNKtnNF3xB7C+NUcVQnFV+YP9q1xqRMg=; b=UQrxUKca/tiRYGmjtPl6t0YIrYa0E3OXYwfWqF60YkHBvdXVZVsBliW+Ve1qQwCCaHDnGG2C831yJI0E/N5rwxfcL31cREhI9Rpl7Osj/lpCgOQFKxxbLmL5unC6i1o1pRcEecN7hJ1mA37r48f53ikOjamLxcLqQVVP99BL1s5WR5gqoQ6c1g976dboNuYiQ7X57gce+sXhxtaaEBtFRGh8pp2ac662s4nFC9YC1UrkDJEYXZ17FoW5TkZMuKPRjxm9vcI/Iwrie9W0NNLD/hmPzlACzbW2k/qkB0dhBNi+VjS4OXTNYFQYcdHVffd0pBPysWntFNiJNB2WKYdEXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZPTBe98UHA6gNKtnNF3xB7C+NUcVQnFV+YP9q1xqRMg=; b=VwiApYdr+pK1xhXGJkP8kYkJVTJ58ZhhSk6Wh2MiYotvcu6Oft88uwmn5rtPegTouOYunKCC2IocmLUFHZ9SSldnkzk83Ter8vfJaSD1lEWdQ/7AiFbf89xY5LFThxFGvxNe7964QQoVyCsz6QG7VoP/Orecabmu7uFpRuFkqkdzOryqpbZ8LaroIDj8TAMDTgSzxrbwkEOaLXWV2ioxXpbpyE5jaWVfAJTxTTLvX3quTglhsw/WVigdn1QT8U4B+xjMchyrjW7ZYfLKGAddgY3hohcazGLRFc0iKyG0TCTEAwZhfZhqkaQfGrprL0zT0Y1usYliuRZBP9AoYo/B1w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DS7PR12MB6288.namprd12.prod.outlook.com (2603:10b6:8:93::7) by MWHPR12MB1885.namprd12.prod.outlook.com (2603:10b6:300:114::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.14; Mon, 29 Aug 2022 11:21:58 +0000 Received: from DS7PR12MB6288.namprd12.prod.outlook.com ([fe80::2caa:b525:f495:8a58]) by DS7PR12MB6288.namprd12.prod.outlook.com ([fe80::2caa:b525:f495:8a58%9]) with mapi id 15.20.5566.021; Mon, 29 Aug 2022 11:21:58 +0000 Message-ID: Date: Mon, 29 Aug 2022 14:21:35 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH net-next 0/2] ice: support FEC automatic disable Content-Language: en-US To: "Keller, Jacob E" , Jakub Kicinski Cc: Saeed Mahameed , "netdev@vger.kernel.org" , Simon Horman , Andy Gospodarek References: <20220823150438.3613327-1-jacob.e.keller@intel.com> <5d9c6b31-cdf2-1285-6d4b-2368bae8b6f4@nvidia.com> <20220825092957.26171986@kernel.org> <20220825103027.53fed750@kernel.org> <20220825133425.7bfb34e9@kernel.org> <20220825180107.38915c09@kernel.org> <9d962e38-1aa9-d0ed-261e-eb77c82b186b@intel.com> <20220826165711.015e7827@kernel.org> From: Gal Pressman In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0096.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:191::11) To DS7PR12MB6288.namprd12.prod.outlook.com (2603:10b6:8:93::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 74f63805-d2ff-4476-7155-08da89b0afbb X-MS-TrafficTypeDiagnostic: MWHPR12MB1885:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HKBm8mpLwn5IN8zjOA4Ry1IAmTSsR/ad1M43ns4DL2JjHgTBgU636/5RgIj4Z5qCBI5SlkwRMDZfcb3vNo6KHTd9vaQsM8YgOg5FS6eFwc3JyzDkd0FlhqqGXRmo5edKbdP4SvcBcR1Fv/BA+vaWflkKacdpJjqvNG+VwSTBRZ/4ANrtMCNdHwW/thteofvFCGIYF6c5jItqW7lLy6jtcJMYnAIAJGZ74n6lHhpLG6xPw6A9zyOJd0plPINMwSylTxEDgSbUj3HfFrfcMt3W/jfiCIy0mrEOK5qC78dpbOZK2g9BDEFWLJmYa2/OycBSJfhVQ7omqM96AjkFZRs7eDgvqjqYxqKJOr3Jcw6HuMCvuziJxHKDKw76eUjDnh0fYbpLYsD0t8+UsErRLAPghiFYh4yuYQjv10nCxKY/GjQSiOSqIHy9njJwJC/mqbaE2wXRmAx03Y1XWmeTXfVVv9gLw6L1YUJIY8FTuzbqRNS7S4UNmWyq4YVqiSqG8C/6cgrStKyim+uNra7sCY/47ydjf+FZBPJYk9BC0cVSRuwGNWb2OGYW91NqtWznylW6ELzOuDwDH3iv4rd2l3XsbxuttMLvGxVScGf1VsXxw1m7ZK4NxzcDT0KIXOD9GfoOwI/g6K3I9BUGxS//LxMR+FNvM791RczyW11Uz7+PE3Wvg3Lp2BPRDm9utshwFo07Iv+Zdl9tnM/P1d3rla67EhnJOZKgF5vd0uzUIc2f/Aur4gV61qXpMFUTOYxhAXLILHd15vVglczcPtnl+hs3WKGgnpGJfVlBIj85fuIfiMw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB6288.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(366004)(396003)(39860400002)(376002)(136003)(6506007)(38100700002)(53546011)(83380400001)(2906002)(6666004)(2616005)(6512007)(186003)(8676002)(6486002)(4326008)(86362001)(66476007)(66556008)(31696002)(110136005)(66946007)(316002)(31686004)(26005)(54906003)(36756003)(41300700001)(8936002)(478600001)(5660300002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cHRGVzhpdkIwaDEybTFYaTluVGxSd3VCNUFaWk1iV0ZqYy96WFJxK2pack4v?= =?utf-8?B?NkVlYmJuNnJQN1pUVVFoZmFwUys2enlTSnpvQmxZeW5PaFhjbFhzaWVBaDQ3?= =?utf-8?B?Z2NEd0dkbjBINzJWTVcvVEVXZ282VDY0dWtvSGQzL08waW44b20rYmIzYzdM?= =?utf-8?B?c2xMbDdYYjlMVnZxV2FONTVlL01yZUxRMlZneEdEbmdDWjFib1h1MDZNZnFN?= =?utf-8?B?Q0pUTnl4MkdpT1Q1QkpwNFAyRHZVSzdhc0JZQzRmb2JRR1Q0QWlMK1BzS1FE?= =?utf-8?B?Z1FHVnhYOUxzZmNHSW5uUFJFTUtyNW5YQVNWeHFWWk1jZzBOT3VxMEsvMUdL?= =?utf-8?B?dEVzdDJwRk9FMUpvNyt2N1FhazlPbDlFQmVaVms0SExRSEhhSUg1alhieGI0?= =?utf-8?B?N05mMG9tRUVwYUs5M25oci93Z1EzcDB2bzU3S2JUT2NJY1dCZnVBdGRsdGZV?= =?utf-8?B?S1BiQ1VsUEpiSGxnNG81M1cxaVZ0bjFZNk5QQmEveEMvYXNaZjNpc1lWWVd3?= =?utf-8?B?Y0paR25ybjVGbDFDeit2RHA1Q2gzZHVPSXAwVW0wQWdoK04rWG5XY0xBM3pN?= =?utf-8?B?b0tVb0RNTDExdG1JL0t1Qk91cHJkMWI0Qi9VOE9NaDYxMlB2cytjcHJ4UHZm?= =?utf-8?B?VnJ0ZHkvako1NTViVTYxREl6NEgrTEZwTnRBZzJ3Um45bi9JN1V1NFFOeGJX?= =?utf-8?B?Y0NSL1RMT1JJRW8vaERMZmZvVHhmZXZhcGFVb0dRZmJuclNOdTBXT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dRVWFMM2V3Z0s3eWZ1NTJpbVY1N3hZ?= =?utf-8?B?Zm84TkxFVWNaN1JzQkgwMnNLRGZjM0xEcTVYTjJYdW1kaFRSVjJZUTdiOTVa?= =?utf-8?B?UUFEU3p3TkNIbWFLbUNUOHFmWUR3OHdyeWVNN2lVbVVVTHlLYW1OUmNyeDUr?= =?utf-8?B?Y0J3S0JMU1JzQVJ1KzRZUWw5VWpsdHY0M0lXVk1zWmdMYVEwQjl0cVRRbkdV?= =?utf-8?B?SDdNK3hOVEcyY2dybHBOV05YQVNOZE5rNENNZ0tZM1FVMGhUWE5ENTV3YkxP?= =?utf-8?B?bXBhYVZmby9zZHlrRnk4QTdpYTZuOGFPc2xFeTY2K2hkTG1JVlVldVV5U1dL?= =?utf-8?B?ZkdHbVNtNXVuNWloc0ZpUjUvOGdmL2xRM0g2cnJsc3l1Zm8vWklJUHpaNVVl?= =?utf-8?B?TGJRTmJRV3NFSGlkQy9ycytPS3QxSnQwOXFWNHdQMGxaOWFESWtJQjN6akhU?= =?utf-8?Q?s1bWUeO5BXht9+JWfFF8FiYm9?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74f63805-d2ff-4476-7155-08da89b0afbb X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB6288.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2022 11:21:58.3142 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7yd52GATq8geBOotBNhqVKdVMXa6s9qjFMdur4N0myV9a6fqpjMDfG20Hyk3hpil X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1885 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 29/08/2022 10:11, Keller, Jacob E wrote: > >> -----Original Message----- >> From: Gal Pressman >> Sent: Sunday, August 28, 2022 3:43 AM >> To: Jakub Kicinski ; Keller, Jacob E >> Cc: Saeed Mahameed ; netdev@vger.kernel.org; Simon >> Horman ; Andy Gospodarek >> Subject: Re: [PATCH net-next 0/2] ice: support FEC automatic disable >> >> On 27/08/2022 02:57, Jakub Kicinski wrote: >>> On Fri, 26 Aug 2022 10:51:21 -0700 Jacob Keller wrote: >>>> On 8/25/2022 6:01 PM, Jakub Kicinski wrote: >>>>> Oh, but per the IEEE standard No FEC is _not_ an option for CA-L. >>>>> From the initial reading of your series I thought that Intel NICs >>>>> would _never_ pick No FEC. >>>> That was my original interpretation when I was first introduced to this >>>> problem but I was mistaken, hence why the commit message wasn't clear :( >>>> >>>> This is rather more complicated than I originally understood and the >>>> names for various bits have not been named very well so their behavior >>>> isn't exactly obvious... >>>> >>>>> Sounds like we need a bit for "ignore the standard and try everything". >>>>> >>>>> What about BASE-R FEC? Is the FW going to try it on the CA-L cable? >>>> Ok I got further clarification on this. We have a bit, "Auto FEC >>>> enable", as well as a bitmask for which FEC modes to try. >>>> >>>> If "Auto FEC En" is set, then the Link Establishment State Machine will >>>> try all of the FEC options we list in that bitmask, as long as we can >>>> theoretically support them even if they aren't spec compliant. >>>> >>>> For old firmware the bitmask didn't include a bit for "No FEC", where as >>>> the new firmware has a bit for "No FEC". >>>> >>>> We were always setting "Auto FEC En" so currently we try all FEC modes >>>> we could theoretically support. >>>> >>>> If "Auto FEC En" is disabled, then we only try FEC modes which are spec >>>> compliant. Additionally, only a single FEC mode is tried based on a >>>> priority and the bitmask. >>>> >>>> Currently and historically the driver has always set "Auto FEC En", so >>>> we were enabling non-spec compliant FEC modes, but "No FEC" was only >>>> based on spec compliance with the media type. >>>> >>>> From this, I think I agree the correct behavior is to add a bit for >>>> "override the spec and try everything", and then on new firmware we'd >>>> set the "No FEC" while on old firmware we'd be limited to only trying >>>> FEC modes. >>>> >>>> Does that make sense? >>>> >>>> So yea I think we do probably need a "ignore the standard" bit.. but >>>> currently that appears to already be what ice does (excepting No FEC >>>> which didn't previously have a bit to set for it) >>> Thanks for getting to the bottom of this :) >>> >>> The "override spec modes" bit sounds like a reasonable addition, >>> since we possibly have different behavior between vendors letting >>> the user know if the device will follow the rules can save someone >>> debugging time. >>> >>> But it does sound orthogonal to you adding the No FEC bit to the mask >>> for ice. >>> >>> Let me add Simon and Andy so that we have the major vendors on the CC. >>> (tl;dr the question is whether your FW follows the guidance of >>> 'Table 110C–1—Host and cable assembly combinations' in AUTO FEC mode). >>> > The other engineers I spoke to also wanted to mention that 110C-1 is only a small subset of all of the various link types. They also mentioned something about an SFF standard which describes many more types. The firmware folks here claim there's also a difference between TX and RX. > >>> If all the vendors already ignore the standard (like Intel and AFAIU >>> nVidia) then we just need to document, no point adding the bit... >> I think we misunderstood each other :). >> Our implementation definitely *does not* ignore the standard. >> When autoneg is disabled, and auto fec is enabled, the firmware chooses >> a fec mode according to the spec. If "no FEC" is not in the spec, we >> will not pick it (nor do we want to). >> It sounds like you're not happy with the spec, then why not change it? >> This doesn't sound like an area where we want to be non-compliant. >> >> Regardless, changing our interface because of one device' firmware >> bug/behavior change doesn't make any sense. This interface affects all >> consumers, and is going to stick with us forever. Firmware will >> eventually get updated and it only affects one driver. > Well, the current ice behavior for every FEC mode *except* No FEC, we try modes which may be supportable even though they're outside the spec. As far as I understand, the reason we attempt these is because it allows linking in more scenarios, presumably because some combination of things is not fully spec compliant? I don't really know for sure. > > For future firmware, this would include No FEC as well. Thus, even with future firmware we'd still be trying some modes outside of the spec. I can try to get some more answers tomorrow about the reasoning and justification for this behavior. > Yea, understood, but respectfully, I don't understand why we should go along with your requirement to support this non-spec behavior.