Skip to contentSkip to conversation

net/mlx5_vdpa: Increase the limit on the number of virtuques

PATCH Si-Wei Liu 3 participants 6 messages Nov 24, 2021 – Nov 29, 2021 3 messages not in the archive virtio core

lore
Share & tools
lore

Si-Wei Liu

author Acked-by
#1 lore raw
In reply to a message not in the archive
Quoted 4 lines · Eli Cohen

Increase the limit on the maximum number of supported virtqueues to 256 to match hardware capabilities.

Quoted 9 lines
---
  drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +0 -0
index ed7a63e48335..8f2918a8efc6 100644

drivers/vdpa/mlx5/net/mlx5_vnet.c struct mlx5_vdpa_virtqueue { · line 138

Quoted 5 lines
drivers/vdpa/mlx5/net/mlx5_vnet.c +1 -1
@@ -135,7 +135,7 @@ struct mlx5_vdpa_virtqueue {
  /* We will remove this limitation once mlx5_vdpa_alloc_resources()
   * provides for driver space allocation
   */
-#define MLX5_MAX_SUPPORTED_VQS 16
+#define MLX5_MAX_SUPPORTED_VQS 256

Did we check how much increase of memory footprint ended up with on struct mlx5_vdpa_net?

-Siwei

drivers/vdpa/mlx5/net/mlx5_vnet.c struct mlx5_vdpa_virtqueue { · line 140

Quoted 3 lines
drivers/vdpa/mlx5/net/mlx5_vnet.c +0 -0
  static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx)
  {

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

Acked-by
#4 lore raw
In reply to a message not in the archive
Quoted 5 lines · Eli Cohen

Increase the limit on the maximum number of supported virtqueues to 256 to match hardware capabilities.

(A typo in the subject)

Other than this:

Quoted 18 lines
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +1 -2
index ed7a63e48335..8f2918a8efc6 100644
@@ -135,7 +135,7 @@ struct mlx5_vdpa_virtqueue {
 /* We will remove this limitation once mlx5_vdpa_alloc_resources()
  * provides for driver space allocation
  */
-#define MLX5_MAX_SUPPORTED_VQS 16
+#define MLX5_MAX_SUPPORTED_VQS 256
 
 static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx)
 {
--
Quoted 2 lines

2.33.1

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

#5 lore raw
In reply to a message not in the archive
Quoted 2 lines · Eli Cohen

Increase the limit on the maximum number of supported virtqueues to 256 to match hardware capabilities.

Hmm and are we going to have to tweak it each time new hardware/firmware is out? Can't this be queried in some way?
In fact there's a suggestion in code to remove the limitation - any plans to do this?

Quoted 1 line

typo in subject

Quoted 19 lines
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +1 -1
index ed7a63e48335..8f2918a8efc6 100644
@@ -135,7 +135,7 @@ struct mlx5_vdpa_virtqueue {
 /* We will remove this limitation once mlx5_vdpa_alloc_resources()
  * provides for driver space allocation
  */
-#define MLX5_MAX_SUPPORTED_VQS 16
+#define MLX5_MAX_SUPPORTED_VQS 256
 
 static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx)
 {
Signature · 1 line
2.33.1

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

#3 lore raw
In reply to a message not in the archive
Quoted 27 lines · Eli Cohen
Quoted 12 lines · Si-Wei Liu
Quoted 4 lines · Eli Cohen

Increase the limit on the maximum number of supported virtqueues to 256 to match hardware capabilities.

Quoted 4 lines
---
  drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines

drivers/vdpa/mlx5/net/mlx5_vnet.c struct mlx5_vdpa_virtqueue { · line 138

Quoted 10 lines
drivers/vdpa/mlx5/net/mlx5_vnet.c +1 -1
index ed7a63e48335..8f2918a8efc6 100644
@@ -135,7 +135,7 @@ struct mlx5_vdpa_virtqueue {
  /* We will remove this limitation once mlx5_vdpa_alloc_resources()
   * provides for driver space allocation
   */
-#define MLX5_MAX_SUPPORTED_VQS 16
+#define MLX5_MAX_SUPPORTED_VQS 256

Did we check how much increase of memory footprint ended up with on struct mlx5_vdpa_net?

Quoted 1 line

The grow is 1048 * 240 = 251520 bytes.

Pls include this info in the commit log.

Quoted 5 lines
Quoted 5 lines

-Siwei

Quoted 2 lines
drivers/vdpa/mlx5/net/mlx5_vnet.c +0 -0
  static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx)
  {

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

#7 lore raw
In reply to a message not in the archive
Quoted 10 lines · Eli Cohen
Quoted 6 lines · Michael S. Tsirkin
Quoted 2 lines · Eli Cohen

Increase the limit on the maximum number of supported virtqueues to 256 to match hardware capabilities.

Hmm and are we going to have to tweak it each time new hardware/firmware is out? Can't this be queried in some way?

I thought to make the allocation dynamic once we have support for setting max queues through vdpa tool.

Well this will make things a bit harder to figure out then, right now you can assume no vdpa tool support -> max 16 VQs. The patch breaks this. Is there a motivation to up this right now, or should we just wait a bit for vdpa tool support?

Quoted 4 lines
Quoted 2 lines

In fact there's a suggestion in code to remove the limitation - any plans to do this?

Can you be more speicifc, where?

It's right there in the patch:

/* We will remove this limitation once mlx5_vdpa_alloc_resources()
* provides for driver space allocation
*/

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

typo in subject

What typo?

virtuques. ispell is your friend.

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +1 -1
index ed7a63e48335..8f2918a8efc6 100644
@@ -135,7 +135,7 @@ struct mlx5_vdpa_virtqueue {
 /* We will remove this limitation once mlx5_vdpa_alloc_resources()
  * provides for driver space allocation
  */
-#define MLX5_MAX_SUPPORTED_VQS 16
+#define MLX5_MAX_SUPPORTED_VQS 256
 
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
drivers/vdpa/mlx5/net/mlx5_vnet.c +0 -0
 static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx)
 {
Signature · 1 line
2.33.1

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

author
#8 lore raw
Quoted 7 lines · Michael S. Tsirkin
Quoted 6 lines · Eli Cohen
Quoted 5 lines · Michael S. Tsirkin
Quoted 2 lines · Eli Cohen

Increase the limit on the maximum number of supported virtqueues to 256 to match hardware capabilities.

Hmm and are we going to have to tweak it each time new hardware/firmware is out? Can't this be queried in some way?

Quoted 7 lines
Quoted 2 lines

I thought to make the allocation dynamic once we have support for setting max queues through vdpa tool.

Well this will make things a bit harder to figure out then, right now you can assume no vdpa tool support -> max 16 VQs. The patch breaks this. Is there a motivation to up this right now, or should we just wait a bit for vdpa tool support?

+1 on waiting for vdpa tool support.

-Siwei

Quoted 29 lines
Quoted 4 lines
Quoted 3 lines

In fact there's a suggestion in code to remove the limitation - any plans to do this?

Can you be more speicifc, where?

It's right there in the patch:

   /* We will remove this limitation once mlx5_vdpa_alloc_resources()
    * provides for driver space allocation
    */
Quoted 3 lines
Quoted 2 lines
Quoted 1 line

typo in subject

What typo?

virtuques. ispell is your friend.

Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
---
  drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +1 -1
index ed7a63e48335..8f2918a8efc6 100644
@@ -135,7 +135,7 @@ struct mlx5_vdpa_virtqueue {
  /* We will remove this limitation once mlx5_vdpa_alloc_resources()
   * provides for driver space allocation
   */
-#define MLX5_MAX_SUPPORTED_VQS 16
+#define MLX5_MAX_SUPPORTED_VQS 256
 
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/vdpa/mlx5/net/mlx5_vnet.c +0 -0
  static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx)
  {
Signature · 1 line
2.33.1

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