diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2017-04-07 01:45:32 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-05-09 09:43:23 -0400 |
commit | 3008a206209fba670ab1da5590694a616b705efb (patch) | |
tree | cc3ad6507cb1de9428c570039f79bb5d14c31d92 | |
parent | a49795054a0b2034ac50a2a894864fdb353addb5 (diff) |
ptr_ring: support testing different batching sizes
Use the param flag for that.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-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) | |||
97 | { | 97 | { |
98 | int ret = ptr_ring_init(&array, ring_size, 0); | 98 | int ret = ptr_ring_init(&array, ring_size, 0); |
99 | assert(!ret); | 99 | assert(!ret); |
100 | /* Hacky way to poke at ring internals. Useful for testing though. */ | ||
101 | if (param) | ||
102 | array.batch = param; | ||
100 | } | 103 | } |
101 | 104 | ||
102 | /* guest side */ | 105 | /* guest side */ |