]> Git Repo - qemu.git/commitdiff
vhost-user-test: support VHOST_USER_SET_VRING_ENABLE
authorMichael S. Tsirkin <[email protected]>
Mon, 16 Nov 2015 11:33:36 +0000 (13:33 +0200)
committerMichael S. Tsirkin <[email protected]>
Mon, 16 Nov 2015 12:35:05 +0000 (14:35 +0200)
vhost-user-test is broken now: it assumes
QEMU sends RESET_OWNER, and we stopped doing that.
Wait for ENABLE_RING with 0 instead.

Signed-off-by: Michael S. Tsirkin <[email protected]>
tests/vhost-user-test.c

index 01cfc7e25da799f786da4b775ed50e4528bc403f..022223b2a73735ac188bbdbf880e72d335751d26 100644 (file)
@@ -70,6 +70,7 @@ typedef enum VhostUserRequest {
     VHOST_USER_SET_VRING_ERR = 14,
     VHOST_USER_GET_PROTOCOL_FEATURES = 15,
     VHOST_USER_SET_PROTOCOL_FEATURES = 16,
+    VHOST_USER_SET_VRING_ENABLE = 18,
     VHOST_USER_MAX
 } VhostUserRequest;
 
@@ -315,8 +316,10 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
         g_cond_signal(&s->data_cond);
         break;
 
-    case VHOST_USER_RESET_OWNER:
-        s->fds_num = 0;
+    case VHOST_USER_SET_VRING_ENABLE:
+        if (!msg.payload.state.num) {
+            s->fds_num = 0;
+        }
         break;
 
     default:
This page took 0.023521 seconds and 4 git commands to generate.