From mboxrd@z Thu Jan 1 00:00:00 1970 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 CB6DDC4167B for ; Thu, 7 Dec 2023 17:22:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443339AbjLGRWK (ORCPT ); Thu, 7 Dec 2023 12:22:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443303AbjLGRWF (ORCPT ); Thu, 7 Dec 2023 12:22:05 -0500 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EB67FA; Thu, 7 Dec 2023 09:22:12 -0800 (PST) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rBI4Z-00048B-0E; Thu, 07 Dec 2023 17:22:04 +0000 Date: Thu, 7 Dec 2023 17:22:01 +0000 From: Daniel Golle To: Andrew Lunn Cc: Marek =?iso-8859-1?Q?Beh=FAn?= , Lee Jones , Pavel Machek , Jakub Kicinski , Christian Marangi , "David S. Miller" , Li Zetao , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: Re: [PATCH v3 1/2] leds: trigger: netdev: extend speeds up to 10G Message-ID: References: <99e7d3304c6bba7f4863a4a80764a869855f2085.1701143925.git.daniel@makrotopia.org> <20231207172923.62ce530e@dellmb> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 07, 2023 at 06:11:29PM +0100, Andrew Lunn wrote: > On Thu, Dec 07, 2023 at 05:29:23PM +0100, Marek Behún wrote: > > On Tue, 28 Nov 2023 04:00:10 +0000 > > Daniel Golle wrote: > > > > > Add 2.5G, 5G and 10G as available speeds to the netdev LED trigger. > > > > > > Signed-off-by: Daniel Golle > > > Reviewed-by: Andrew Lunn > > > > So what will happen when there are more speeds? Will we create a > > separate file for each speed? > > > > Will we have a separate sysfs file for 10, 100, 1000, 2500, 5000, > > 10000, 20000, 25000, 40000, 50000, 56000, 100000, 200000, 400000, > > 800000 ? Yes, why not? I also doubt we are doing to have 800GBit/s on RJ-45 copper any time soon. And speed-indication is generally only needed for media which supports more than one speed (ie. twisted copper pair). > > > > These are all speeds from include/uapi/linux/ethtool.h. > > > > Maybe we should have reused ethtool link mode bits, or something... > > That gets pretty ugly. The bits are not in any logical order, since > they just get appended onto the end as needed. > > > Also, the files should only be present if the requested speed is > > supported by the net device. So if 2500 mbps is not supported, there > > should no be link_2500. > > Yes, this would be nice. We have the information in the phy_setting > settings[] table in phy-core.c. I agree on that, it would be an additional patch though because that obviously goes beyond adding some more speeds.