netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Matan Barak <matanb@mellanox.com>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	Leon Romanovsky <leonro@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: Wed, 13 Jul 2016 11:54:54 -0600	[thread overview]
Message-ID: <20160713175454.GF19657@obsidianresearch.com> (raw)
In-Reply-To: <20160713100825.GD29468@mwanda>

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

Jason

  parent reply	other threads:[~2016-07-13 17:55 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 [this message]
2016-07-14  5:56   ` Leon Romanovsky

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=20160713175454.GF19657@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=leonro@mellanox.com \
    --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).