* Get MAC supported link modes for SFP port
@ 2020-11-26 15:37 Baruch Siach
2020-11-26 15:45 ` Russell King - ARM Linux admin
2020-11-26 15:47 ` Andrew Lunn
0 siblings, 2 replies; 5+ messages in thread
From: Baruch Siach @ 2020-11-26 15:37 UTC (permalink / raw)
To: netdev; +Cc: Andrew Lunn, Heiner Kallweit, Russell King
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.
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.
Is there anything like that?
Thanks,
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get MAC supported link modes for SFP port
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
1 sibling, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux admin @ 2020-11-26 15:45 UTC (permalink / raw)
To: Baruch Siach; +Cc: netdev, Andrew Lunn, Heiner Kallweit
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.
>
> 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.
>
> Is there anything like that?
No, because there's a problem: the link modes that the MAC supports
is not a particularly certain thing. When there's no module inserted,
we don't know what interface mode may be in operation, and the
interface mode has a big handle in determining which link modes can
be supported.
For example, if it's operating as 1000BASE-X or 10GBASE-R, then we're
pretty limited to a single link mode if there's nothing else present.
If it's in SGMII, then 10/100/1000 speeds are possible but there's
no link mode to describe that - no PHY, therefore there's no copper
and therefore BASE-T is meaningless.
The ethtool link modes are, in reality, _media_ link modes. If there
is no media or socket that defines the media, there are no link modes.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get MAC supported link modes for SFP port
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
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2020-11-26 15:47 UTC (permalink / raw)
To: Baruch Siach; +Cc: netdev, Heiner Kallweit, Russell King
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get MAC supported link modes for SFP port
2020-11-26 15:47 ` Andrew Lunn
@ 2020-11-26 16:01 ` Baruch Siach
2020-11-26 16:13 ` Russell King - ARM Linux admin
0 siblings, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2020-11-26 16:01 UTC (permalink / raw)
To: Andrew Lunn; +Cc: netdev, Heiner Kallweit, Russell King
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 -
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Get MAC supported link modes for SFP port
2020-11-26 16:01 ` Baruch Siach
@ 2020-11-26 16:13 ` Russell King - ARM Linux admin
0 siblings, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux admin @ 2020-11-26 16:13 UTC (permalink / raw)
To: Baruch Siach; +Cc: Andrew Lunn, netdev, Heiner Kallweit
On Thu, Nov 26, 2020 at 06:01:35PM +0200, Baruch Siach wrote:
> 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.
If we want to know whether 10Gbps SFPs are supported in a cage, and
that information is important, we really ought to use a different
DT compatible for it. I've debated about using "sff,sfp+" since that's
what they are - but I have no use practical for it, so I've not made
the change.
This is especially important as there are boards out there
(Macchiatobin) where the SFP+ sockets do not support SFP modules
from the electrical point of view, and if you happen to plug in a
SFP module, you may end up with its EEPROM being corrupted merely
as a result of plugging the module in and the ID trying to be read.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-26 16:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2020-11-26 16:13 ` Russell King - ARM Linux admin
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).