From a61d1f6701a4a25428b2d4211c0740cfb7c54e8d Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Mon, 20 Jul 2009 13:07:41 -0400 Subject: 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 --- hw/virtio-net.c | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.2.1