qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC v2 02/32] vhub: Only process received packets on start


From: Dr. David Alan Gilbert (git)
Subject: [Qemu-devel] [RFC v2 02/32] vhub: Only process received packets on started queues
Date: Thu, 24 Aug 2017 20:27:00 +0100

From: "Dr. David Alan Gilbert" <address@hidden>

Only process received packets if the queue has been started.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
 tests/vhost-user-bridge.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index 1e5b5ca3da..324abee53d 100644
--- a/tests/vhost-user-bridge.c
+++ b/tests/vhost-user-bridge.c
@@ -277,6 +277,7 @@ vubr_backend_recv_cb(int sock, void *ctx)
     DPRINT("    hdrlen = %d\n", hdrlen);
 
     if (!vu_queue_enabled(dev, vq) ||
+        !vu_queue_started(dev, vq) ||
         !vu_queue_avail_bytes(dev, vq, hdrlen, 0)) {
         DPRINT("Got UDP packet, but no available descriptors on RX virtq.\n");
         return;
-- 
2.13.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]