tests/libqos/virtio-net.c | 1 + tests/libqos/virtio-net.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
The number of queues is 2n+1, where n == 1 when multiqueue is disabled
Signed-off-by: Alexander Oleinik <alxndr@bu.edu>
---
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(-)
diff --git a/tests/libqos/virtio-net.c b/tests/libqos/virtio-net.c
index 66405b646e..b8b5bc5dfc 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;
}
+ inteface->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.20.1
Patchew URL: https://patchew.org/QEMU/20190805032400.8054-1-alxndr@bu.edu/ 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 */ ^~~~~~~~ interface The full log is available at http://patchew.org/logs/20190805032400.8054-1-alxndr@bu.edu/testing.asan/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On Mon, 2019-08-05 at 03:24 +0000, Oleinik, Alexander wrote: > The number of queues is 2n+1, where n == 1 when multiqueue is > disabled > > Signed-off-by: Alexander Oleinik <alxndr@bu.edu> > --- > > 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(-) > > diff --git a/tests/libqos/virtio-net.c b/tests/libqos/virtio-net.c > index 66405b646e..b8b5bc5dfc 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; > }; > Sorry about the typo.
On 8/5/19 5:24 AM, Oleinik, Alexander wrote: > The number of queues is 2n+1, where n == 1 when multiqueue is disabled > > Signed-off-by: Alexander Oleinik <alxndr@bu.edu> > --- > > 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(-) > > diff --git a/tests/libqos/virtio-net.c b/tests/libqos/virtio-net.c > index 66405b646e..b8b5bc5dfc 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; > } > + inteface->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; > }; 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
© 2016 - 2024 Red Hat, Inc.