diff mbox

[RFC,07/14] virtio-net: enable tx notification if up and vhost started

Message ID 1441753806-14225-8-git-send-email-marcandre.lureau@redhat.com
State New
Headers show

Commit Message

Marc-André Lureau Sept. 8, 2015, 11:09 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

When vhost is restarted, make sure the tx notification is on.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 hw/net/virtio-net.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

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);
+            }
         }
     }
 }