From: Baruch Siach <baruch@tkos.co.il>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>
Subject: Re: Get MAC supported link modes for SFP port
Date: Thu, 26 Nov 2020 18:01:35 +0200 [thread overview]
Message-ID: <87mtz4umxs.fsf@tarshish> (raw)
In-Reply-To: <20201126154716.GN2073444@lunn.ch>
Hi Andrew,
On Thu, Nov 26 2020, Andrew Lunn wrote:
> On Thu, Nov 26, 2020 at 05:37:22PM +0200, Baruch Siach wrote:
>> 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?
I would like to report the port supported data rates to the system
user. I need to tell whether 10Gbps SFP module are supported in that
port in a generic way. The driver has this information. It is necessary
to implement the validate callback in phylink_mac_ops. But I see no way
to read this information from userspace.
> 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.
I understand that. I probably need a higher level concept of data rate
supported.
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
next prev parent reply other threads:[~2020-11-26 16:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 15:37 Get MAC supported link modes for SFP port Baruch Siach
2020-11-26 15:45 ` Russell King - ARM Linux admin
2020-11-26 15:47 ` Andrew Lunn
2020-11-26 16:01 ` Baruch Siach [this message]
2020-11-26 16:13 ` Russell King - ARM Linux admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mtz4umxs.fsf@tarshish \
--to=baruch@tkos.co.il \
--cc=andrew@lunn.ch \
--cc=hkallweit1@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).