[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/71] vhost-user-test: signal data_cond when s->rin
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 07/71] vhost-user-test: signal data_cond when s->rings changes |
Date: |
Mon, 3 Dec 2018 16:32:20 +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>
---
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
- Re: [Qemu-devel] [PATCH 02/71] vhost-net-user: add stubs for when no virtio-net device is present, (continued)
- [Qemu-devel] [PATCH 01/71] vhost-net: move stubs to a separate file, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 03/71] vhost: restrict Linux dependency to kernel vhost, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 04/71] vhost-net: compile it on all targets that have virtio-net., Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 05/71] vhost-net: revamp configure logic, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 07/71] vhost-user-test: signal data_cond when s->rings changes,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 08/71] vhost-user: support cross-endian vnet headers, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 09/71] vhost-user-test: support VHOST_USER_PROTOCOL_F_CROSS_ENDIAN, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 06/71] vhost-user-test: use g_cond_broadcast, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 10/71] vhost-user-test: skip if there is no memory at address 0, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 11/71] vhost-user-test: reduce usage of global_qtest, Paolo Bonzini, 2018/12/03