On Mon, 29 Apr 2024 20:13:00 -0700, Jakub Kicinski <[email protected]> wrote:
> On Tue, 30 Apr 2024 09:59:39 +0800 Heng Qi wrote:
> > + if (moder[ETHTOOL_A_IRQ_MODERATION_USEC]) {
> > +   if (irq_moder->coal_flags & DIM_COALESCE_USEC)
> > +           new_profile[i].usec =
> > +                   nla_get_u32(moder[ETHTOOL_A_IRQ_MODERATION_USEC]);
> > +   else
> > +           return -EOPNOTSUPP;
> > + }
> 
> Almost, the extack should still be there on error:
> 
> + if (moder[ETHTOOL_A_IRQ_MODERATION_USEC])
> +     if (irq_moder->coal_flags & DIM_COALESCE_USEC) {
> +             new_profile[i].usec =
> +                     nla_get_u32(moder[ETHTOOL_A_IRQ_MODERATION_USEC]);
> +     } else {
> +             NL_SET_BAD_ATTR(extack, moder[ETHTOOL_A_IRQ_MODERATION_USEC]);
> +             return -EOPNOTSUPP;
> +     }
> 

Sure, thanks!

Reply via email to