From patchwork Fri Sep 14 08:46:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 183851 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DB52E2C007B for ; Fri, 14 Sep 2012 19:13:11 +1000 (EST) Received: from localhost ([::1]:42906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCRZW-0006Em-Hn for incoming@patchwork.ozlabs.org; Fri, 14 Sep 2012 04:48:22 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Up/rhJl3T0cC3f256gjsrZb+p7TPEE2sl5GBVjShCdg=; b=yoWFFlVOMHX7KytSidNoSiOA04JrXnGG8W3Ne6u0rXzAkIXAsgXZRFWTFpV65WaZhl Qwg8WNcmpT2gf3UPx15u+n6ypMtue94D3Up/xBClfTFBfCX2ckwdVmgjfof6CCXppTZC HKRPdjHk+oOuT8cwGOSknX8uRlkR6ZZK6HsySKsL684OiMt9BQbbNvHEyH1hdZDkpkvH 9oVLIgjSh06pJ8CXd/prqokMnYm0QvW462+XpjUTALmrOWL4rdWTWnWiEMLu5YYOUZy5 i2nWsdOo6o+xUaDpnp/vlJRzBO53ju3pcGnbI66n9dhstpBHd60vdWDdh74YJMd2WuYG 78Pg== Received: by 10.180.105.163 with SMTP id gn3mr4478680wib.2.1347612442090; Fri, 14 Sep 2012 01:47:22 -0700 (PDT) Received: from localhost ([109.224.133.37]) by mx.google.com with ESMTPS id h9sm17870001wiz.1.2012.09.14.01.47.21 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 01:47:21 -0700 (PDT) From: Stefan Hajnoczi To: Anthony Liguori Date: Fri, 14 Sep 2012 09:46:50 +0100 Message-Id: <1347612420-5704-4-git-send-email-stefanha@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1347612420-5704-1-git-send-email-stefanha@gmail.com> References: <1347612420-5704-1-git-send-email-stefanha@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.53 Cc: Paolo Bonzini , qemu-devel@nongnu.org, Stefan Hajnoczi , Stefano Stabellini Subject: [Qemu-devel] [PATCH 03/13] xen: flush queue when getting an event X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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)