qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] notify io_thread at the end of rx handling


From: Glauber Costa
Subject: [Qemu-devel] [PATCH] notify io_thread at the end of rx handling
Date: Mon, 20 Jul 2009 13:07:41 -0400

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 <address@hidden>
---
 hw/virtio-net.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 7a7eafe..218f985 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)
-- 
1.6.2.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]