Re: [PATCH net-next v5 06/12] net: pse-pd: Add support for budget evaluation strategies

Oleksij Rempel
2025-03-01T13:01:14Z

On Thu, Feb 27, 2025 at 07:26:40PM +0100, Kory Maincent wrote:
> On Thu, 27 Feb 2025 17:40:42 +0100
> Oleksij Rempel <o.rempel@pengutronix.de> wrote:
>
> > On Thu, Feb 27, 2025 at 03:57:27PM +0100, Kory Maincent wrote:
> > > On Thu, 27 Feb 2025 08:40:25 +0100
> > > Oleksij Rempel <o.rempel@pengutronix.de> wrote:
> > >
> > > > On Wed, Feb 26, 2025 at 06:42:57PM -0800, Jakub Kicinski wrote:
> > [...]
> > [...]
> > [...]
> > > >
> > > > Ok, I see. @Köry, can you please provide regulator_summary with some
> > > > inlined comments to regulators related to the PSE components and PSE
> > > > related outputs of ethtool (or what ever tool you are using).
> > > >
> > > > I wont to use this examples to answer.
> > >
> > > On my side, I am not close to using sysfs. As we do all configurations
> > > through ethtool I have assumed we should continue with ethtool.
> >
> > Yes, I agree. But it won't be possible to do it for all components.
> >
> > > I think we should set the port priority through ethtool.
> >
> > ack
> >
> > > but indeed the PSE power domain method get and set could be moved to
> > > sysfs as it is not something relative to the port but to a group of
> > > ports.
> >
> > I would prefer to have it in the for of devlink or use regulator netlink
> > interface. But, we do not need to do this discussion right now.
>
> If we want to report the method we should discuss it now. We shouldn't add
> BUDGET_EVAL_STRAT uAPI to ethtool if we use another way to get and set the
> method later.

Ok, I assume we are talking about different things. I mean - not port
specific configurations and diagnostic, will have different interface.

BUDGET_EVAL_STRAT is port specific. HP and Cisco implement it as port
specific. PD692x0 Protocol manual describe it as port specific too:
3.3.6 Set BT Port Parameters
Bits [3..0]—BT port PM mode
0x0: The port power that is used for power management purposes is
dynamic (Iport x Vmain).
0x1: The port power that is used for power management purposes is port
TPPL_BT.
0x2: The port power that is used for power management purposes is
dynamic for non LLDP/CDP/Autoclass ports and TPPL_BT for LLDP/CDP/Autoclass ports.
0xF: Do not change settings.

> We could also not report the method for now and assume the user knows it for
> the two controllers currently supported.

On one side: it is not just status, but also active configuration. By
implementing the interface we may break default configuration and user
expectations.

On other side: PD692x0 seems to need more then just setting prios to
manage them correctly. For example power bank limits should be set,
otherwise internal firmware won't be able to perform budget calculations.

So, I assume, critical components are missing anyway.

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |