[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8da3ec2-0775-4d81-8867-4993325a1e6c@lunn.ch>
Date: Thu, 8 Jan 2026 17:53:29 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
thomas.petazzoni@...tlin.com, Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Russell King <linux@...linux.org.uk>,
linux-arm-kernel@...ts.infradead.org,
Christophe Leroy <christophe.leroy@...roup.eu>,
Herve Codina <herve.codina@...tlin.com>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Köry Maincent <kory.maincent@...tlin.com>,
Marek Behún <kabel@...nel.org>,
Oleksij Rempel <o.rempel@...gutronix.de>,
Nicolò Veronese <nicveronese@...il.com>,
Simon Horman <horms@...nel.org>, mwojtas@...omium.org,
Antoine Tenart <atenart@...nel.org>, devicetree@...r.kernel.org,
Conor Dooley <conor+dt@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Rob Herring <robh@...nel.org>,
Romain Gantois <romain.gantois@...tlin.com>,
Daniel Golle <daniel@...rotopia.org>,
Dimitri Fedrau <dimitri.fedrau@...bherr.com>,
Tariq Toukan <tariqt@...dia.com>
Subject: Re: [PATCH net-next v22 02/14] net: ethtool: Introduce
ETHTOOL_LINK_MEDIUM_* values
On Thu, Jan 08, 2026 at 09:00:27AM +0100, 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
> | | | |
> | | | \_ pairs (4)
> | | \___ Medium (T == Twisted Copper Pairs)
> | \_______ Baseband transmission
> \____________ Speed
>
> Other example :
>
> 10000 Base K X 4
> | | \_ lanes (4)
> | \___ encoding (BaseX is 8b/10b while BaseR is 66b/64b)
> \_____ Medium (K is backplane ethernet)
>
> In the case of representing a physical port, only the medium and number
> of pairs should be relevant. One exception would be 1000BaseX, which is
> currently also used as a medium in what appears to be any of 1000BaseSX,
> 1000BaseCX, 1000BaseLX, 1000BaseEX, 1000BaseBX10 and some other.
>
> This was reflected in the mediums associated with the 1000BaseX linkmode.
>
> These mediums are set in the net/ethtool/common.c lookup table that
> maintains a list of all linkmodes with their number of pairs, medium,
> encoding, speed and duplex.
>
> One notable exception to this is 100BaseT Ethernet. It emcompasses 100BaseTX,
> which is a 2-pairs protocol but also 100BaseT4, that will also work on 4-pairs
> cables. As we don't make a disctinction between these, the lookup table
> contains 2 sets of pair numbers, indicating the min number of pairs for a
> protocol to work and the "nominal" number of pairs as well.
>
> Another set of exceptions are linkmodes such 100000baseLR4_ER4, where
> the same link mode seems to represent 100GBaseLR4 and 100GBaseER4. The
> macro __DEFINE_LINK_MODE_PARAMS_MEDIUMS is here used to populate the
> .mediums bitfield with all appropriate mediums.
>
> Reviewed-by: Christophe Leroy <christophe.leroy@...roup.eu>
> Signed-off-by: Maxime Chevallier <maxime.chevallier@...tlin.com>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists