summaryrefslogtreecommitdiffstats
path: root/tools/virtio
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2017-04-07 07:45:32 +0200
committerMichael S. Tsirkin <mst@redhat.com>2017-05-09 15:43:23 +0200
commit3008a206209fba670ab1da5590694a616b705efb (patch)
treecc3ad6507cb1de9428c570039f79bb5d14c31d92 /tools/virtio
parentringtest: support test specific parameters (diff)
downloadlinux-3008a206209fba670ab1da5590694a616b705efb.tar.xz
linux-3008a206209fba670ab1da5590694a616b705efb.zip
ptr_ring: support testing different batching sizes
Use the param flag for that. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/virtio')
-rw-r--r--tools/virtio/ringtest/ptr_ring.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
index 635b07b4fdd3..7b22f1b20652 100644
--- a/tools/virtio/ringtest/ptr_ring.c
+++ b/tools/virtio/ringtest/ptr_ring.c
@@ -97,6 +97,9 @@ void alloc_ring(void)
{
int ret = ptr_ring_init(&array, ring_size, 0);
assert(!ret);
+ /* Hacky way to poke at ring internals. Useful for testing though. */
+ if (param)
+ array.batch = param;
}
/* guest side */