On 12/21/2021 9:20 AM, Eli Cohen wrote:
Configure max supported virtqueues on the management device. This info
can be retrieved using:

$ vdpa mgmtdev show
auxiliary/mlx5_core.sf.1:
   supported_classes net
   max_supported_vqs 257

Signed-off-by: Eli Cohen <[email protected]>
Reviewed-by: Si-Wei Liu <[email protected]>
---
  drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c 
b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 72ed5efbe35d..67fa74cfaad8 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -2689,6 +2689,8 @@ static int mlx5v_probe(struct auxiliary_device *adev,
        mgtdev->mgtdev.id_table = id_table;
        mgtdev->mgtdev.config_attr_mask = 
BIT_ULL(VDPA_ATTR_DEV_NET_CFG_MACADDR) |
                                          
BIT_ULL(VDPA_ATTR_DEV_NET_CFG_MAX_VQP);
+       mgtdev->mgtdev.max_supported_vqs =
+               MLX5_CAP_DEV_VDPA_EMULATION(mdev, max_num_virtio_queues) + 1;
        mgtdev->madev = madev;
err = vdpa_mgmtdev_register(&mgtdev->mgtdev);

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to