From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCRYd-0004RI-Ry for qemu-devel@nongnu.org; Fri, 14 Sep 2012 04:47:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCRYY-0000sn-LF for qemu-devel@nongnu.org; Fri, 14 Sep 2012 04:47:27 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:48553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCRYY-0000s8-FR for qemu-devel@nongnu.org; Fri, 14 Sep 2012 04:47:22 -0400 Received: by mail-wg0-f53.google.com with SMTP id dr1so370149wgb.10 for ; Fri, 14 Sep 2012 01:47:22 -0700 (PDT) From: Stefan Hajnoczi Date: Fri, 14 Sep 2012 09:46:50 +0100 Message-Id: <1347612420-5704-4-git-send-email-stefanha@gmail.com> In-Reply-To: <1347612420-5704-1-git-send-email-stefanha@gmail.com> References: <1347612420-5704-1-git-send-email-stefanha@gmail.com> Subject: [Qemu-devel] [PATCH 03/13] xen: flush queue when getting an event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paolo Bonzini , qemu-devel@nongnu.org, Stefan Hajnoczi , Stefano Stabellini From: Paolo Bonzini 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 Cc: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Reviewed-by: Amos Kong Signed-off-by: Stefan Hajnoczi --- 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.10.4