mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
bcf0836d0f
commit
121765281d
|
@ -277,6 +277,7 @@ vubr_backend_recv_cb(int sock, void *ctx)
|
||||||
DPRINT(" hdrlen = %d\n", hdrlen);
|
DPRINT(" hdrlen = %d\n", hdrlen);
|
||||||
|
|
||||||
if (!vu_queue_enabled(dev, vq) ||
|
if (!vu_queue_enabled(dev, vq) ||
|
||||||
|
!vu_queue_started(dev, vq) ||
|
||||||
!vu_queue_avail_bytes(dev, vq, hdrlen, 0)) {
|
!vu_queue_avail_bytes(dev, vq, hdrlen, 0)) {
|
||||||
DPRINT("Got UDP packet, but no available descriptors on RX virtq.\n");
|
DPRINT("Got UDP packet, but no available descriptors on RX virtq.\n");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue