Message ID | 20230810094817.29262-1-josua@solid-run.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp341276vqi; Thu, 10 Aug 2023 04:13:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEle3oyGeqZSLan/5jfjmWD8hfDNORKRWfl9dRvmtuQfhivGYL7myjWBVSA4s8LkQ2ebM2l X-Received: by 2002:a05:6a00:1491:b0:668:97bf:5ed7 with SMTP id v17-20020a056a00149100b0066897bf5ed7mr2478456pfu.22.1691666022754; Thu, 10 Aug 2023 04:13:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691666022; cv=pass; d=google.com; s=arc-20160816; b=rkmUG9bPglxiQufIgq3m8is+1SVsKdqNPZ9VICxsQP+weUukM74cj+ZZgMZiIQaVQt Syi8EsQG3IryV46WWQRAEahWUwJu81UjrlfCw2qu+8Mqp7pAhwYllNeKvQu4bF7dKVss 9mHKPUIabrvNhSL6hZjGdPDK9vD9Kxd3U4OvvBp9kiMopoOiEjDqRYuxxDs1m30N3tEi 87kCX8wU0exuNlY10SrMpFSnxmzCwoehhmJMAO59aYis48GUvgLKGmVtut5iXJeFegjx VuoamEliIFvM/EcuX6T1cWEthZD4PtQuYQRggyaDjOYcnDbqUPbEV/QrXW88KSUhYE4L 8e6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=JXNwtCa7wV4WemP3Z11V7hF5X0Xdv87y9udyU2WOwxw=; fh=i6JTZjvovsMRja9E+ef6dzJwZEMUX3oqhUjsZv4/XJU=; b=H4W5hUYA/n+pD2nvgwndpYccm4zMV9cmNlt+AArPwhtWVAOI0b9Y6QDHeP8erNoXRz 1Oy98vK8noVbe3DQWqTHoioWebVZA5JrVBv2boa4dlUPAN+BRxcfrUPduen02sEJM5Sn CSDwbdPZYoK6GT8Fe6wIxU2otzwMW/kZ+gPwAECSDR1S4IMiMJmrrjgahqsjzi3ti1sg N6LAxmaZQpGFrKL2fOnsWld4i5f4IzbYWhpLfpWybmT3CC3EBrWnBzpG74Lc7NTt9urZ RWMKgGAQKwyBJOSjeO4TTgoSlVTmSwHvcfefpscLfnb+njuD9m+k8BVXkS38RVJJOhp/ +xPQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@solidrn.onmicrosoft.com header.s=selector1-solidrn-onmicrosoft-com header.b=lP2XJzjF; arc=pass (i=1 spf=pass spfdomain=solid-run.com dkim=pass dkdomain=solid-run.com dmarc=pass fromdomain=solid-run.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a056a001a9000b006874f410d77si1417980pfv.93.2023.08.10.04.13.29; Thu, 10 Aug 2023 04:13:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@solidrn.onmicrosoft.com header.s=selector1-solidrn-onmicrosoft-com header.b=lP2XJzjF; arc=pass (i=1 spf=pass spfdomain=solid-run.com dkim=pass dkdomain=solid-run.com dmarc=pass fromdomain=solid-run.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233794AbjHJJtp (ORCPT <rfc822;m15293943392@gmail.com> + 99 others); Thu, 10 Aug 2023 05:49:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbjHJJtn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 10 Aug 2023 05:49:43 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2089.outbound.protection.outlook.com [40.107.21.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A77A8211B; Thu, 10 Aug 2023 02:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZvbyTy1LszRyuUrLKH5V+gAEfC4HOz9QBwUA6tW9HBpLeKIX3eltbh29pk3bARh9FFTYSxUDMMDBKtnPDo/vX7H28uTqTQApfkWSC85OuJvJlz2Hh2XfZLF7vyJPYVPXPF8h0Bohga2uZzjjjZ2zgfGxb+dRV37DRBAx3djlHGHmqSDBJKu2zJ/4wW6z7XSHZPlHuhAqPHALHBTdMhxLXTPsskBfzGtkabbf7XObZ3uyhelj3++bOnNm2f395D7NaVc187qog/da3qSjx0Xic5YDolqieZWUxnlLJ4huZ3/3jcM2kbMyqtOKaXwT5YLGoPJvDxHRlK4VNFhAj+bdHA== 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=JXNwtCa7wV4WemP3Z11V7hF5X0Xdv87y9udyU2WOwxw=; b=javCBRbO0YQYsVGQteNhcdVB8l2Jcd+kdPRQpYB6KLxUjcmFdSvzEBZwRMBXxNf3UzTO0jsih3QcXoUrVnjux6YQeXA75R8VjeFyiXk52yQEO247WYRpcMX9pNH3QO5wl0SBZe/A413EUzGp4NNWq3YPb3il3wrM7UY85EcVYjbF0kMxXcBEds3OSxb0u1ZHVr8k7SbV1AHwhHm/Q8yaEcugfvLuj1sOyxJqbF2lDdJAO/YEdzn2OTwjLon6pZAYb7qncJHeEzhXUv15qtyK5XT5ixAL9w7OBx1gRB/SkDukdBjDIqV3FXGVERyvVU6OcRvgN9ewC3Eaj0oOWLq/7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=solid-run.com; dmarc=pass action=none header.from=solid-run.com; dkim=pass header.d=solid-run.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=solidrn.onmicrosoft.com; s=selector1-solidrn-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JXNwtCa7wV4WemP3Z11V7hF5X0Xdv87y9udyU2WOwxw=; b=lP2XJzjFAS8/tQjNfCAsFH6C8toK3wThXC42iL7YF5rFTIL1dLjtUDs+Szq79+d3UR5qtklZV/sEoj2+8SGxa4UHFqyVCc3oVTmiu2T67eCFRpdMAfEIkgAC4CLxcPaWIucLlER0JY46vmSvWUr+yWL1TPonEedq3bw41xA8LRQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=solid-run.com; Received: from AS8PR04MB8963.eurprd04.prod.outlook.com (2603:10a6:20b:42e::18) by VI1PR04MB7119.eurprd04.prod.outlook.com (2603:10a6:800:12e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Thu, 10 Aug 2023 09:49:38 +0000 Received: from AS8PR04MB8963.eurprd04.prod.outlook.com ([fe80::c19e:3b5a:c081:ce3b]) by AS8PR04MB8963.eurprd04.prod.outlook.com ([fe80::c19e:3b5a:c081:ce3b%4]) with mapi id 15.20.6652.026; Thu, 10 Aug 2023 09:49:38 +0000 From: Josua Mayer <josua@solid-run.com> To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Josua Mayer <josua@solid-run.com>, Russell King <linux@armlinux.org.uk>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Subject: [PATCH] net: sfp: handle 100G/25G active optical cables in sfp_parse_support Date: Thu, 10 Aug 2023 11:48:17 +0200 Message-Id: <20230810094817.29262-1-josua@solid-run.com> X-Mailer: git-send-email 2.35.3 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: ZR2P278CA0079.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:65::18) To AS8PR04MB8963.eurprd04.prod.outlook.com (2603:10a6:20b:42e::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8963:EE_|VI1PR04MB7119:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d93a0af-83d2-4676-5358-08db99871c65 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GJKiZWxAROZfqnncZ7S9KeeHyihqnsHmwE5q0DD/2A878YlezunfoQnLyPMfViAdb1fjqJUeSlWXC6onTLV87Tg0f6w7ML02gzrlRvsP6//zvCTBI59wUlLx0qhOikk4E4iV8cz7DHfa+v22Wzrn6GAoEN30BQRfBsHmf5traO4s7/C+Pg4qMij9/IpuTv8ZECMu54AEerelu31YyASa1brjaR0kmJHAVeEcBejZL8B28I82aAI5oshzc0Cej0y8jm4vorv8JymGe8yPx8VNKRk2TSgLn8XOabJwtwA58u0roQByaNNmr9rhKm/t2GGeYYWOMn3XEVWIXFdmMUPmIcB400R46vU6M6gb7tBosaqUPHTpWRQInDVg8HKKjzUUL84837jX2yKbOEoJoAZpJ5zhJNHKT6sN24qO1RWUtLnISWUbZA49vsc1wKH4Jm5MHObLa8lyhI4JT4RfE2Z/O+XIvBGcV1flzA5cDbXxKPiCO7i+GZIkrPieD0saxu4uv1twHKAWp24PyrqPUPY8nMGe5iqcrfEZm3ODQwAK9mDfm7+wts8fG/Kj+R6Znd89xD61W2cGcyuIOWbkkRDcnFEffa/zYP3lJhNKesKP7mlWD/yXgUHF/JKJeBih9i7/ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8963.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(366004)(396003)(136003)(346002)(39830400003)(376002)(1800799006)(186006)(451199021)(66946007)(66556008)(36756003)(41300700001)(66476007)(2616005)(5660300002)(54906003)(6486002)(52116002)(478600001)(6666004)(8676002)(6512007)(8936002)(316002)(2906002)(86362001)(26005)(38100700002)(38350700002)(4326008)(6506007)(1076003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Vdfse0efv/mhVvC8oJBzjDhXR+rsFPrnGwymQbIrP7gNPIWZMLpa3dYEvu6a2hXyeoNyrxIZYC8LUrWBtu9x8LboBdCrzdWyn4yurcpmhACQzi47X/PYxGlvAtw84m1d6OY6HyqZYZMu3XuSb9O/hagcwZzkaELN77wW6LiZNp7rG/3DRrn73SHa7xFZnnx1mRxDQs7Ply64/BJUNM76Bh2dRlNCkLxtZeyu+RV1uc6AUxM62YF9nfJ2J0EymFjxcT5yyjr4faLyhxVozEtQghlpxEFy1LuW8n206K2gofYBTHc3SOBOZbs8Cq4aW5cimJ6/O5imSElr2BVuPCxrIKSA53bg38rQLY2HsKXAp4wnwR3SvXFvSvBBCiT/HykCAy1ru7SV+2Oqo2cce/02srmUahOKEJkHyyMlW0OYFEh0uh54fUoEXYUsytsqqfzVotlFcggVepO6cDsZCNsvjiaQjF/1J8VnKpUv95Ks5UnpBo4AdmM5x6NgDaD4jU3Kr84+Lw+dSA2+3D2wtaKY12eraMgeU7EW+890Vlhq2YzmUHrEso2jAJ6MsaYcl9O3nxjDVVEIevSX6ubxEzREnCX4YBhoM2hC0QQpWvGyHRMDPGn8cvn4cP3rujoCTIOxiSbHJMq9czmlciamS4FxfugcER6wwEu3NWGQY/5XeIC6eyBCIabGaxX2Bxw2Ch6IJyI52/39ARxJPaxsC0jqtdewHua159df7OAMgceb/N2nCpVX3nNfpauNwdZpprHHDkzH4zZvCup8ZKMtxlfN1O9I5NXwSYpMjVQBumZ3sp6uaDnLbt5VngDnP/CQpET9SmEC9TVkE3gQp7WMlBqpiJUTtHXfyox7aA062NMxZ3rL0uv1IKrjWY7ThM1+MKOkD0FnDBqfmTHL8bqcIh+tdcX1yFi8M5P8OA+rrsOTUPgkdazSTfLxOQOVVGlcKrQWrGo0jehLsz71jRQLuKxa8/kru6ti+aSEG3gHrgSdEu6EB+8MkUNanVJ2nKAb9dfDM9S8SS8qM7pozUJRU/gYmMvYjMfD7tQ3IzDhJETiGgIRSWF2azTTQC6A6lVXxFXloN0GcwaNm28LT2p2fwyFzAhXolhs4VnGdX6YOKG7hOL7Ac3VsGfdNXsIxbQqgQ9mDT2mAx4orKfoT/OX+Wjxdx72SuqPOyptOJY/C3Wp7Y8qKNRzNkbkEyF5eNZvQXs3FpxxawtPcJP6V0VtowPJhHxnrxjs5CehSGABHRu5/vCrH9UPred5yyL8Yk7rwnsRtHuUDjbW/zlaWi7olaqOx394GT1ir5D1CQEvsaStEwrO5bq5cFNTX+2Bz75cs/8VHWBSxPVtJ6AgGVhTy8nv4GAgJKMTFjCiR4AFVWxStrTayfXGmGjQcl9LmQiyeCcy9YdQRp27zp9p2n+dwSOLByd1RkclGTV9+ZlIdGWpE/uTNus2j0aqqoM/XMLLmrgFDZ/chcJ3SHgeSCR5mX4MtAw+l6vRqg5rs+AyRARrKHfQye7TYqPBP5YcQORAgh7WGg6egU6GsUACehyQYb5X74hGWHCH0wpRFfMFW+YqpVMfoAUFvUPplBu3XPLe7zrS X-OriginatorOrg: solid-run.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d93a0af-83d2-4676-5358-08db99871c65 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8963.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2023 09:49:38.2045 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a4a8aaf3-fd27-4e27-add2-604707ce5b82 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tdnkJsOI+Q12Evi3/z18w86kKWjIieJzCeGaoOLSwFCOiEgJWHeykj2pl7G94E11NwcZj7mtFHmcBDR0Azxe0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7119 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773840391353105930 X-GMAIL-MSGID: 1773840391353105930 |
Series |
net: sfp: handle 100G/25G active optical cables in sfp_parse_support
|
|
Commit Message
Josua Mayer
Aug. 10, 2023, 9:48 a.m. UTC
Handle extended compliance code 0x1 (SFF8024_ECC_100G_25GAUI_C2M_AOC)
for active optical cables supporting 25G and 100G speeds.
Since the specification makes no statement about transmitter range, and
as the specific sfp module that had been tested features only 2m fiber -
short-range (SR) modes are selected.
sfp_parse_support already handles SFF8024_ECC_100GBASE_SR4_25GBASE_SR
with compatible properties: 100000baseSR4; 25000baseSR; protocol 25gbase-r.
Add SFF8024_ECC_100G_25GAUI_C2M_AOC to the same case.
Tested with fs.com S28-AO02 AOC SFP28 module.
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
drivers/net/phy/sfp-bus.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Thu, Aug 10, 2023 at 11:48:17AM +0200, Josua Mayer wrote: > Handle extended compliance code 0x1 (SFF8024_ECC_100G_25GAUI_C2M_AOC) > for active optical cables supporting 25G and 100G speeds. > > Since the specification makes no statement about transmitter range, and > as the specific sfp module that had been tested features only 2m fiber - > short-range (SR) modes are selected. > > sfp_parse_support already handles SFF8024_ECC_100GBASE_SR4_25GBASE_SR > with compatible properties: 100000baseSR4; 25000baseSR; protocol 25gbase-r. > Add SFF8024_ECC_100G_25GAUI_C2M_AOC to the same case. > > Tested with fs.com S28-AO02 AOC SFP28 module. > > Signed-off-by: Josua Mayer <josua@solid-run.com> Thanks. I think I would like one extra change: > + case SFF8024_ECC_100G_25GAUI_C2M_AOC: > case SFF8024_ECC_100GBASE_SR4_25GBASE_SR: > phylink_set(modes, 100000baseSR4_Full); Since SFPs are single lane, SR4 doesn't make sense (which requires four lanes), and I shouldn't have added it when adding these modes. It would be a good idea to drop that, or at least for the addition of the SFF8024_ECC_100G_25GAUI_C2M_AOC case.
Hi Russell, Am 10.08.23 um 12:39 schrieb Russell King (Oracle): > On Thu, Aug 10, 2023 at 11:48:17AM +0200, Josua Mayer wrote: >> Handle extended compliance code 0x1 (SFF8024_ECC_100G_25GAUI_C2M_AOC) >> for active optical cables supporting 25G and 100G speeds. > Thanks. I think I would like one extra change: > >> + case SFF8024_ECC_100G_25GAUI_C2M_AOC: >> case SFF8024_ECC_100GBASE_SR4_25GBASE_SR: >> phylink_set(modes, 100000baseSR4_Full); > Since SFPs are single lane, SR4 doesn't make sense (which requires > four lanes), and I shouldn't have added it when adding these modes. > It would be a good idea to drop that, or at least for the > addition of the SFF8024_ECC_100G_25GAUI_C2M_AOC case. > Would it be okay changing 100000baseSR4 to 100000baseSR dropping the "4"? - Josua Mayer
On Thu, Aug 10, 2023 at 01:38:13PM +0200, Josua Mayer wrote: > Hi Russell, > > Am 10.08.23 um 12:39 schrieb Russell King (Oracle): > > On Thu, Aug 10, 2023 at 11:48:17AM +0200, Josua Mayer wrote: > > > Handle extended compliance code 0x1 (SFF8024_ECC_100G_25GAUI_C2M_AOC) > > > for active optical cables supporting 25G and 100G speeds. > > Thanks. I think I would like one extra change: > > > > > + case SFF8024_ECC_100G_25GAUI_C2M_AOC: > > > case SFF8024_ECC_100GBASE_SR4_25GBASE_SR: > > > phylink_set(modes, 100000baseSR4_Full); > > Since SFPs are single lane, SR4 doesn't make sense (which requires > > four lanes), and I shouldn't have added it when adding these modes. > > It would be a good idea to drop that, or at least for the > > addition of the SFF8024_ECC_100G_25GAUI_C2M_AOC case. > > > Would it be okay changing 100000baseSR4 to 100000baseSR dropping the "4"? Not for SFF8024_ECC_100GBASE_SR4_25GBASE_SR. SFF-8024 states for this code: 02h 100GBASE-SR4 or 25GBASE-SR 100GBASE-SR4: IEEE 802.3 Physical Layer specification for 100 Gb/s using 100GBASE-R encoding over four lanes of multimode fiber, with reach up to at least 100 m. (See IEEE Std 802.3, Clause 95.) 100GBASE-R encoding: The physical coding sublayer encoding defined in Clause 82 for 100 Gb/s operation. (See IEEE Std 802.3, Clause 82.) 25GBASE-SR: IEEE 802.3 Physical Layer specification for 25 Gb/s using 25GBASE-R encoding over multimode fiber. (See IEEE Std 802.3, Clause 112.) IEEE 802.3-2018 doesn't define 100GBASE-SR, so I assume that's a later development, which would be 100GBASE-R encoding over one lane of fiber. So, 100GBASE-SR and 100GBASE-SR4 are not equivalent, and since SFF8024_ECC_100GBASE_SR4_25GBASE_SR specifies 100GBASE-SR4, that being _four_ lanes of fiber, and SFP form-factor modules only being capable of carrying a single lane, and sfp-bus.c only being for SFP modules, 100GBASE-SR4 is just not relevant for our purposes in sfp-bus.c - and it makes no sense to switch to 100GBASE-SR because that is not what this code tells us. For the SFF8024_ECC_100G_25GAUI_C2M_AOC in a SFP28 module, the SFP28 form factor only supports up to 28Gb/s, so that means the module is definitely 25GBASE-R ethernet. So that also excludes 100G operation. So, until we see a module in the SFP form factor (implying a single lane) that does operate at 100G speeds, I think we should omit it. I'm also wondering whether we should check br_nom/br_max/br_min now, so that if we have to check that in the future, we don't start causing regressions. Knowing how module EEPROMs are randomly wrong, it would be a good idea to start with something sensible and see whether any fail. Bear in mind that br_nom doesn't always get set to the correct value - for example, 1G operates at 1250Mbps, and the SFP MSA specifies that br_nom should be 1300 for 1G ethernet, but some modules use 1200. I guess start at the correct value and then adjust to allow a range as we see more modules.
On Mon, Aug 14, 2023 at 02:12:22PM +0200, Josua Mayer wrote: > Hi Russell, > > Am 10.08.23 um 14:05 schrieb Russell King (Oracle): > > On Thu, Aug 10, 2023 at 01:38:13PM +0200, Josua Mayer wrote: > > > Hi Russell, > > > > > > Am 10.08.23 um 12:39 schrieb Russell King (Oracle): > > > > On Thu, Aug 10, 2023 at 11:48:17AM +0200, Josua Mayer wrote: > > > > > Handle extended compliance code 0x1 (SFF8024_ECC_100G_25GAUI_C2M_AOC) > > > > > for active optical cables supporting 25G and 100G speeds. > > > > Thanks. I think I would like one extra change: > > > > > > > > > + case SFF8024_ECC_100G_25GAUI_C2M_AOC: > > > > > case SFF8024_ECC_100GBASE_SR4_25GBASE_SR: > > > > > phylink_set(modes, 100000baseSR4_Full); > > > > Since SFPs are single lane, SR4 doesn't make sense (which requires > > > > four lanes), and I shouldn't have added it when adding these modes. > > > > It would be a good idea to drop that, or at least for the > > > > addition of the SFF8024_ECC_100G_25GAUI_C2M_AOC case. > > > > > > > Would it be okay changing 100000baseSR4 to 100000baseSR dropping the "4"? > > Not for SFF8024_ECC_100GBASE_SR4_25GBASE_SR. SFF-8024 states for this > > code: > > > > 02h 100GBASE-SR4 or 25GBASE-SR > > > > 100GBASE-SR4: IEEE 802.3 Physical Layer specification for 100 Gb/s using > > 100GBASE-R encoding over four lanes of multimode fiber, with reach > > up to at least 100 m. (See IEEE Std 802.3, Clause 95.) > > > > 100GBASE-R encoding: The physical coding sublayer encoding defined in > > Clause 82 for 100 Gb/s operation. (See IEEE Std 802.3, Clause 82.) > > > > 25GBASE-SR: IEEE 802.3 Physical Layer specification for 25 Gb/s using > > 25GBASE-R encoding over multimode fiber. (See IEEE Std 802.3, Clause 112.) > > > > IEEE 802.3-2018 doesn't define 100GBASE-SR, so I assume that's a later > > development, which would be 100GBASE-R encoding over one lane of fiber. > > > > So, 100GBASE-SR and 100GBASE-SR4 are not equivalent, and since > > SFF8024_ECC_100GBASE_SR4_25GBASE_SR specifies 100GBASE-SR4, that > > being _four_ lanes of fiber, and SFP form-factor modules only being > > capable of carrying a single lane, and sfp-bus.c only being for SFP > > modules, 100GBASE-SR4 is just not relevant for our purposes in > > sfp-bus.c - and it makes no sense to switch to 100GBASE-SR because > > that is not what this code tells us. > > > > > > For the SFF8024_ECC_100G_25GAUI_C2M_AOC in a SFP28 module, the SFP28 > > form factor only supports up to 28Gb/s, so that means the module is > > definitely 25GBASE-R ethernet. So that also excludes 100G operation. > Okay. So probably the simple correct solution is to make a seperate > case SFF8024_ECC_100G_25GAUI_C2M_AO that only sets 25gbase-r, and > 25000baseSR_Full. > > > > So, until we see a module in the SFP form factor (implying a single > > lane) that does operate at 100G speeds, I think we should omit it. > > > > I'm also wondering whether we should check br_nom/br_max/br_min now, > > so that if we have to check that in the future, we don't start causing > > regressions. Knowing how module EEPROMs are randomly wrong, it would > > be a good idea to start with something sensible and see whether any > > fail. Bear in mind that br_nom doesn't always get set to the correct > > value - for example, 1G operates at 1250Mbps, and the SFP MSA specifies > > that br_nom should be 1300 for 1G ethernet, but some modules use 1200. > > I guess start at the correct value and then adjust to allow a range > > as we see more modules. > I don't fully understand how you would like to use br_nom. > I see e.g. in sfp-bus.c at the end of sfp_parse_support a mapping of bitrate > to 1000/2500 baseX modes. > Are you referring to this section? > > However there are no baseX modes for 25Gbps in ethtool.h - only SR/KR/CR. I'm thinking something like: case SFF8024_ECC_100G_25GAUI_C2M_AO: if (br_min <= 28000 && br_max >= 25000) { /* 25GBASE-R, possibly with FEC */ __set_bit(PHY_INTERFACE_MODE_25GBASER, interfaces); /* Re-use 25000baseSR as there is no 25Gbase- suffix * for this */ phylink_set(modes, 25000baseSR_Full); } break; I don't know what the actual numerical values should be though.
diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c index e8dd47bffe43..db26e1d8a10d 100644 --- a/drivers/net/phy/sfp-bus.c +++ b/drivers/net/phy/sfp-bus.c @@ -258,6 +258,7 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id, switch (id->base.extended_cc) { case SFF8024_ECC_UNSPEC: break; + case SFF8024_ECC_100G_25GAUI_C2M_AOC: case SFF8024_ECC_100GBASE_SR4_25GBASE_SR: phylink_set(modes, 100000baseSR4_Full); phylink_set(modes, 25000baseSR_Full);