aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-08-09 16:45:57 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2012-10-11 21:44:18 -0500
commit65a2f8e27c335c7edf4d6c8d1e1b7fb0090c72ff (patch)
tree2d2c1560322cef9feef24757846a7b07be561d5e /hw
parent7575a6d2f2747f5d6ef263ad002a731402853fa6 (diff)
xen: flush queue when getting an event
xen does not have a register that, when written, will cause can_receive to go from false to true. However, flushing the queue can be attempted whenever the front-end raises its side of the Xen event channel. There is a single event channel for tx and rx. Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> 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 a98b140223d3a627eab7ee3ddec645bab630d756) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/xen_nic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/xen_nic.c b/hw/xen_nic.c
index 8b79bfb73e..cf7d5591b3 100644
--- a/hw/xen_nic.c
+++ b/hw/xen_nic.c
@@ -415,6 +415,7 @@ static void net_event(struct XenDevice *xendev)
{
struct XenNetDev *netdev = container_of(xendev, struct XenNetDev, xendev);
net_tx_packets(netdev);
+ qemu_flush_queued_packets(&netdev->nic->nc);
}
static int net_free(struct XenDevice *xendev)