[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/15] vhost-user-test: support VHOST_USER_SET_VRING_
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 04/15] vhost-user-test: support VHOST_USER_SET_VRING_ENABLE |
Date: |
Thu, 19 Nov 2015 15:36:09 +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 <address@hidden>
---
tests/vhost-user-test.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 01cfc7e..022223b 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -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:
--
MST
- [Qemu-devel] [PULL 00/15] vhost, pc: fixes for 2.5, Michael S. Tsirkin, 2015/11/19
- [Qemu-devel] [PULL 01/15] vhost: let SET_VRING_ENABLE message depends on protocol feature, Michael S. Tsirkin, 2015/11/19
- [Qemu-devel] [PULL 02/15] vhost: don't send RESET_OWNER at stop, Michael S. Tsirkin, 2015/11/19
- [Qemu-devel] [PULL 03/15] vhost-user: update spec description, Michael S. Tsirkin, 2015/11/19
- [Qemu-devel] [PULL 04/15] vhost-user-test: support VHOST_USER_SET_VRING_ENABLE,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 06/15] vhost-user: start/stop all rings, Michael S. Tsirkin, 2015/11/19
- [Qemu-devel] [PULL 07/15] q35: Check propery to determine if iommu is set, Michael S. Tsirkin, 2015/11/19
- [Qemu-devel] [PULL 08/15] i440fx: print an error message if user tries to enable iommu, Michael S. Tsirkin, 2015/11/19