e1000: flush queue whenever can_receive can go from false to true
commite8b4c680b41bd960ecccd9ff076b7b058e0afcd4
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 9 Aug 2012 14:45:56 +0000 (9 16:45 +0200)
committerStefan Hajnoczi <stefanha@gmail.com>
Fri, 14 Sep 2012 07:40:31 +0000 (14 08:40 +0100)
tree6ab1aca5201c3b0bab967c0d40829bd5a4bae386
parent987a9b4800003567b1a47a379255e886a77d57ea
e1000: flush queue whenever can_receive can go from false to true

When the guests replenish the receive ring buffer, the network device
should flush its queue of pending packets.  This is done with
qemu_flush_queued_packets.

e1000's can_receive can go from false to true when RCTL or RDT are
modified.

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>
hw/e1000.c