From 3008a206209fba670ab1da5590694a616b705efb Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Fri, 7 Apr 2017 08:45:32 +0300 Subject: ptr_ring: support testing different batching sizes Use the param flag for that. Signed-off-by: Michael S. Tsirkin --- tools/virtio/ringtest/ptr_ring.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/virtio/ringtest') diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c index 635b07b..7b22f1b 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 */ -- cgit v1.1