]> git.ipfire.org Git - thirdparty/qemu.git/commit
net: notify iothread after flushing queue
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 9 Aug 2012 14:45:55 +0000 (16:45 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 12 Oct 2012 02:44:17 +0000 (21:44 -0500)
commit8e9fdc4a8818161f102457a4358fb5f617b61ac2
treec6ee9a76b7d43bb1511503360a94cb7dcff2cdd2
parentca54dc1e752e1def95ce809b63a21932533d220c
net: notify iothread after flushing queue

virtio-net has code to flush the queue and notify the iothread
whenever new receive buffers are added by the guest.  That is
fine, and indeed we need to do the same in all other drivers.
However, notifying the iothread should be work for the network
subsystem.  And since we are at it we can add a little smartness:
if some of the queued packets already could not be delivered,
there is no need to notify the iothread.

Reported-by: Luigi Rizzo <rizzo@iet.unipi.it>
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Jan Kiszka <jan.kiszka@siemens.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Amos Kong <akong@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
(cherry picked from commit 987a9b4800003567b1a47a379255e886a77d57ea)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio-net.c
net.c
net/queue.c
net/queue.h