Skip to contentSkip to conversation

vdpa: accept VIRTIO_NET_F_SPEED_DUPLEX in SVQ

PATCH In review Eugenio Pérez 2 participants 3 messages Mar 7, 2023 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vdpa: accept VIRTIO_NET_F_SPEED_DUPLEX in SVQ

There is no reason to block it as it has nothing to do with the vrings. All the support of the feature comes via config space.

---
 net/vhost-vdpa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/vhost-vdpa.c +2 -1
index de5ed8ff22..8b25559320 100644
@@ -99,7 +99,8 @@ static const uint64_t vdpa_svq_device_features =
     BIT_ULL(VIRTIO_F_ANY_LAYOUT) |
     BIT_ULL(VIRTIO_NET_F_CTRL_MAC_ADDR) |
     BIT_ULL(VIRTIO_NET_F_RSC_EXT) |
-    BIT_ULL(VIRTIO_NET_F_STANDBY);
+    BIT_ULL(VIRTIO_NET_F_STANDBY) |
+    BIT_ULL(VIRTIO_NET_F_SPEED_DUPLEX);
 
 #define VHOST_VDPA_NET_CVQ_ASID 1
 
Signature · 1 line
2.31.1
#1 lore raw
Quoted 5 lines · Eugenio Pérez

There is no reason to block it as it has nothing to do with the vrings. All the support of the feature comes via config space.

do we need to version this with machine type btw?

Quoted 20 lines
---
 net/vhost-vdpa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/vhost-vdpa.c +2 -1
index de5ed8ff22..8b25559320 100644
@@ -99,7 +99,8 @@ static const uint64_t vdpa_svq_device_features =
     BIT_ULL(VIRTIO_F_ANY_LAYOUT) |
     BIT_ULL(VIRTIO_NET_F_CTRL_MAC_ADDR) |
     BIT_ULL(VIRTIO_NET_F_RSC_EXT) |
-    BIT_ULL(VIRTIO_NET_F_STANDBY);
+    BIT_ULL(VIRTIO_NET_F_STANDBY) |
+    BIT_ULL(VIRTIO_NET_F_SPEED_DUPLEX);
 
 #define VHOST_VDPA_NET_CVQ_ASID 1
 
Signature · 1 line
2.31.1
#2 lore raw
Quoted 10 lines · Michael S. Tsirkin
Quoted 5 lines · Eugenio Pérez

There is no reason to block it as it has nothing to do with the vrings. All the support of the feature comes via config space.

do we need to version this with machine type btw?

No, as far as I know. If the destination qemu does not support VIRTIO_NET_F_SPEED_DUPLEX and it enables SVQ it will refuse to start.

Thanks!

Quoted 21 lines
Quoted 20 lines
---
 net/vhost-vdpa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/vhost-vdpa.c +2 -2
index de5ed8ff22..8b25559320 100644
@@ -99,7 +99,8 @@ static const uint64_t vdpa_svq_device_features =
     BIT_ULL(VIRTIO_F_ANY_LAYOUT) |
     BIT_ULL(VIRTIO_NET_F_CTRL_MAC_ADDR) |
     BIT_ULL(VIRTIO_NET_F_RSC_EXT) |
-    BIT_ULL(VIRTIO_NET_F_STANDBY);
+    BIT_ULL(VIRTIO_NET_F_STANDBY) |
+    BIT_ULL(VIRTIO_NET_F_SPEED_DUPLEX);
 
 #define VHOST_VDPA_NET_CVQ_ASID 1
 
--

2.31.1