]> git.proxmox.com Git - qemu.git/commitdiff
xen: flush queue when getting an event
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 9 Aug 2012 14:45:57 +0000 (16:45 +0200)
committerStefan Hajnoczi <stefanha@gmail.com>
Fri, 14 Sep 2012 07:40:31 +0000 (08:40 +0100)
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>
hw/xen_nic.c

index 8b79bfb73ebf29eccd3c7a9eb5af23589305c578..cf7d5591b36a38f5a281d9e1afcae56332c02091 100644 (file)
@@ -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)