diff options
-rw-r--r-- | tests/libqos/virtio-net.c | 1 | ||||
-rw-r--r-- | tests/libqos/virtio-net.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/libqos/virtio-net.c b/tests/libqos/virtio-net.c index 66405b6..6567beb 100644 --- a/tests/libqos/virtio-net.c +++ b/tests/libqos/virtio-net.c @@ -53,6 +53,7 @@ static void virtio_net_setup(QVirtioNet *interface) } else { interface->n_queues = 2; } + interface->n_queues++; /* Account for the ctrl queue */ interface->queues = g_new(QVirtQueue *, interface->n_queues); for (i = 0; i < interface->n_queues; i++) { diff --git a/tests/libqos/virtio-net.h b/tests/libqos/virtio-net.h index a5697d7..855c67d 100644 --- a/tests/libqos/virtio-net.h +++ b/tests/libqos/virtio-net.h @@ -29,7 +29,7 @@ typedef struct QVirtioNetDevice QVirtioNetDevice; struct QVirtioNet { QVirtioDevice *vdev; - int n_queues; + int n_queues; /* total number of virtqueues (rx, tx, ctrl) */ QVirtQueue **queues; }; |