aboutsummaryrefslogtreecommitdiff
path: root/tests/virtio-net-test.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2018-10-22 12:37:21 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-03-07 17:28:42 +0100
commit6bd4a6d4b867fab1f94f9fe3d1b19d02ac3d684b (patch)
treee393625078c7e5be8fe90ea9836b7959533ce5a4 /tests/virtio-net-test.c
parent6ae333f91b99cc4448e6c0af45f38d87bc952c82 (diff)
tests/libqos: support multiqueue for virtio-net
Initialize the additional virtqueues if they are supported. This is needed to switch vhost-user-test's multiqueue test to the virtio-net qgraph. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/virtio-net-test.c')
-rw-r--r--tests/virtio-net-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/virtio-net-test.c b/tests/virtio-net-test.c
index 2d3630ca79..c58e670e2f 100644
--- a/tests/virtio-net-test.c
+++ b/tests/virtio-net-test.c
@@ -136,8 +136,8 @@ static void send_recv_test(void *obj, void *data, QGuestAllocator *t_alloc)
{
QVirtioNet *net_if = obj;
QVirtioDevice *dev = net_if->vdev;
- QVirtQueue *rx = net_if->rx;
- QVirtQueue *tx = net_if->tx;
+ QVirtQueue *rx = net_if->queues[0];
+ QVirtQueue *tx = net_if->queues[1];
int *sv = data;
rx_test(dev, t_alloc, rx, sv[0]);
@@ -148,7 +148,7 @@ static void stop_cont_test(void *obj, void *data, QGuestAllocator *t_alloc)
{
QVirtioNet *net_if = obj;
QVirtioDevice *dev = net_if->vdev;
- QVirtQueue *rx = net_if->rx;
+ QVirtQueue *rx = net_if->queues[0];
int *sv = data;
rx_stop_cont_test(dev, t_alloc, rx, sv[0]);