All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: matanb@mellanox.com, linux-rdma@vger.kernel.org
Subject: Re: [bug report] net/mlx4_core: Support more than 64 VFs
Date: Mon, 23 May 2022 15:18:30 +0300	[thread overview]
Message-ID: <Yot7loyr9xVwMHZR@unreal> (raw)
In-Reply-To: <YmLMmEOcUrTRjqvh@kili>

On Fri, Apr 22, 2022 at 06:41:12PM +0300, Dan Carpenter wrote:
> Hello Matan Barak,
> 
> The patch de966c592802: "net/mlx4_core: Support more than 64 VFs"
> from Nov 13, 2014, leads to the following Smatch static checker
> warning:
> 
> 	drivers/net/ethernet/mellanox/mlx4/main.c:3455 mlx4_load_one()
> 	warn: missing error code 'err'
> 
> drivers/net/ethernet/mellanox/mlx4/main.c
>     3438         if (mlx4_is_master(dev)) {
>     3439                 /* when we hit the goto slave_start below, dev_cap already initialized */
>     3440                 if (!dev_cap) {
>     3441                         dev_cap = kzalloc(sizeof(*dev_cap), GFP_KERNEL);
>     3442 
>     3443                         if (!dev_cap) {
>     3444                                 err = -ENOMEM;
>     3445                                 goto err_fw;
>     3446                         }
>     3447 
>     3448                         err = mlx4_QUERY_DEV_CAP(dev, dev_cap);
>     3449                         if (err) {
>     3450                                 mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n");
>     3451                                 goto err_fw;
>     3452                         }
>     3453 
>     3454                         if (mlx4_check_dev_cap(dev, dev_cap, nvfs))
> --> 3455                                 goto err_fw;
>                                          ^^^^^^^^^^^^
> Should this have an error code?

I don't think so. Failure here means that more than 64 VFs were
requested for unsupported device. In such case, we will perform same
flow as for failure in SR-IOV a couple of lines below - graceful exit.

It is hard to say if it is correct behaviour, but I won't change
anything for such old driver.

Thanks

      reply	other threads:[~2022-05-23 12:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 15:41 [bug report] net/mlx4_core: Support more than 64 VFs Dan Carpenter
2022-05-23 12:18 ` 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=Yot7loyr9xVwMHZR@unreal \
    --to=leon@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=matanb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.