From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSxPO-0006Kq-HI for qemu-devel@nongnu.org; Mon, 20 Jul 2009 14:16:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MSxPK-0006KT-5K for qemu-devel@nongnu.org; Mon, 20 Jul 2009 14:16:18 -0400 Received: from [199.232.76.173] (port=60890 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSxPK-0006KQ-0v for qemu-devel@nongnu.org; Mon, 20 Jul 2009 14:16:14 -0400 Received: from mx2.redhat.com ([66.187.237.31]:60525) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MSxPJ-0003iF-GC for qemu-devel@nongnu.org; Mon, 20 Jul 2009 14:16:13 -0400 Subject: Re: [Qemu-devel] [PATCH] notify io_thread at the end of rx handling From: Mark McLoughlin In-Reply-To: <1248109661-1280-1-git-send-email-glommer@redhat.com> References: <1248109661-1280-1-git-send-email-glommer@redhat.com> Content-Type: text/plain Date: Mon, 20 Jul 2009 19:15:46 +0100 Message-Id: <1248113746.5654.128.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: Mark McLoughlin List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Mon, 2009-07-20 at 13:07 -0400, Glauber Costa wrote: > 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(); > } Looks good to me Acked-by: Mark McLoughlin Cheers, Mark.