libqos: Account for the ctrl queue in virtio-net
PATCH 1/1 libqos: Account for the ctrl queue in virtio-net
The number of queues is 2n+1, where n == 1 when multiqueue is disabled
---
I split this commit out of the fuzz patch-series.
tests/libqos/virtio-net.c | 1 + tests/libqos/virtio-net.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
tests/libqos/virtio-net.c +1 -0
@@ -53,6 +53,7 @@ static void virtio_net_setup(QVirtioNet *interface) }else { interface->n_queues =2 ; } + inteface->n_queues++;/* Account for the ctrl queue */ interface->queues = g_new(QVirtQueue *, interface->n_queues);for (i =0 ; i < interface->n_queues; i++) {
tests/libqos/virtio-net.h +1 -1
@@ -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; };
Signature · 1 line
2.20.1
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1 === TEST SCRIPT END ===
clang -iquote /tmp/qemu-test/build/. -iquote . -iquote /tmp/qemu-test/src/tcg -iquote /tmp/qemu-test/src/tcg/i386 -I/tmp/qemu-test/src/linux-headers -I/tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -I/tmp/qemu-test/src/tests/fp -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/include -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/8086-SSE -I/tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source -I/usr/include/pixman-1 -I/tmp/qemu-test/src/dtc/libfdt -Werror -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -DHW_POISON_H -DTARGET_ARM -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -DSOFTFLOAT_FAST_INT64 -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD -DLONG_DOUBLE_IS_EXTFLOAT80 -Wno-missing-prototypes -Wno-redundant-decls -Wno-return-type -Wno-error -MMD -MP -MT s_eq128.o -MF ./s_eq128.d -fsanitize=undefined -fsanitize=address -g -c -o s_eq128.o /tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/s_eq128.c
clang++ -L/tmp/qemu-test/build/dtc/libfdt -I/usr/include/pixman-1 -I/tmp/qemu-test/src/dtc/libfdt -Werror -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -I/tmp/qemu-test/src/tests -fsanitize=undefined -fsanitize=address -g -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g -o tests/check-qdict tests/check-qdict.o libqemuutil.a -lm -lz -pthread -lgthread-2.0 -lglib-2.0 -lnettle -lgnutls -lrt -lz -lutil -lcap-ng
clang++ -L/tmp/qemu-test/build/dtc/libfdt -I/usr/include/pixman-1 -I/tmp/qemu-test/src/dtc/libfdt -Werror -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wno-string-plus-int -Wno-typedef-redefinition -Wno-initializer-overrides -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/pixman-1 -I/tmp/qemu-test/src/tests -fsanitize=undefined -fsanitize=address -g -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g -o tests/check-block-qdict tests/check-block-qdict.o libqemuutil.a -lm -lz -pthread -lgthread-2.0 -lglib-2.0 -lnettle -lgnutls -lrt -lz -lutil -lcap-ng
/tmp/qemu-test/src/tests/libqos/virtio-net.c:56:5: error: use of undeclared identifier 'inteface'; did you mean 'interface'?
inteface->n_queues++; /* Account for the ctrl queue */
^~~~~~~~
interfaceThe full log is available at
http://patchew.org/logs/[email protected]/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Quoted 29 lines · Alexander
The number of queues is 2n+1, where n == 1 when multiqueue is disabled
Signed-off-by Alexander Oleinik <[email protected]>---
I split this commit out of the fuzz patch-series.
tests/libqos/virtio-net.c | 1 + tests/libqos/virtio-net.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)tests/libqos/virtio-net.c +1
-0@@ -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++) {tests/libqos/virtio-net.h +0
-0
tests/libqos/virtio-net.h typedef struct QVirtioNetDevice QVirtioNetDevice; · line 35
Quoted 8 lines
tests/libqos/virtio-net.h +1
-1@@ -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; };
Sorry about the typo.
Quoted 28 lines · Alexander
The number of queues is 2n+1, where n == 1 when multiqueue is disabled
Signed-off-by Alexander Oleinik <[email protected]>---
I split this commit out of the fuzz patch-series.
tests/libqos/virtio-net.c | 1 + tests/libqos/virtio-net.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)tests/libqos/virtio-net.c +1
-0@@ -53,6 +53,7 @@ static void virtio_net_setup(QVirtioNet *interface) }else { interface->n_queues =2 ; } + inteface->n_queues++;/* Account for the ctrl queue */ interface->queues = g_new(QVirtQueue *, interface->n_queues);for (i =0 ; i < interface->n_queues; i++) {tests/libqos/virtio-net.h +0
-0
tests/libqos/virtio-net.h typedef struct QVirtioNetDevice QVirtioNetDevice; · line 34
Quoted 7 lines
tests/libqos/virtio-net.h +1
-1@@ -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; };
FYI, I've queued this patch now in the qtest branch:
https://gitlab.com/huth/qemu/commits/qtest-next
(with the typo fixed, obviously)
Thomas