Skip to contentSkip to conversation

tests/qtest/vhost-user-test: Use modern virtio for vhost-user tests

PATCH In review Thomas Huth 3 participants 3 messages Feb 3, 2025 – Feb 11, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/qtest/vhost-user-test: Use modern virtio for vhost-user tests

All other vhost-user tests here use modern virtio, too, so let's adjust the vhost-user-net test accordingly.

---
 tests/qtest/vhost-user-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/qtest/vhost-user-test.c +2 -1
index 76d142a158..bd977ef28d 100644
@@ -1043,7 +1043,8 @@ static void test_multiqueue(void *obj, void *arg, QGuestAllocator *alloc)
 
 static uint64_t vu_net_get_features(TestServer *s)
 {
-    uint64_t features = 0x1ULL << VHOST_F_LOG_ALL |
+    uint64_t features = 0x1ULL << VIRTIO_F_VERSION_1 |
+        0x1ULL << VHOST_F_LOG_ALL |
         0x1ULL << VHOST_USER_F_PROTOCOL_FEATURES;
 
     if (s->queues > 1) {
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Thomas Huth

All other vhost-user tests here use modern virtio, too, so let's adjust the vhost-user-net test accordingly.

---
 tests/qtest/vhost-user-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/qtest/vhost-user-test.c +0 -0
index 76d142a158..bd977ef28d 100644

tests/qtest/vhost-user-test.c static void test_multiqueue(void *obj, void *arg, QGuestAllocator *alloc) · line 1050

Quoted 9 lines
tests/qtest/vhost-user-test.c +2 -1
@@ -1043,7 +1043,8 @@ static void test_multiqueue(void *obj, void *arg, QGuestAllocator *alloc)
 
 static uint64_t vu_net_get_features(TestServer *s)
 {
-    uint64_t features = 0x1ULL << VHOST_F_LOG_ALL |
+    uint64_t features = 0x1ULL << VIRTIO_F_VERSION_1 |
+        0x1ULL << VHOST_F_LOG_ALL |
         0x1ULL << VHOST_USER_F_PROTOCOL_FEATURES;
 
     if (s->queues > 1) {
Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 7 lines · Thomas Huth

All other vhost-user tests here use modern virtio, too, so let's adjust the vhost-user-net test accordingly.

---
tests/qtest/vhost-user-test.c | 3 ++-

1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 18 lines
tests/qtest/vhost-user-test.c +2 -1
index 76d142a158..bd977ef28d 100644
@@ -1043,7 +1043,8 @@ static void test_multiqueue(void *obj, void *arg, QGuestAllocator *alloc)
 
 static uint64_t vu_net_get_features(TestServer *s)
 {
-    uint64_t features = 0x1ULL << VHOST_F_LOG_ALL |
+    uint64_t features = 0x1ULL << VIRTIO_F_VERSION_1 |
+        0x1ULL << VHOST_F_LOG_ALL |
        0x1ULL << VHOST_USER_F_PROTOCOL_FEATURES;
 
    if (s->queues > 1) {
Signature · 1 line
2.48.1