[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200304101110.1272454d@kicinski-fedora-PC1C0HJN>
Date: Wed, 4 Mar 2020 10:11:10 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Michal Kubecek <mkubecek@...e.cz>, netdev@...r.kernel.org,
davem@...emloft.net, thomas.lendacky@....com, benve@...co.com,
_govind@....com, pkaustub@...co.com, peppe.cavallaro@...com,
alexandre.torgue@...com, joabreu@...opsys.com, snelson@...sando.io,
yisen.zhuang@...wei.com, salil.mehta@...wei.com,
jeffrey.t.kirsher@...el.com, jacob.e.keller@...el.com,
alexander.h.duyck@...ux.intel.com, michael.chan@...adcom.com,
saeedm@...lanox.com, leon@...nel.org
Subject: Re: [PATCH net-next 01/12] ethtool: add infrastructure for
centralized checking of coalescing parameters
On Wed, 4 Mar 2020 16:22:49 +0100 Andrew Lunn wrote:
> 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.
Yeah, looking through the entire tree the tally seems to be:
EOPNOTSUPP 9
EINVAL 7
ENOTSUPP 2
I think EINVAL is traditionally the black box "can't do" for the stack.
But also - no strong feelings, I can switch to EOPNOTSUPP in v3.
Powered by blists - more mailing lists