From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
thomas.petazzoni@bootlin.com, "Jakub Kicinski" <kuba@kernel.org>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Russell King" <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Herve Codina" <herve.codina@bootlin.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Vladimir Oltean" <vladimir.oltean@nxp.com>,
"Köry Maincent" <kory.maincent@bootlin.com>,
"Marek Behún" <kabel@kernel.org>,
"Oleksij Rempel" <o.rempel@pengutronix.de>,
"Nicolò Veronese" <nicveronese@gmail.com>,
"Simon Horman" <horms@kernel.org>,
mwojtas@chromium.org, "Antoine Tenart" <atenart@kernel.org>,
devicetree@vger.kernel.org, "Conor Dooley" <conor+dt@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Romain Gantois" <romain.gantois@bootlin.com>,
"Daniel Golle" <daniel@makrotopia.org>,
"Dimitri Fedrau" <dimitri.fedrau@liebherr.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>
Subject: Re: [PATCH net-next v14 03/16] net: ethtool: Introduce ETHTOOL_LINK_MEDIUM_* values
Date: Thu, 23 Oct 2025 09:43:23 +0200 [thread overview]
Message-ID: <d798cbb4-74f8-47fd-98e8-0d6d6e9f8621@bootlin.com> (raw)
In-Reply-To: <cb217bf8-763e-4c48-9233-e577b32b14a8@lunn.ch>
Hi Andrew,
On 22/10/2025 23:42, Andrew Lunn wrote:
> On Mon, Oct 13, 2025 at 04:31:29PM +0200, Maxime Chevallier wrote:
>> In an effort to have a better representation of Ethernet ports,
>> introduce enumeration values representing the various ethernet Mediums.
>>
>> This is part of the 802.3 naming convention, for example :
>>
>> 1000 Base T 4
>> | | | |
>> | | | \_ lanes (4)
>> | | \___ Medium (T == Twisted Copper Pairs)
>> | \_______ Baseband transmission
>> \____________ Speed
>
> Dumb question. Does 802.3 actually use the word lanes here?
Depending on the mode, 802.3 uses either "pair" or "lane" :
1.4.13 1000BASE-T: IEEE 802.3 Physical Layer specification for a
1000 Mb/s CSMA/CD LAN using four pairs of Category 5 balanced
copper cabling.
1.4.26 100GBASE-CR2: IEEE 802.3 Physical Layer specification for
100 Gb/s using 100GBASE-R encoding over two lanes of shielded
balanced copper cabling.
> I'm looking at the commit which added lanes:
>
> commit 012ce4dd3102a0f4d80167de343e9d44b257c1b8
>
> Add 'ETHTOOL_A_LINKMODES_LANES' attribute and expand 'struct
> ethtool_link_settings' with lanes field in order to implement a new
> lanes-selector that will enable the user to advertise a specific number
> of lanes as well.
>
> $ ethtool -s swp1 lanes 4
> $ ethtool swp1
> Settings for swp1:
> Supported ports: [ FIBRE ]
> Supported link modes: 1000baseKX/Full
> 10000baseKR/Full
> 40000baseCR4/Full
> 40000baseSR4/Full
> 40000baseLR4/Full
> 25000baseCR/Full
> 25000baseSR/Full
> 50000baseCR2/Full
> 100000baseSR4/Full
> 100000baseCR4/Full
> Supported pause frame use: Symmetric Receive-only
> Supports auto-negotiation: Yes
> Supported FEC modes: Not reported
> Advertised link modes: 40000baseCR4/Full
> 40000baseSR4/Full
> 40000baseLR4/Full
> 100000baseSR4/Full
> 100000baseCR4/Full
>
>
> For these link modes we are talking about 4 PCS outputs feeding an
> SFP module. The module when has one fibre pair, the media.
>
> For baseT4 what you call a lane is a twisted pair, the media.
>
> These two definitions seem to contradict each other.
>
> For SGMII, 1000BaseX, we have 1 PCS lane, feeding a PHY with 4 pairs.
>
> It gets more confusing at 10G, where the MAC might have 4 lanes
> feeding 4 pairs, or 1 lane feeding 4 pairs.
>
> Also, looking at the example above, if i have a MAC/PHY combination
> which can do 10/100/1G and i did:
>
> $ ethtool -s swp1 lanes 2
>
> would it then only advertise 10 and 100, since 1G need four 'lanes'?
Ah right ! Yeah so lanes isn't about the MDI directly then, so
clearly this won't work :(
>
> Is reusing lanes going to cause us problems in the future, and maybe
> we should add a pairs member, to represent the media? And we can
> ignore bidi fibre modules for the moment :-)
That's a very good point, I think this makes more sense. I've also
seen the word "channel" around, but Pair would be more explicit.
thanks for the feedback !
Maxime
>
> Andrew
next prev parent reply other threads:[~2025-10-23 7:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 14:31 [PATCH net-next v14 00/16] net: phy: Introduce PHY ports representation Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 01/16] dt-bindings: net: Introduce the ethernet-connector description Maxime Chevallier
2025-10-30 12:13 ` Maxime Chevallier
2025-10-30 13:23 ` Andrew Lunn
2025-10-30 14:50 ` Maxime Chevallier
2025-10-30 15:01 ` Andrew Lunn
2025-10-30 15:12 ` Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 02/16] net: ethtool: common: Indicate that BaseT works on up to 4 lanes Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 03/16] net: ethtool: Introduce ETHTOOL_LINK_MEDIUM_* values Maxime Chevallier
2025-10-22 21:42 ` Andrew Lunn
2025-10-23 7:43 ` Maxime Chevallier [this message]
2025-10-13 14:31 ` [PATCH net-next v14 04/16] net: phy: Introduce PHY ports representation Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 05/16] net: phy: dp83822: Add support for phy_port representation Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 06/16] dt-bindings: net: dp83822: Deprecate ti,fiber-mode Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 07/16] net: phy: Create a phy_port for PHY-driven SFPs Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 08/16] net: phy: Introduce generic SFP handling for PHY drivers Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 09/16] net: phy: marvell-88x2222: Support SFP through phy_port interface Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 10/16] net: phy: marvell: " Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 11/16] net: phy: marvell10g: Support SFP through phy_port Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 12/16] net: phy: at803x: Support SFP through phy_port interface Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 13/16] net: phy: qca807x: " Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 14/16] net: phy: Only rely on phy_port for PHY-driven SFP Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 15/16] net: phy: dp83822: Add SFP support through the phy_port interface Maxime Chevallier
2025-10-13 14:31 ` [PATCH net-next v14 16/16] Documentation: networking: Document the phy_port infrastructure Maxime Chevallier
2025-10-21 1:52 ` [PATCH net-next v14 00/16] net: phy: Introduce PHY ports representation Jakub Kicinski
2025-10-21 8:09 ` Maxime Chevallier
2025-10-21 15:07 ` Maxime Chevallier
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=d798cbb4-74f8-47fd-98e8-0d6d6e9f8621@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=andrew@lunn.ch \
--cc=atenart@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dimitri.fedrau@liebherr.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=herve.codina@bootlin.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kabel@kernel.org \
--cc=kory.maincent@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mwojtas@chromium.org \
--cc=netdev@vger.kernel.org \
--cc=nicveronese@gmail.com \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=romain.gantois@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.oltean@nxp.com \
/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