From patchwork Thu Aug 9 14:45:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 176135 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 967F32C00B4 for ; Fri, 10 Aug 2012 00:46:54 +1000 (EST) Received: from localhost ([::1]:36170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzU0i-00049t-MX for incoming@patchwork.ozlabs.org; Thu, 09 Aug 2012 10:46:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzU0O-0003ka-RW for qemu-devel@nongnu.org; Thu, 09 Aug 2012 10:46:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzU0I-0000qo-PI for qemu-devel@nongnu.org; Thu, 09 Aug 2012 10:46:32 -0400 Received: from mail-gh0-f173.google.com ([209.85.160.173]:60799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzU0I-0000bU-L1 for qemu-devel@nongnu.org; Thu, 09 Aug 2012 10:46:26 -0400 Received: by mail-gh0-f173.google.com with SMTP id r17so492701ghr.4 for ; Thu, 09 Aug 2012 07:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=TiheGOvnBwePfxcQ4+Jpx0O9bV9Q4l+W/bwOYoMCgfQ=; b=l1BB0qQ6zY7twwOc/i1pg2oYz3qfYiNgwheuluwBrTgblI8W49yyWu6zD4B2o64jAe c725Cj86vEzgAf1wz2HsVAgSDbn8KKJ92JLSEfJUcAKncynU63t73gsJAoefoWF52cHY 0qvK5wyzjHfVdiEu/ToXtU3K1mbphzXk2qH407FwkLctuTvttWNmZFIYd0fdLp10h/Um YrGuReGY5lnxa7f6eWvrbI8vY5iOw0ORurm6LxrEHqL/oZP5J0fQMzu34rMBykk1dwEt 9o97zymUeiySKadqO+0qru/nUIQpYnkcpxohWw12garf7gWFkLK9afARsI9kMNebGrwV oLJw== Received: by 10.68.219.135 with SMTP id po7mr4550466pbc.149.1344523586002; Thu, 09 Aug 2012 07:46:26 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id qx8sm1265153pbc.63.2012.08.09.07.46.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Aug 2012 07:46:25 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 9 Aug 2012 16:45:57 +0200 Message-Id: <1344523557-28266-4-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1344523557-28266-1-git-send-email-pbonzini@redhat.com> References: <1344523557-28266-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.173 Cc: Jan Kiszka , Luigi Rizzo , Stefan Hajnoczi , Stefano Stabellini Subject: [Qemu-devel] [PATCH 3/3] 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 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 --- hw/xen_nic.c | 1 + 1 file modificati, 1 inserzioni(+) 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)