From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSwL7-0000Mz-6i for qemu-devel@nongnu.org; Mon, 20 Jul 2009 13:07:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MSwL2-0000MH-Op for qemu-devel@nongnu.org; Mon, 20 Jul 2009 13:07:48 -0400 Received: from [199.232.76.173] (port=35893 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSwL2-0000ME-IA for qemu-devel@nongnu.org; Mon, 20 Jul 2009 13:07:44 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56586) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MSwL2-0004Se-0s for qemu-devel@nongnu.org; Mon, 20 Jul 2009 13:07:44 -0400 From: Glauber Costa Date: Mon, 20 Jul 2009 13:07:41 -0400 Message-Id: <1248109661-1280-1-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH] notify io_thread at the end of rx handling List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com 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 --- 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