From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzpGH-0003rq-0D for qemu-devel@nongnu.org; Fri, 10 Aug 2012 09:28:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzpGF-0007a6-CW for qemu-devel@nongnu.org; Fri, 10 Aug 2012 09:28:20 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:38571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzpGF-0007Zo-3t for qemu-devel@nongnu.org; Fri, 10 Aug 2012 09:28:19 -0400 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Aug 2012 14:28:17 +0100 Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7ADRwsO868384 for ; Fri, 10 Aug 2012 14:27:58 +0100 Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7ADRvPm025403 for ; Fri, 10 Aug 2012 07:27:57 -0600 From: Stefan Hajnoczi Date: Fri, 10 Aug 2012 14:27:46 +0100 Message-Id: <1344605266-13644-4-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1344605266-13644-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1344605266-13644-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 3/3] 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 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