Re: [PATCH 4/7] vdpa/mlx5: Report queried max supported virtqueues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 2, 2021 at 3:58 AM Eli Cohen <elic@xxxxxxxxxx> wrote:
>
> Report back in get_vq_num_max() the correct number of virtqueues queried
> from the device instead of using a constant value.
>
> Signed-off-by: Eli Cohen <elic@xxxxxxxxxx>
> ---
>  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 62aba5dbd8fa..336eda3dcf41 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -1992,10 +1992,10 @@ static void mlx5_vdpa_set_config_cb(struct vdpa_device *vdev, struct vdpa_callba
>         ndev->config_cb = *cb;
>  }
>
> -#define MLX5_VDPA_MAX_VQ_ENTRIES 256
>  static u16 mlx5_vdpa_get_vq_num_max(struct vdpa_device *vdev)
>  {
> -       return MLX5_VDPA_MAX_VQ_ENTRIES;
> +       struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev);
> +       return MLX5_CAP_DEV_VDPA_EMULATION(mvdev->mdev, max_num_virtio_queues);
>  }

I may miss something but I guess it should not be the hardware
limitation but the one that is set from netlink.

Thanks

>
>  static u32 mlx5_vdpa_get_device_id(struct vdpa_device *vdev)
> --
> 2.33.1
>

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux