summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2017-04-07 08:45:32 +0300
committerMichael S. Tsirkin <mst@redhat.com>2017-05-09 16:43:23 +0300
commit3008a206209fba670ab1da5590694a616b705efb (patch)
treecc3ad6507cb1de9428c570039f79bb5d14c31d92 /tools
parenta49795054a0b2034ac50a2a894864fdb353addb5 (diff)
downloadlinux-3008a206209fba670ab1da5590694a616b705efb.tar.bz2
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')
-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 */