From mboxrd@z Thu Jan 1 00:00:00 1970 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) Sender: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= From: marcandre.lureau@redhat.com Date: Wed, 9 Sep 2015 01:09:59 +0200 Message-Id: <1441753806-14225-8-git-send-email-marcandre.lureau@redhat.com> 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH RFC 07/14] virtio-net: enable tx notification if up and vhost started List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mukawa@igel.co.jp, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , mst@redhat.com 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); + } } } } -- 2.4.3