From: Glauber Costa Date: Mon, 20 Jul 2009 17:07:41 +0000 (-0400) Subject: notify io_thread at the end of rx handling X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a61d1f6701a4a25428b2d4211c0740cfb7c54e8d;p=qemu.git 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 Signed-off-by: Anthony Liguori --- 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)