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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBA87C63697 for ; Thu, 26 Nov 2020 15:47:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A144621D40 for ; Thu, 26 Nov 2020 15:47:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391326AbgKZPrS (ORCPT ); Thu, 26 Nov 2020 10:47:18 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:51562 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730602AbgKZPrS (ORCPT ); Thu, 26 Nov 2020 10:47:18 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kiJUK-008zmR-GD; Thu, 26 Nov 2020 16:47:16 +0100 Date: Thu, 26 Nov 2020 16:47:16 +0100 From: Andrew Lunn To: Baruch Siach Cc: netdev@vger.kernel.org, Heiner Kallweit , Russell King Subject: Re: Get MAC supported link modes for SFP port Message-ID: <20201126154716.GN2073444@lunn.ch> References: <87pn40uo25.fsf@tarshish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pn40uo25.fsf@tarshish> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Nov 26, 2020 at 05:37:22PM +0200, Baruch Siach wrote: > Hi netdev list, > > I am trying to retrieve all MAC supported link modes > (ETHTOOL_LINK_MODE_*) for network interfaces with SFP port. The > 'supported' bit mask that ETHTOOL_GLINKSETTINGS provides in > link_mode_masks[] changes to match the SFP module that happens to be > plugged in. When no SFP module is plugged, the bit mask looks > meaningless. That sounds like it is doing the correct thing. > I understand that ETHTOOL_LINK_MODE_* bits are meant to describe PHY > level capabilities. So I would settle for a MAC level "supported rates" > list. What is your use cases? A MAC without some form a PHY, be it copper, fibre, or a faked fixed-link, is useless. You need the combination of what the MAC can do and what the PHY can do to have any meaning information. Andrew