[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171101131406.2c1e61ed@cakuba.netronome.com>
Date: Wed, 1 Nov 2017 13:14:06 -0700
From: Jakub Kicinski <kubakici@...pl>
To: Felix Manlunas <felix.manlunas@...ium.com>,
Andrew Lunn <andrew@...n.ch>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
raghu.vatsavayi@...ium.com, derek.chickles@...ium.com,
satananda.burla@...ium.com, vijaya.guvva@...ium.com,
Or Gerlitz <gerlitz.or@...il.com>, michael.chan@...adcom.com,
Saeed Mahameed <saeedm@...lanox.com>
Subject: Re: [PATCH V3 net-next 1/2] liquidio: switchdev support for
LiquidIO NIC
On Wed, 1 Nov 2017 12:29:48 -0700, Felix Manlunas wrote:
> > > +lio_vf_rep_phys_port_name(struct net_device *dev,
> > > + char *buf, size_t len)
> > > +{
> > > + struct lio_vf_rep_desc *vf_rep = netdev_priv(dev);
> > > + struct octeon_device *oct = vf_rep->oct;
> > > + int ret;
> > > +
> > > + ret = snprintf(buf, len, "pf%dvf%d", oct->pf_num,
> > > + vf_rep->ifidx - oct->pf_num * 64 - 1);
> > > + if (ret >= len)
> > > + return -EOPNOTSUPP;
> >
> > EOPNOTSUPP seems an odd return code for too short a buffer?
>
> We will replace that with ENOBUFS in a future patch.
Strangely enough mlx5 and bnxt also use EOPNOTSUPP if string doesn't
fit. Others use EINVAL, IMHO that's more appropriate.
Powered by blists - more mailing lists