[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 47/54] vhost-user-test: signal data_cond when s->ring
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 47/54] vhost-user-test: signal data_cond when s->rings changes |
Date: |
Wed, 12 Dec 2018 16:23:08 +0100 |
This speeds up wait_for_rings_started, which currently is just waiting for
the timeout before checking s->rings.
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
---
tests/vhost-user-test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 656e519..6a805e6 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -384,6 +384,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int
size)
assert(msg.payload.state.index < s->queues * 2);
s->rings &= ~(0x1ULL << msg.payload.state.index);
+ g_cond_broadcast(&s->data_cond);
break;
case VHOST_USER_SET_MEM_TABLE:
@@ -425,6 +426,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int
size)
case VHOST_USER_SET_VRING_BASE:
assert(msg.payload.state.index < s->queues * 2);
s->rings |= 0x1ULL << msg.payload.state.index;
+ g_cond_broadcast(&s->data_cond);
break;
case VHOST_USER_GET_QUEUE_NUM:
--
1.8.3.1
- [Qemu-devel] [PULL 54/54] vhost-user-test: create a temporary directory per TestServer, (continued)
- [Qemu-devel] [PULL 54/54] vhost-user-test: create a temporary directory per TestServer, Paolo Bonzini, 2018/12/12
- [Qemu-devel] [PULL 49/54] vhost-user-test: support VHOST_USER_PROTOCOL_F_CROSS_ENDIAN, Paolo Bonzini, 2018/12/12
- [Qemu-devel] [PULL 53/54] vhost-user-test: small changes to init_hugepagefs, Paolo Bonzini, 2018/12/12
- [Qemu-devel] [PULL 52/54] vhost-user-test: create a main loop per TestServer, Paolo Bonzini, 2018/12/12
- [Qemu-devel] [PULL 48/54] vhost-user: support cross-endian vnet headers, Paolo Bonzini, 2018/12/12
- [Qemu-devel] [PULL 50/54] vhost-user-test: skip if there is no memory at address 0, Paolo Bonzini, 2018/12/12
- [Qemu-devel] [PULL 44/54] vhost-net: compile it on all targets that have virtio-net., Paolo Bonzini, 2018/12/12
- [Qemu-devel] [PULL 51/54] vhost-user-test: reduce usage of global_qtest, Paolo Bonzini, 2018/12/12
- [Qemu-devel] [PULL 45/54] vhost-net: revamp configure logic, Paolo Bonzini, 2018/12/12
- [Qemu-devel] [PULL 41/54] vhost-net: move stubs to a separate file, Paolo Bonzini, 2018/12/12
- [Qemu-devel] [PULL 47/54] vhost-user-test: signal data_cond when s->rings changes,
Paolo Bonzini <=
- Re: [Qemu-devel] [PULL 00/54] Misc patches for 2018-12-12, Eric Blake, 2018/12/12
- Re: [Qemu-devel] [PULL 00/54] Misc patches for 2018-12-12, no-reply, 2018/12/12