diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2017-04-07 08:45:32 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-05-09 16:43:23 +0300 |
commit | 3008a206209fba670ab1da5590694a616b705efb (patch) | |
tree | cc3ad6507cb1de9428c570039f79bb5d14c31d92 /tools/virtio/ringtest/ptr_ring.c | |
parent | a49795054a0b2034ac50a2a894864fdb353addb5 (diff) | |
download | linux-3008a206209fba670ab1da5590694a616b705efb.tar.xz |
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/ringtest/ptr_ring.c')
-rw-r--r-- | tools/virtio/ringtest/ptr_ring.c | 3 |
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 */ |