Re: [PATCH v5 11/13] vdpa/mlx5: Configure max supported virtqueues

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

 





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 <elic@xxxxxxxxxx>
Reviewed-by: Si-Wei Liu <si-wei.liu@xxxxxxxxxx>
---
  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
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