|
|
5544c1 |
From 7fc16be815b8ff85f174fc93d67f82400da08120 Mon Sep 17 00:00:00 2001
|
|
|
5544c1 |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
5544c1 |
Date: Thu, 9 Aug 2012 16:45:57 +0200
|
|
|
5544c1 |
Subject: [PATCH] xen: flush queue when getting an event
|
|
|
5544c1 |
|
|
|
5544c1 |
xen does not have a register that, when written, will cause can_receive
|
|
|
5544c1 |
to go from false to true. However, flushing the queue can be attempted
|
|
|
5544c1 |
whenever the front-end raises its side of the Xen event channel. There
|
|
|
5544c1 |
is a single event channel for tx and rx.
|
|
|
5544c1 |
|
|
|
5544c1 |
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|
|
|
5544c1 |
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
|
|
|
5544c1 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
5544c1 |
Reviewed-by: Amos Kong <akong@redhat.com>
|
|
|
5544c1 |
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
|
|
|
5544c1 |
(cherry picked from commit a98b140223d3a627eab7ee3ddec645bab630d756)
|
|
|
5544c1 |
|
|
|
5544c1 |
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
|
|
|
5544c1 |
---
|
|
|
5544c1 |
hw/xen_nic.c | 1 +
|
|
|
5544c1 |
1 file changed, 1 insertion(+)
|
|
|
5544c1 |
|
|
|
5544c1 |
diff --git a/hw/xen_nic.c b/hw/xen_nic.c
|
|
|
5544c1 |
index 8b79bfb..cf7d559 100644
|
|
|
5544c1 |
--- a/hw/xen_nic.c
|
|
|
5544c1 |
+++ b/hw/xen_nic.c
|
|
|
5544c1 |
@@ -415,6 +415,7 @@ static void net_event(struct XenDevice *xendev)
|
|
|
5544c1 |
{
|
|
|
5544c1 |
struct XenNetDev *netdev = container_of(xendev, struct XenNetDev, xendev);
|
|
|
5544c1 |
net_tx_packets(netdev);
|
|
|
5544c1 |
+ qemu_flush_queued_packets(&netdev->nic->nc);
|
|
|
5544c1 |
}
|
|
|
5544c1 |
|
|
|
5544c1 |
static int net_free(struct XenDevice *xendev)
|
|
|
5544c1 |
--
|
|
|
5544c1 |
1.7.12.1
|
|
|
5544c1 |
|