aboutsummaryrefslogtreecommitdiff
path: root/tests/vhost-user-bridge.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2017-10-02 20:15:19 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-10-12 16:57:42 +0200
commit121765281dd8879356136880a5454cdf38b7c854 (patch)
tree6d02f00cfb79579002ed1296445f075ebf6d781b /tests/vhost-user-bridge.c
parentbcf0836d0fb32ef5442fd3f47fd1b115c362be43 (diff)
downloadqemu-121765281dd8879356136880a5454cdf38b7c854.zip
qemu-121765281dd8879356136880a5454cdf38b7c854.tar.gz
qemu-121765281dd8879356136880a5454cdf38b7c854.tar.bz2
vhost-user-bridge: Only process received packets on started queues
Only process received packets if the queue has been started. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20171002191521.15748-3-dgilbert@redhat.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Diffstat (limited to 'tests/vhost-user-bridge.c')
-rw-r--r--tests/vhost-user-bridge.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index f922cc7..d820033 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;