Skip to contentSkip to conversation

vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default

PATCH Si-Wei Liu 2 participants 3 messages Mar 21, 2023 – Mar 22, 2023 2 messages not in the archive virtio core

lore
Share & tools
lore

Si-Wei Liu

author Reviewed-by
#2 lore raw
In reply to a message not in the archive
Quoted 9 lines · Eli Cohen

Following patch adds driver support for VIRTIO_NET_F_MRG_RXBUF.

Current firmware versions show degradation in packet rate when using MRG_RXBUF. Users who favor memory saving over packet rate could enable this feature but we want to keep it off by default.

One can still enable it when creating the vdpa device using vdpa tool by providing features that include it.

Quoted 6 lines

For example:

$ vdpa dev add name vdpa0 mgmtdev pci/0000:86:00.2 device_features 0x300cb982b

Looks good to me.

Quoted 9 lines
---
  drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/vdpa/mlx5/net/mlx5_vnet.c +0 -0
index 520646ae7fa0..502c482a93ce 100644

drivers/vdpa/mlx5/net/mlx5_vnet.c static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name, · line 3129

Quoted 8 lines
drivers/vdpa/mlx5/net/mlx5_vnet.c +2 -0
@@ -3122,6 +3122,8 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
  			return -EINVAL;
  		}
  		device_features &= add_config->device_features;
+	} else {
+		device_features &= ~BIT_ULL(VIRTIO_NET_F_MRG_RXBUF);
  	}
  	if (!(device_features & BIT_ULL(VIRTIO_F_VERSION_1) &&
  	      device_features & BIT_ULL(VIRTIO_F_ACCESS_PLATFORM))) {

_______________________________________________
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 9 lines · Eli Cohen

Following patch adds driver support for VIRTIO_NET_F_MRG_RXBUF.

Current firmware versions show degradation in packet rate when using MRG_RXBUF. Users who favor memory saving over packet rate could enable this feature but we want to keep it off by default.

One can still enable it when creating the vdpa device using vdpa tool by providing features that include it.

Quoted 6 lines

For example:

$ vdpa dev add name vdpa0 mgmtdev pci/0000:86:00.2 device_features 0x300cb982b

I have a question. Could you guys try with the recent XDP mergeable buffer rework? Does this address the performance issue you are observing?

Specifically:

Message-Id: <[email protected]>
Message-Id: <[email protected]>

I would very much appreciate if you posted perf numbers in response to that thread - both to help evaluate that patchset and this one.
Thanks!

Quoted 19 lines
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/vdpa/mlx5/net/mlx5_vnet.c +2 -0
index 520646ae7fa0..502c482a93ce 100644
@@ -3122,6 +3122,8 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
 			return -EINVAL;
 		}
 		device_features &= add_config->device_features;
+	} else {
+		device_features &= ~BIT_ULL(VIRTIO_NET_F_MRG_RXBUF);
 	}
 	if (!(device_features & BIT_ULL(VIRTIO_F_VERSION_1) &&
 	      device_features & BIT_ULL(VIRTIO_F_ACCESS_PLATFORM))) {
Signature · 1 line
2.38.1

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

#4 lore raw
Quoted 24 lines · Michael S. Tsirkin
Quoted 9 lines · Eli Cohen

Following patch adds driver support for VIRTIO_NET_F_MRG_RXBUF.

Current firmware versions show degradation in packet rate when using MRG_RXBUF. Users who favor memory saving over packet rate could enable this feature but we want to keep it off by default.

One can still enable it when creating the vdpa device using vdpa tool by providing features that include it.

Quoted 6 lines

For example:

$ vdpa dev add name vdpa0 mgmtdev pci/0000:86:00.2 device_features 0x300cb982b

I have a question. Could you guys try with the recent XDP mergeable buffer rework? Does this address the performance issue you are observing?

Specifically:

Quoted 7 lines

Message-Id: <[email protected]>
Message-Id: <[email protected]>

I would very much appreciate if you posted perf numbers in response to that thread - both to help evaluate that patchset and this one.
Thanks!

Oh sorry, I got confused. That is still preparatory work not real zero copy. The patchset to try is this:

Message-Id: <[email protected]>

Quoted 4 lines
Quoted 4 lines
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 15 lines
Quoted 15 lines
drivers/vdpa/mlx5/net/mlx5_vnet.c +2 -0
index 520646ae7fa0..502c482a93ce 100644
@@ -3122,6 +3122,8 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
 			return -EINVAL;
 		}
 		device_features &= add_config->device_features;
+	} else {
+		device_features &= ~BIT_ULL(VIRTIO_NET_F_MRG_RXBUF);
 	}
 	if (!(device_features & BIT_ULL(VIRTIO_F_VERSION_1) &&
 	      device_features & BIT_ULL(VIRTIO_F_ACCESS_PLATFORM))) {
Signature · 1 line
2.38.1

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