netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro@mellanox.com>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Matan Barak <matanb@mellanox.com>,
	Or Gerlitz <ogerlitz@mellanox.com>, <netdev@vger.kernel.org>,
	<linux-rdma@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [patch v2] net/mlx5: missing error code in esw_create_offloads_fdb_table()
Date: Thu, 14 Jul 2016 08:56:37 +0300	[thread overview]
Message-ID: <20160714055637.GK10079@leon.nu> (raw)
In-Reply-To: <20160713175454.GF19657@obsidianresearch.com>

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

On Wed, Jul 13, 2016 at 11:54:54AM -0600, Jason Gunthorpe wrote:
> On Wed, Jul 13, 2016 at 02:48:44PM +0300, Dan Carpenter wrote:
> > We accidentally return success when we had intended to return an error
> > code.
> > 
> > Fixes: 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > v2: return -ENOTSUPP instead --EINVAL
> > 
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> > index 1842dfb..7d982cf 100644
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> > @@ -183,6 +183,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports)
> >  
> >  	root_ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_FDB);
> >  	if (!root_ns) {
> > +		err = -ENOTSUPP;
> 
> Did you mean ENOTSUP?
> 
> I thought ENOTSUPP was not to be used outside NFS, and isn't properly
> exported to userspace..
> 
> $ find /usr/include -name "*errno*" | xargs grep 524

I asked similar question [1] with different return value in reply
to this patch.

[1] http://marc.info/?l=linux-netdev&m=146843171508230&w=2

> 
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2016-07-14  7:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 10:08 [patch] net/mlx5: missing error code in esw_create_offloads_fdb_table() Dan Carpenter
2016-07-13 11:19 ` Matan Barak
2016-07-13 11:40   ` Or Gerlitz
2016-07-14 20:09     ` Leon Romanovsky
2016-07-13 11:29 ` Leon Romanovsky
2016-07-13 11:53 ` [patch v2] " Matan Barak
2016-07-13 13:04 ` Leon Romanovsky
     [not found]   ` <20160713130459.GF10079-2ukJVAZIZ/Y@public.gmane.org>
2016-07-13 13:17     ` Matan Barak
2016-07-13 17:54 ` Jason Gunthorpe
2016-07-14  5:56   ` Leon Romanovsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160714055637.GK10079@leon.nu \
    --to=leonro@mellanox.com \
    --cc=dan.carpenter@oracle.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=matanb@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).