Re: [PATCH net-next v2 4/8] net: ethtool: pse-pd: Expand pse commands with the PSE PoE interface

From: Köry Maincent
Date: Mon Dec 04 2023 - 10:28:37 EST


On Sun, 3 Dec 2023 19:45:18 +0100
Andrew Lunn <andrew@xxxxxxx> wrote:

> > @@ -143,6 +150,43 @@ ethnl_set_pse(struct ethnl_req_info *req_info, struct
> > genl_info *info) return -EOPNOTSUPP;
> > }
> >
> > + if (!tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL] &&
> > + !tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL])
> > + return 0;
>
> -EINVAL? Is there a real use case for not passing either of them?

No indeed.

> > +
> > + if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL] &&
> > + !(pse_get_types(phydev->psec) & PSE_PODL)) {
> > + NL_SET_ERR_MSG_ATTR(info->extack,
> > + tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL],
> > + "setting PSE PoDL admin control not
> > supported");
> > + return -EOPNOTSUPP;
> > + }
> > + if (tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL] &&
> > + !(pse_get_types(phydev->psec) & PSE_C33)) {
> > + NL_SET_ERR_MSG_ATTR(info->extack,
> > + tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL],
> > + "setting PSE PoE admin control not
> > supported");
>
> This probably should be C33, not PoE?
>
> I guess it depends on what the user space tools are using.

Yes, I have hesitated on replacing that one.
If you prefer c33 in the log, I will change it in next version

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