Re: [net-next PATCH v11 6/9] net: dsa: realtek: rtl8365mb: add VLAN support

From: Luiz Angelo Daros de Luca

Date: Fri Jun 05 2026 - 15:30:47 EST


> On Sun, 31 May 2026 23:53:21 -0300 Luiz Angelo Daros de Luca wrote:
> > +#define RTL_VLAN_ERR(msg) \
> > + do { \
> > + const char *__msg = (msg); \
> > + \
> > + if (extack) \
> > + NL_SET_ERR_MSG_FMT_MOD(extack, "%s", __msg); \
> > + dev_err(priv->dev, "%s", __msg); \
> > + } while (0)
>
> Please don't duplicate errors. The errors are either due to something
> being wrong / unsupported in the request in which case they should go
> via extack. Or they are unexpected system errors (IO errors, timeouts
> and such) in which case just return errno and print to the logs
> so that the admin has a permanent record.
>
> There's a tracepoint in NL_SET_ERR_MSG() if you want to sniff
> user errors.

Hi Jakub,

Apologies, I missed your review comment just before hitting send on
v12. I will spin a v13 shortly to address this.

You are entirely right. The macro was originally a crude way to
channel all errors into a single source for automated testing.
However, separating user validation (extack) from actual
hardware/system logs (dev_err) makes much more sense. I will remove
the macro and split the error paths properly in the next revision.

Thanks,

Regards,

Luiz