diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-11-29 12:37:04 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-03-07 17:28:07 +0100 |
commit | eb5937bad691ed18a401079a0604aa11fea0ecdd (patch) | |
tree | a26310ca140c15230c51cceeebc538f7f55b7888 /tests/virtio-net-test.c | |
parent | 143e6db6fa4ecd2a85de740cc3754aeb86d1e802 (diff) |
tests/libqos: embed allocators instead of malloc-ing them separately
qgraph will embed these objects instead of allocating them in a separate
object. Expose a new API "generic_alloc_init" and "generic_alloc_destroy"
for that, and rename the existing API with s/init/new/ and s/uninit/free/.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/virtio-net-test.c')
-rw-r--r-- | tests/virtio-net-test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/virtio-net-test.c b/tests/virtio-net-test.c index d4a32a4c44..653148eeab 100644 --- a/tests/virtio-net-test.c +++ b/tests/virtio-net-test.c @@ -228,16 +228,16 @@ static void pci_basic(gconstpointer data) "virtio-net-pci,netdev=hs0", sv[1]); dev = virtio_net_pci_init(qs->pcibus, PCI_SLOT); - rx = (QVirtQueuePCI *)qvirtqueue_setup(&dev->vdev, qs->alloc, 0); - tx = (QVirtQueuePCI *)qvirtqueue_setup(&dev->vdev, qs->alloc, 1); + rx = (QVirtQueuePCI *)qvirtqueue_setup(&dev->vdev, &qs->alloc, 0); + tx = (QVirtQueuePCI *)qvirtqueue_setup(&dev->vdev, &qs->alloc, 1); driver_init(&dev->vdev); - func(&dev->vdev, qs->alloc, &rx->vq, &tx->vq, sv[0]); + func(&dev->vdev, &qs->alloc, &rx->vq, &tx->vq, sv[0]); /* End test */ close(sv[0]); - qvirtqueue_cleanup(dev->vdev.bus, &tx->vq, qs->alloc); - qvirtqueue_cleanup(dev->vdev.bus, &rx->vq, qs->alloc); + qvirtqueue_cleanup(dev->vdev.bus, &tx->vq, &qs->alloc); + qvirtqueue_cleanup(dev->vdev.bus, &rx->vq, &qs->alloc); qvirtio_pci_device_disable(dev); g_free(dev->pdev); g_free(dev); |