38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
From 7fc16be815b8ff85f174fc93d67f82400da08120 Mon Sep 17 00:00:00 2001
|
|
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
Date: Thu, 9 Aug 2012 16:45:57 +0200
|
|
Subject: [PATCH] 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>
|
|
---
|
|
hw/xen_nic.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/hw/xen_nic.c b/hw/xen_nic.c
|
|
index 8b79bfb..cf7d559 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)
|
|
--
|
|
1.7.12.1
|
|
|