virtio-net: unify vhost-net start/stop
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 27 Sep 2010 16:41:30 +0000 (18:41 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 7 Oct 2010 10:19:47 +0000 (12:19 +0200)
commit272cf3f7d0602a3bd7c98964f59c0d8ad613d0f8
tree9028cc3991507e8600aacafc7ff85ec15f88f4ad
parent2a7873bd5c88dc28a46343606232c4776a20fc2b
virtio-net: unify vhost-net start/stop

Move all of vhost-net start/stop logic to a single routine,
and call it from everywhere.

Additionally, start/stop vhost-net on link up/down:
we should not transmit anything if user asked us to
put the link down.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
hw/virtio-net.c