Re: [PATCH net-next v5 02/12] net: pse-pd: Add support for reporting events

From: Kory Maincent
Date: Mon Feb 24 2025 - 07:40:36 EST


Hello Jakub,

On Thu, 20 Feb 2025 16:42:01 -0800
Jakub Kicinski <kuba@xxxxxxxxxx> wrote:

> On Tue, 18 Feb 2025 17:19:06 +0100 Kory Maincent wrote:
> > From: Kory Maincent (Dent Project) <kory.maincent@xxxxxxxxxxx>
> >
> > Add support for devm_pse_irq_helper() to register PSE interrupts. This aims
> > to report events such as over-current or over-temperature conditions
> > similarly to how the regulator API handles them but using a specific PSE
> > ethtool netlink socket.
>
> I think you should CC HWMON ML on this.
> Avoid any surprises.

You mean regulator maintainers right?

> > diff --git a/Documentation/netlink/specs/ethtool.yaml
> > b/Documentation/netlink/specs/ethtool.yaml index 655d8d10fe24..da78c5daf537
> > 100644 --- a/Documentation/netlink/specs/ethtool.yaml
> > +++ b/Documentation/netlink/specs/ethtool.yaml
> > @@ -1526,6 +1526,22 @@ attribute-sets:
> > name: hwtstamp-flags
> > type: nest
> > nested-attributes: bitset
> > + -
> > + name: pse-ntf
> > + attr-cnt-name: __ethtool-a-pse-ntf-cnt
> > + attributes:
> > + -
> > + name: unspec
> > + type: unused
> > + value: 0
>
> Please don't add the unused entries unless your code actually needs
> them. YNL will id real ones from 1 anyway.

ok.

> > + -
> > + name: header
> > + type: nest
> > + nested-attributes: header
> > + -
> > + name: events
> > + type: nest
> > + nested-attributes: bitset
>
> Do we really need a bitset here? Much more manual work to make a bitset
> than just a uint + enum with the bits. enum is much easier to use with
> YNL based user space, and it's more self-documenting than a list of bits
> buried in the source of the kernel.

Ok will change it in next version.

> > operations:
> > enum-model: directional
> > @@ -2382,3 +2398,13 @@ operations:
> > attributes: *tsconfig
> > reply:
> > attributes: *tsconfig
> > + -
> > + name: pse-ntf
> > + doc: Notification for pse events.
>
> s/pse/PSE/

Oh thanks!

Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com