[PATCH net v2 1/4] net: sparx5: defer VCAP debugfs creation until after netdev registration

Jakub Kicinski kuba at kernel.org
Fri May 8 16:22:13 PDT 2026


On Thu, 7 May 2026 20:47:14 +0200 Daniel Machon wrote:
> > On Wed, 6 May 2026 09:25:36 +0200 Daniel Machon wrote:  
> > > Move the debugfs setup into a new sparx5_debugfs() helper in
> > > sparx5_debugfs.c, invoked after sparx5_register_notifier_blocks()
> > > succeeds so the netdev names are finalized. sparx5_vcap_init() now
> > > only deals with VCAP state. The sparx5/ debugfs root is created in
> > > the new helper as well.  
> > 
> > netdev names are never final :( User can change them at any time.
> > The best practice is to name the debugfs file by some stable hw-related
> > property, bus, port number etc.  
> 
> Right, but they are finalized in the sense that we have a name we can use for the
> debugfs files (which we dont pre-patch).
> 
> Hmm. I think this patch fixes an actual issue, where you cannot query the
> debugfs files, because a previous patch broke the ordering. I agree that the
> names chosen (netdev_name()) for the files were poor, but is that really a fix
> for this series? Should that not be adressed in a future patch for net-next (it
> involves changing an VCAP API function that is not only used by Sparx5/lan969x,
> but also lan966x.).

Dunno, if we are aiming to switch to a different naming scheme we can
just do it now, I reckon. It will not make the fix much longer.
And presumably it will alleviate the need to reshuffle the ordering.



More information about the linux-arm-kernel mailing list