diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2011-05-20 02:11:05 +0300 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-05-30 11:14:15 +0930 |
commit | 4423fe40b03f32b11e72ecfa03077e702e55d5a9 (patch) | |
tree | 88c59c0b04cd8c960944504e2ff081be48996316 /tools | |
parent | 8ea8cf89e19aeb596b818ee5f2bec8a8b0586b60 (diff) | |
download | lwn-4423fe40b03f32b11e72ecfa03077e702e55d5a9.tar.gz lwn-4423fe40b03f32b11e72ecfa03077e702e55d5a9.zip |
virtio_test: support event index
Add ability to test the new event idx feature,
enable by default.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/virtio/virtio_test.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index df0c6d2c3860..74d3331bdaf9 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -198,6 +198,14 @@ const struct option longopts[] = { .val = 'h', }, { + .name = "event-idx", + .val = 'E', + }, + { + .name = "no-event-idx", + .val = 'e', + }, + { .name = "indirect", .val = 'I', }, @@ -211,13 +219,17 @@ const struct option longopts[] = { static void help() { - fprintf(stderr, "Usage: virtio_test [--help] [--no-indirect]\n"); + fprintf(stderr, "Usage: virtio_test [--help]" + " [--no-indirect]" + " [--no-event-idx]" + "\n"); } int main(int argc, char **argv) { struct vdev_info dev; - unsigned long long features = 1ULL << VIRTIO_RING_F_INDIRECT_DESC; + unsigned long long features = (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | + (1ULL << VIRTIO_RING_F_EVENT_IDX); int o; for (;;) { @@ -228,6 +240,9 @@ int main(int argc, char **argv) case '?': help(); exit(2); + case 'e': + features &= ~(1ULL << VIRTIO_RING_F_EVENT_IDX); + break; case 'h': help(); goto done; |