All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] vdpa/mlx5: Avoid executing set_vq_ready() if device is reset
       [not found] <20210909063738.46970-1-elic@nvidia.com>
@ 2021-09-14  2:54 ` Jason Wang
  0 siblings, 0 replies; only message in thread
From: Jason Wang @ 2021-09-14  2:54 UTC (permalink / raw)
  To: Eli Cohen; +Cc: eperezma, virtualization, mst

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-14  2:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210909063738.46970-1-elic@nvidia.com>
2021-09-14  2:54 ` [PATCH] vdpa/mlx5: Avoid executing set_vq_ready() if device is reset Jason Wang

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.