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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <24c4dfe9-ae3a-4126-b4ec-baac7754a669@linux.dev>
Date: Fri, 13 Jun 2025 12:06:23 -0400
From: Sean Anderson <sean.anderson@...ux.dev>
To: Daniel Golle <daniel@...rotopia.org>, netdev@...r.kernel.org,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S . Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Maxime Chevallier <maxime.chevallier@...tlin.com>,
 Russell King <linux@...linux.org.uk>,
 Vineeth Karumanchi <vineeth.karumanchi@....com>,
 Heiner Kallweit <hkallweit1@...il.com>, linux-kernel@...r.kernel.org,
 Kory Maincent <kory.maincent@...tlin.com>, Simon Horman <horms@...nel.org>,
 Christian Marangi <ansuelsmth@...il.com>, Lei Wei <quic_leiwei@...cinc.com>,
 Michal Simek <michal.simek@....com>,
 Radhey Shyam Pandey <radhey.shyam.pandey@....com>,
 Robert Hancock <robert.hancock@...ian.com>, John Crispin <john@...ozen.org>,
 Felix Fietkau <nbd@....name>, Robert Marko <robimarko@...il.com>
Subject: Re: [RFC] comparing the propesed implementation for standalone PCS
 drivers

On 6/13/25 08:55, Daniel Golle wrote:
> Hi netdev folks,
> 
> there are currently 2 competing implementations for the groundworks to
> support standalone PCS drivers.
> 
> https://patchwork.kernel.org/project/netdevbpf/list/?series=970582&state=%2A&archive=both
> 
> https://patchwork.kernel.org/project/netdevbpf/list/?series=961784&state=%2A&archive=both
> 
> They both kinda stalled due to a lack of feedback in the past 2 months
> since they have been published.
> 
> Merging the 2 implementation is not a viable option due to rather large
> architecture differences:
> 
> 				| Sean			| Ansuel
> --------------------------------+-----------------------+-----------------------
> Architecture			| Standalone subsystem	| Built into phylink
> Need OPs wrapped		| Yes			| No
> resource lifecycle		| New subsystem		| phylink
> Supports hot remove		| Yes			| Yes
> Supports hot add		| Yes (*)		| Yes
> provides generic select_pcs	| No			| Yes
> support for #pcs-cell-cells	| No			| Yes
> allows migrating legacy drivers	| Yes			| Yes
> comes with tested migrations	| Yes			| No
> 
> (*) requires MAC driver to also unload and subsequent re-probe for link
> to work again
> 
> Obviously both architectures have pros and cons, here an incomplete and
> certainly biased list (please help completing it and discussing all
> details):
> 
> Standalone Subsystem (Sean)
> 
> pros
> ====
>  * phylink code (mostly) untouched
>  * doesn't burden systems which don't use dedicated PCS drivers
>  * series provides tested migrations for all Ethernet drivers currently
>    using dedicated PCS drivers
> 
> cons
> ====
>  * needs wrapper for each PCS OP
>  * more complex resource management (malloc/free) 
>  * hot add and PCS showing up late (eg. due to deferred probe) are
>    problematic
>  * phylink is anyway the only user of that new subsystem

I mean, if you want I can move the whole thing to live in phylink.c, but
that just enlarges the kernel if PCSs are not being used. The reverse
criticism can be made for Ansuel's series: most phylink users do not
have "dynamic" PCSs but the code is imtimately integrated with phylink
anyway.

> 
> phylink-managed standalone PCS drivers (Ansuel)
> 
> pros
> ====
>  * trivial resource management

Actually, I would say the resource management is much more complex and
difficult to follow due to being spread out over many different
functions.

>  * no wrappers needed
>  * full support for hot-add and deferred probe
>  * avoids code duplication by providing generic select_pcs
>    implementation
>  * supports devices which provide more than one PCS port per device
>    ('#pcs-cell-cells')
> 
> cons
> ====
>  * inclusion in phylink means more (dead) code on platforms not using
>    dedicated PCS
>  * series does not provide migrations for existing drivers
>    (but that can be done after)
>  * probably a bit harder to review as one needs to know phylink very well
> 
> 
> It would be great if more people can take a look and help deciding the
> general direction to go.

I also encourage netdev maintainers to have a look; Russell does not
seem to have the time to review either system.

> There are many drivers awaiting merge which require such
> infrastructure (most are fine with either of the two), some for more
> than a year by now.

This is the major thing. PCS drivers should have been supported from the
start of phylink, and the longer there is no solution the more legacy
code there is to migrate.

--Sean

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ