aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlauber Costa <glommer@redhat.com>2009-07-20 13:07:41 -0400
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-22 10:58:49 -0500
commita61d1f6701a4a25428b2d4211c0740cfb7c54e8d (patch)
tree48f1cde50d8f1f54f49ba6c5c47a6cacd73f80fa
parent452e475196a3f8b6b96d16bbaca727ebc1278a97 (diff)
notify io_thread at the end of rx handling
This is a backport from qemu-kvm. Just instead of using kvm's specific notification mechanism, we use qemu_notify_event() Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/virtio-net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 7a7eafe903..218f985037 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -305,6 +305,10 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
VirtIONet *n = to_virtio_net(vdev);
qemu_flush_queued_packets(n->vc);
+
+ /* We now have RX buffers, signal to the IO thread to break out of the
+ * select to re-poll the tap file descriptor */
+ qemu_notify_event();
}
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)