All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Eli Cohen <elic@nvidia.com>
Cc: eperezma <eperezma@redhat.com>,
	virtualization <virtualization@lists.linux-foundation.org>,
	mst <mst@redhat.com>
Subject: Re: [PATCH] vdpa/mlx5: Avoid executing set_vq_ready() if device is reset
Date: Tue, 14 Sep 2021 10:54:34 +0800	[thread overview]
Message-ID: <CACGkMEuwjX+gpdsxyCvgm5wp2FN5XhuaSGbhjH6dFm0F0edpYQ@mail.gmail.com> (raw)
In-Reply-To: <20210909063738.46970-1-elic@nvidia.com>

On Thu, Sep 9, 2021 at 2:37 PM Eli Cohen <elic@nvidia.com> wrote:
>
> Avoid executing set_vq_ready() if the device has been reset. In such
> case, the features are cleared and cannot be used in conditional
> statements. Such reference happens is the function ctrl_vq_idx().
>
> Fixes: 9c90709cf8e7 ("vdpa/mlx5: Add multiqueue support")
> Signed-off-by: Eli Cohen <elic@nvidia.com>

Acked-by: Jason Wang <jasowang@redhat.com>

> ---
>  drivers/vdpa/mlx5/net/mlx5_vnet.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 64dfd0f500d2..bd56de7484dc 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -1714,6 +1714,9 @@ static void mlx5_vdpa_set_vq_ready(struct vdpa_device *vdev, u16 idx, bool ready
>         struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev);
>         struct mlx5_vdpa_virtqueue *mvq;
>
> +       if (!mvdev->actual_features)
> +               return;
> +
>         if (!is_index_valid(mvdev, idx))
>                 return;
>
> --
> 2.32.0
>

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

           reply	other threads:[~2021-09-14  2:54 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20210909063738.46970-1-elic@nvidia.com>]

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=CACGkMEuwjX+gpdsxyCvgm5wp2FN5XhuaSGbhjH6dFm0F0edpYQ@mail.gmail.com \
    --to=jasowang@redhat.com \
    --cc=elic@nvidia.com \
    --cc=eperezma@redhat.com \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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.