[PATCH 3/3] ptr_ring: support testing different batching sizes
From: Michael S. Tsirkin
Date: Fri Apr 07 2017 - 01:50:43 EST
Use the param flag for that.
Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
---
tools/virtio/ringtest/ptr_ring.c | 3 +++
1 file changed, 3 insertions(+)
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 */
--
MST