Re: [PATCH net-next 11/14] net: pse-pd: Add support for PSE device index
From: Jakub Kicinski
Date: Wed Jan 08 2025 - 12:42:20 EST
On Wed, 8 Jan 2025 06:47:10 +0100 Oleksij Rempel wrote:
> On Tue, Jan 07, 2025 at 05:18:34PM -0800, Jakub Kicinski wrote:
> > On Sat, 04 Jan 2025 23:27:36 +0100 Kory Maincent wrote:
> > > From: Kory Maincent (Dent Project) <kory.maincent@xxxxxxxxxxx>
> > >
> > > Add support for a PSE device index to report the PSE controller index to
> > > the user through ethtool. This will be useful for future support of power
> > > domains and port priority management.
> >
> > Can you say more? How do the PSE controllers relate to netdevs?
> > ethtool is primarily driven by netdev / ifindex.
> > If you're starting to build your own object hierarchy you may be
> > better off with a separate genl family.
>
> I hope this schema may help to explain the topology:
>
> +--- netdev / ifindex 0
> +--- PSE power domain 0 --+--- netdev / ifindex 1
> | +--- netdev / ifindex 2
> PSE ctrl 0 -+
> | +--- netdev / ifindex 3
> +--- PSE power domain 1 --+--- netdev / ifindex 4
> +--- netdev / ifindex 5
>
> +--- netdev / ifindex 6
> +--- PSE power domain 2 --+--- netdev / ifindex 7
> | +--- netdev / ifindex 8
> PSE ctrl 1 -+
> | +--- netdev / ifindex 9
> +--- PSE power domain 3 --+--- netdev / ifindex 10
> +--- netdev / ifindex 11
>
> PSE device index is needed to find actually PSE controller related to
> specific netdev / ifindex.
Makes sense. So how does it end up looking in terms of APIs
and attributes? Will we need much more than power limits at
the domain and ctrl level?