lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250211130830.25dbafb3@fedora.home>
Date: Tue, 11 Feb 2025 13:08:30 +0100
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Kory Maincent <kory.maincent@...tlin.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
 thomas.petazzoni@...tlin.com, Andrew Lunn <andrew@...n.ch>, 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>, 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>, Rob Herring
 <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>
Subject: Re: [PATCH net-next RFC v2 2/6] net: ethtool: Introduce
 ETHTOOL_LINK_MEDIUM_* values

Hi Köry,

On Thu, 23 Jan 2025 10:35:34 +0100
Kory Maincent <kory.maincent@...tlin.com> wrote:

> On Wed, 22 Jan 2025 18:42:47 +0100
> Maxime Chevallier <maxime.chevallier@...tlin.com> 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
> > 
> >  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 lanes should be relevant. One exception would be 1000BaseX, which is
> > currently also used as a medium in what appears to be any of
> > 1000BaseSX, 1000BaseFX, 1000BaseCX and 1000BaseLX.  
> 
> 
> 
> > -	__DEFINE_LINK_MODE_PARAMS(100, T, Half),
> > -	__DEFINE_LINK_MODE_PARAMS(100, T, Full),
> > -	__DEFINE_LINK_MODE_PARAMS(1000, T, Half),
> > -	__DEFINE_LINK_MODE_PARAMS(1000, T, Full),
> > +	__DEFINE_LINK_MODE_PARAMS_LANES(10, T, 2, 4, Half, T),
> > +	__DEFINE_LINK_MODE_PARAMS_LANES(10, T, 2, 4, Full, T),
> > +	__DEFINE_LINK_MODE_PARAMS_LANES(100, T, 2, 4, Half, T),
> > +	__DEFINE_LINK_MODE_PARAMS_LANES(100, T, 2, 4, Full, T),  
> 
> 
> > -	__DEFINE_LINK_MODE_PARAMS(1000, KX, Full),
> > -	__DEFINE_LINK_MODE_PARAMS(10000, KX4, Full),
> > -	__DEFINE_LINK_MODE_PARAMS(10000, KR, Full),
> > +	__DEFINE_LINK_MODE_PARAMS(1000, KX, Full, K),
> > +	__DEFINE_LINK_MODE_PARAMS(10000, KX4, Full, K),
> > +	__DEFINE_LINK_MODE_PARAMS(10000, KR, Full, K),  
> 
> The medium information is used twice.
> Maybe we could redefine the __DEFINE_LINK_MODE_PARAMS like this to avoid
> redundant information:
> #define __DEFINE_LINK_MODE_PARAMS(_speed, _medium, _encoding, _lanes, _duplex)
> 
> And something like this when the lanes are not a fix number:
> #define __DEFINE_LINK_MODE_PARAMS_LANES_RANGE(_speed, _medium, _encoding,
> _min_lanes, _max_lanes, _duplex)
> 
> Then we can remove all the __LINK_MODE_LANES_XX defines which may be
> wrong as you have spotted in patch 1.

My apologies, I missed your review and didn't address it in the new
iteration :(

I will give this a try, see hw this looks, so that we can separate the
encoding info from the medium info.

Thanks !

Maxime

> Regards,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ