[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/18] test: vubr check vring enable state
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH 16/18] test: vubr check vring enable state |
Date: |
Fri, 1 Apr 2016 13:16:26 +0200 |
From: Marc-André Lureau <address@hidden>
The rings shouldn't be processed unless previously enabled.
Signed-off-by: Marc-André Lureau <address@hidden>
---
tests/vhost-user-bridge.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index 0779ba2..42450a6 100644
--- a/tests/vhost-user-bridge.c
+++ b/tests/vhost-user-bridge.c
@@ -710,7 +710,8 @@ vubr_backend_recv_cb(int sock, void *ctx)
int buflen = sizeof(buf);
int len;
- if (!dev->ready) {
+ if (!dev->ready || !rx_vq->enable) {
+ DPRINT("\n NOT READY: dev: %d, rx: %d\n", dev->ready, rx_vq->enable);
return;
}
@@ -747,8 +748,11 @@ vubr_kick_cb(int sock, void *ctx)
if (rc == -1) {
vubr_die("eventfd_read()");
} else {
- DPRINT("Got kick_data: %016"PRIx64"\n", kick_data);
- vubr_process_avail(dev, &dev->vq[1]);
+ DPRINT("Got kick_data: %016"PRIx64", vq enabled: %d\n",
+ kick_data, dev->vq[1].enable);
+ if (dev->vq[1].enable) {
+ vubr_process_avail(dev, &dev->vq[1]);
+ }
}
}
--
2.5.5
- [Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support, (continued)
[Qemu-devel] [PATCH 12/18] vhost-user: disconnect on start failure, marcandre . lureau, 2016/04/01
[Qemu-devel] [PATCH 15/18] vhost-net: save & restore vring enable state, marcandre . lureau, 2016/04/01
[Qemu-devel] [PATCH 14/18] vhost-net: save & restore vhost-user acked features, marcandre . lureau, 2016/04/01
[Qemu-devel] [PATCH 13/18] vhost-net: do not crash if backend is not present, marcandre . lureau, 2016/04/01
[Qemu-devel] [PATCH 16/18] test: vubr check vring enable state,
marcandre . lureau <=
[Qemu-devel] [PATCH 18/18] test: add shutdown support vubr test, marcandre . lureau, 2016/04/01
[Qemu-devel] [PATCH 17/18] test: start vhost-user reconnect test, marcandre . lureau, 2016/04/01