Jason Wang
2021-Dec-03 02:31 UTC
[PATCH 4/7] vdpa/mlx5: Report queried max supported virtqueues
On Thu, Dec 2, 2021 at 3:58 AM Eli Cohen <elic at nvidia.com> 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 at nvidia.com> > --- > 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 >