ptr_ring: support testing different batching sizes

Use the param flag for that.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Michael S. Tsirkin 2017-04-07 08:45:32 +03:00
parent a49795054a
commit 3008a20620

View file

@ -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 */