[virtio] Simplify virtqueue shutdown
authorLadi Prosek <lprosek@redhat.com>
Fri, 16 Dec 2016 12:31:22 +0000 (13:31 +0100)
committerMichael Brown <mcb30@ipxe.org>
Sun, 22 Jan 2017 13:20:42 +0000 (13:20 +0000)
commitb782a56be725569fb68f92b81a01903d1652c5b0
treec07056af08630fbdb6e0ea2c99c5245fb2e0f0fe
parente45451c6994f6e93729ee3860e45fa965483356f
[virtio] Simplify virtqueue shutdown

This commit introduces virtnet_free_virtqueues called on all virtqueue
error and shutdown paths. vpm_find_vqs no longer cleans up after itself
and instead expects virtnet_free_virtqueues to be always called to undo
its effect.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/bus/virtio-pci.c
src/drivers/net/virtio-net.c