From patchwork Tue Sep 8 23:09:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 515630 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CC0DB140180 for ; Wed, 9 Sep 2015 09:15:21 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=kAQDJ2f0; dkim-atps=neutral Received: from localhost ([::1]:38440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZS6h-0002lB-RY for incoming@patchwork.ozlabs.org; Tue, 08 Sep 2015 19:15:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZS1u-0003oo-BX for qemu-devel@nongnu.org; Tue, 08 Sep 2015 19:10:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZS1s-0003ZK-MW for qemu-devel@nongnu.org; Tue, 08 Sep 2015 19:10:22 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:37895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZS1s-0003Yy-GU for qemu-devel@nongnu.org; Tue, 08 Sep 2015 19:10:20 -0400 Received: by wiclk2 with SMTP id lk2so2010922wic.1 for ; Tue, 08 Sep 2015 16:10:19 -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:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=CgqxLemT5BD3Sw7QnWCg+fm0oiKUoPxmhg8kI1PNpHw=; b=kAQDJ2f0bHkxGRbAuJsQLRXhxk/s+3UuvpO4l2vHqpP33va3WZHl9qVgg8X5pWFpd4 f9MvA3jjIOyd1oZ1AHaea7kbK3bXPrXRUzIV12b9SAe3If1bhqUkXEpO068c1seFVbYK Cly8STMUChBHWuwyB3WOKTO7VqA1QOxTt/WkGJKehVR9DPjWhvOpWqVtdrbX2wd1Nduu sb9J7C15gs+y+EzDD1UA67h8y1rh4hky4AK6wvzgdqIl67zn4Wfo7qlcohsq1VIDnYz3 7Sc60ol7ebUIqy8DF02S4EF2iKIqaommyjh2PT6W35cmWj56kehvl5c+i0j9HFBlDyEx DOwQ== X-Received: by 10.180.20.80 with SMTP id l16mr51549683wie.55.1441753819823; Tue, 08 Sep 2015 16:10:19 -0700 (PDT) Received: from localhost (bne75-h02-31-39-163-232.dsl.sta.abo.bbox.fr. [31.39.163.232]) by smtp.gmail.com with ESMTPSA id lh11sm737320wic.18.2015.09.08.16.10.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2015 16:10:19 -0700 (PDT) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Date: Wed, 9 Sep 2015 01:09:59 +0200 Message-Id: <1441753806-14225-8-git-send-email-marcandre.lureau@redhat.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1441753806-14225-1-git-send-email-marcandre.lureau@redhat.com> References: <1441753806-14225-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22b Cc: mukawa@igel.co.jp, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , mst@redhat.com Subject: [Qemu-devel] [PATCH RFC 07/14] virtio-net: enable tx notification if up and vhost started 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: Marc-André Lureau When vhost is restarted, make sure the tx notification is on. Signed-off-by: Marc-André Lureau --- hw/net/virtio-net.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 8d28e45..d494c45 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -195,6 +195,10 @@ static void virtio_net_set_status(struct VirtIODevice *vdev, uint8_t status) } else { qemu_bh_cancel(q->tx_bh); } + + if (n->vhost_started) { + virtio_queue_set_notification(q->tx_vq, 1); + } } } }