diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2017-10-02 20:15:19 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-10-12 16:57:42 +0200 |
commit | 121765281dd8879356136880a5454cdf38b7c854 (patch) | |
tree | 6d02f00cfb79579002ed1296445f075ebf6d781b /tests/vhost-user-bridge.c | |
parent | bcf0836d0fb32ef5442fd3f47fd1b115c362be43 (diff) |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c index f922cc75ae..d820033a72 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; |