aboutsummaryrefslogtreecommitdiffstats
path: root/tools/virtio/vringh_test.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-12-15tools/virtio: add virtio 1.0 in vringh_testMichael S. Tsirkin1-0/+2
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-12-15tools/virtio: 64 bit featuresMichael S. Tsirkin1-1/+1
Missed one place where vringh_test used long to pass features. Fix it up to u64. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-12-15tools/virtio: fix vringh testMichael S. Tsirkin1-0/+1
Include missing virtio_config.h Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-12-09virtio: use u32, not bitmap for featuresMichael S. Tsirkin1-8/+8
It seemed like a good idea to use bitmap for features in struct virtio_device, but it's actually a pain, and seems to become even more painful when we get more than 32 feature bits. Just change it to a u32 for now. Based on patch by Rusty. Suggested-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2013-10-29virtio_ring: change host notification APIHeinz Graalfs1-4/+9
Currently a host kick error is silently ignored and not reflected in the virtqueue of a particular virtio device. Changing the notify API for guest->host notification seems to be one prerequisite in order to be able to handle such errors in the context where the kick is triggered. This patch changes the notify API. The notify function must return a bool return value. It returns false if the host notification failed. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-03-20tools/virtio: remove virtqueue_add_buf() from tests.Rusty Russell1-10/+12
Make the rest of the paths use virtqueue_add_sgs or add_outbuf. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-03-20tools/virtio: make vringh_test use inbuf/outbuf.Rusty Russell1-4/+4
As expected, the simplified accessors are faster. for i in `seq 50`; do /usr/bin/time -f 'Wall time:%e' ./vringh_test --indirect --eventidx --parallel --fast-vringh; done 2>&1 | stats --trim-outliers: Before: Using CPUS 0 and 3 Guest: notified 0, pinged 39062-39063(39063) Host: notified 39062-39063(39063), pinged 0 Wall time:1.760000-2.220000(1.789167) After: Using CPUS 0 and 3 Guest: notified 0, pinged 39037-39063(39062) Host: notified 39037-39063(39062), pinged 0 Wall time:1.640000-1.810000(1.676875) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-03-20tools/virtio: add vring_test.Rusty Russell1-0/+739
This is mainly to test the drivers/vhost/vringh.c code, but it also uses the drivers/virtio/virtio_ring.c code for the guest side. Usage for testing the basic implementation: ./vringh_test # Test with indirect descriptors ./vringh_test --indirect # Test with indirect descriptors and event indexex ./vringh_test --indirect --eventidx You can run a parallel stress test by adding --parallel to any of the above options. eg ./vringh_test --parallel: Using CPUS 0 and 3 Guest: notified 10107974, pinged 107970 Host: notified 108158, pinged 3172148 ./vringh_test --indirect --eventidx --parallel: Using CPUS 0 and 3 Guest: notified 156357, pinged 156251 Host: notified 156251, pinged 78179 Average of 50 times doing ./vringh_test --indirect --eventidx --parallel: 2.840000-3.040000(2.927292)user Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>