Subject: Re: [PATCH net-next 01/12] ethtool: add infrastructure for centralized checking of coalescing parameters

From: Andrew Lunn <[email-masked]>
Date: Wed, 4 Mar 2020 16:22:49 +0100

On Wed, Mar 04, 2020 at 04:19:58PM +0100, Michal Kubecek wrote:
> On Wed, Mar 04, 2020 at 03:54:39PM +0100, Andrew Lunn wrote:
> > On Tue, Mar 03, 2020 at 07:54:50PM -0800, Jakub Kicinski wrote:
> > > @@ -2336,6 +2394,11 @@ ethtool_set_per_queue_coalesce(struct net_device *dev,
> > >  			goto roll_back;
> > >  		}
> > >  
> > > +		if (!ethtool_set_coalesce_supported(dev, &coalesce)) {
> > > +			ret = -EINVAL;
> > > +			goto roll_back;
> > > +		}
> > 
> > Hi Jakub
> > 
> > EOPNOTSUPP? 
> 
> Out of the 11 drivers patched in the rest of the series, 4 used
> EOPNOTSUPP, 3 EINVAL and 4 just ignored unsupported parameters so there
> doesn't seem to be a clear consensus. Personally I find EOPNOTSUPP more
> appropriate but it's quite common that drivers return EINVAL for
> parameters they don't understand or support.

Hi Michel

Yes, as i looked through the later patches, it became clear there is
no consensus. I personally prefer EOPNOTSUPP, but don't care too much.

   Andrew