[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/9] libqos: Account for the ctrl queue in virtio-net
From: |
Thomas Huth |
Subject: |
[Qemu-devel] [PULL 2/9] libqos: Account for the ctrl queue in virtio-net |
Date: |
Thu, 15 Aug 2019 19:59:15 +0200 |
From: "Oleinik, Alexander" <address@hidden>
The number of queues is 2n+1, where n == 1 when multiqueue is disabled
Signed-off-by: Alexander Oleinik <address@hidden>
Message-Id: <address@hidden>
[thuth: fixed "intefaces" typo]
Signed-off-by: Thomas Huth <address@hidden>
---
tests/libqos/virtio-net.c | 1 +
tests/libqos/virtio-net.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/libqos/virtio-net.c b/tests/libqos/virtio-net.c
index 66405b646e..6567beb553 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 a5697d7326..855c67d00f 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;
};
--
2.18.1
- [Qemu-devel] [PULL 0/9] qtest patches, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 1/9] qtest: Rename qtest.c:qtest_init(), Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 2/9] libqos: Account for the ctrl queue in virtio-net,
Thomas Huth <=
- [Qemu-devel] [PULL 3/9] tests: Set read-zeroes on for null-co driver, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 5/9] tests/libqos: Make virtio-pci code independent from global_qtest, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 4/9] tests/libqos: Make generic virtio code independent from global_qtest, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 7/9] tests/libqtest: Clean up qtest_cb_for_every_machine() wrt global_qtest, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 6/9] tests/libqtest: Remove unused function hmp(), Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 9/9] tests/libqtest: Make qmp_assert_success() independent from global_qtest, Thomas Huth, 2019/08/15
- [Qemu-devel] [PULL 8/9] tests/libqtest: Make qtest_qmp_device_add/del independent from global_qtest, Thomas Huth, 2019/08/15
- Re: [Qemu-devel] [PULL 0/9] qtest patches, no-reply, 2019/08/15
- Re: [Qemu-devel] [PULL 0/9] qtest patches, Peter Maydell, 2019/08/16