search for: vdev_info

Displaying 20 results from an estimated 93 matches for "vdev_info".

2020 Apr 16
0
[PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.
.../tools/virtio/virtio_test.c > @@ -20,7 +20,6 @@ > #include "../../drivers/vhost/test.h" > > #define RANDOM_BATCH -1 > -#define RANDOM_RESET -1 > > /* Unused */ > void *__kmalloc_fake, *__kfree_ignore_start, *__kfree_ignore_end; > @@ -49,6 +48,7 @@ struct vdev_info { > > static const struct vhost_vring_file no_backend = { .fd = -1 }, > backend = { .fd = 1 }; > +static const struct vhost_vring_state null_state = {}; > > bool vq_notify(struct virtqueue *vq) > { > @@ -174,14 +174,19 @@ static void run_test(struct vdev_inf...
2020 Apr 17
0
[PATCH v2 7/8] tools/virtio: Reset index in virtio_test --reset.
..."../../drivers/vhost/test.h" > > > > > > #define RANDOM_BATCH -1 > > > -#define RANDOM_RESET -1 > > > > > > /* Unused */ > > > void *__kmalloc_fake, *__kfree_ignore_start, *__kfree_ignore_end; > > > @@ -49,6 +48,7 @@ struct vdev_info { > > > > > > static const struct vhost_vring_file no_backend = { .fd = -1 }, > > > backend = { .fd = 1 }; > > > +static const struct vhost_vring_state null_state = {}; > > > > > > bool vq_notify(struct virtq...
2020 Apr 02
0
[PATCH v4 7/7] tools/virtio: Make --reset reset ring idx
...+void virtqueue_reset_free_head(struct virtqueue *vq); > + > #endif > diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c > index 93d81cd64ba0..bf21ece30594 100644 > --- a/tools/virtio/virtio_test.c > +++ b/tools/virtio/virtio_test.c > @@ -49,6 +49,7 @@ struct vdev_info { > > static const struct vhost_vring_file no_backend = { .fd = -1 }, > backend = { .fd = 1 }; > +static const struct vhost_vring_state null_state = {}; > > bool vq_notify(struct virtqueue *vq) > { > @@ -218,10 +219,33 @@ static void run_test(struct vdev_inf...
2010 Nov 16
1
[PATCH RFC] tools/virtio: virtio_ring testing tool
...<linux/vhost.h> +#include <linux/virtio.h> +#include <linux/virtio_ring.h> +#include <vhost_null/null.h> + +struct vq_info { + int kick; + int call; + int num; + int idx; + void *ring; + /* copy used for control */ + struct vring vring; + struct virtqueue *vq; +}; + +struct vdev_info { + struct virtio_device vdev; + int control; + struct pollfd fds[1]; + struct vq_info vqs[1]; + int nvqs; + void *buf; + size_t buf_size; + struct vhost_memory *mem; +}; + +void vq_notify(struct virtqueue *vq) +{ + struct vq_info *info = vq->priv; + unsigned long long v = 1; + int r; + r = writ...
2010 Nov 16
1
[PATCH RFC] tools/virtio: virtio_ring testing tool
...<linux/vhost.h> +#include <linux/virtio.h> +#include <linux/virtio_ring.h> +#include <vhost_null/null.h> + +struct vq_info { + int kick; + int call; + int num; + int idx; + void *ring; + /* copy used for control */ + struct vring vring; + struct virtqueue *vq; +}; + +struct vdev_info { + struct virtio_device vdev; + int control; + struct pollfd fds[1]; + struct vq_info vqs[1]; + int nvqs; + void *buf; + size_t buf_size; + struct vhost_memory *mem; +}; + +void vq_notify(struct virtqueue *vq) +{ + struct vq_info *info = vq->priv; + unsigned long long v = 1; + int r; + r = writ...
2017 Apr 29
1
[PATCH] tools/virtio: fix spelling mistake: "wakeus" -> "wakeups"
.../virtio/virtio_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 76d6f583c249..0fecaec90d0d 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -202,7 +202,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq, test = 0; r = ioctl(dev->control, VHOST_TEST_RUN, &test); assert(r >= 0); - fprintf(stderr, "spurious wakeus: 0x%llx\n", spurious); + fprintf(stderr, "spurious wakeups: 0x%llx\n", spurious); } const char optstring[] = "h";...
2017 Apr 29
1
[PATCH] tools/virtio: fix spelling mistake: "wakeus" -> "wakeups"
.../virtio/virtio_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 76d6f583c249..0fecaec90d0d 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -202,7 +202,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq, test = 0; r = ioctl(dev->control, VHOST_TEST_RUN, &test); assert(r >= 0); - fprintf(stderr, "spurious wakeus: 0x%llx\n", spurious); + fprintf(stderr, "spurious wakeups: 0x%llx\n", spurious); } const char optstring[] = "h";...
2010 Nov 29
5
[PATCH 0/2] tools/virtio: virtio_ring testing tool
This implements a virtio simulator: - adds stubs for enough support functions to compile virtio ring in userspace. - Adds a stub vhost based module this can talk to. This should help us decide things like which ring layout works best. Communication is currently done using an eventfd descriptor. This means there's a shared spinlock there: what I would like to do in the future, is run
2010 Nov 29
5
[PATCH 0/2] tools/virtio: virtio_ring testing tool
This implements a virtio simulator: - adds stubs for enough support functions to compile virtio ring in userspace. - Adds a stub vhost based module this can talk to. This should help us decide things like which ring layout works best. Communication is currently done using an eventfd descriptor. This means there's a shared spinlock there: what I would like to do in the future, is run
2020 Apr 16
0
[PATCH v2 5/8] tools/virtio: Use __vring_new_virtqueue in virtio_test.c
...changed, 3 insertions(+), 4 deletions(-) > > diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c > index 1d5144590df6..d9827b640c21 100644 > --- a/tools/virtio/virtio_test.c > +++ b/tools/virtio/virtio_test.c > @@ -106,10 +106,9 @@ static void vq_info_add(struct vdev_info *dev, int num) > assert(r >= 0); > memset(info->ring, 0, vring_legacy_size(num, 4096)); > vring_legacy_init(&info->vring, num, info->ring, 4096); > - info->vq = vring_new_virtqueue(info->idx, > - info->vring.num, 4096, &dev->vdev, >...
2023 Mar 09
0
[PATCH] tools/virtio: virtio_test: Fix indentation
...on(-) Acked-by: Stefano Garzarella <sgarzare at redhat.com> > >diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c >index 6e348fbdc5d8..44409a311580 100644 >--- a/tools/virtio/virtio_test.c >+++ b/tools/virtio/virtio_test.c >@@ -134,7 +134,7 @@ static void vdev_info_init(struct vdev_info* dev, unsigned long long features) > dev->buf_size = 1024; > dev->buf = malloc(dev->buf_size); > assert(dev->buf); >- dev->control = open("/dev/vhost-test", O_RDWR); >+ dev->control = open("/dev/vhost-test", O_RDWR...
2017 Apr 17
0
[PATCH] tools/virtio: fix build breakage
...struct virtqueue *vq), void (*callback)(struct virtqueue *vq), diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index e0445898f08f..76d6f583c249 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -100,7 +100,7 @@ static void vq_info_add(struct vdev_info *dev, int num) vring_init(&info->vring, num, info->ring, 4096); info->vq = vring_new_virtqueue(info->idx, info->vring.num, 4096, &dev->vdev, - true, info->ring, + true, false, info->ring, vq_notify, vq_callback, "t...
2017 Apr 17
0
[PATCH] tools/virtio: fix build breakage
...struct virtqueue *vq), void (*callback)(struct virtqueue *vq), diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index e0445898f08f..76d6f583c249 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -100,7 +100,7 @@ static void vq_info_add(struct vdev_info *dev, int num) vring_init(&info->vring, num, info->ring, 4096); info->vq = vring_new_virtqueue(info->idx, info->vring.num, 4096, &dev->vdev, - true, info->ring, + true, false, info->ring, vq_notify, vq_callback, "t...
2014 Oct 07
0
[PATCH RFC 01/11] virtio: use u32, not bitmap for struct virtio_device's features
...st_bit((feature), (dev)->features) + ((dev)->features & (1 << feature)) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 00ea679..db3437c 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -60,7 +60,7 @@ void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) { struct vhost_vring_state state = { .index = info->idx }; struct vhost_vring_file file = { .index = info->idx }; - unsigned long long features = dev->vdev.features[0]; + unsigned long long features = dev->vdev.features; struct vhost_vring_addr addr =...
2014 Nov 24
0
[PATCH v3 01/41] virtio: use u32, not bitmap for struct virtio_device's features
...lear_bit(i, vdev->features); + vdev->features &= ~(1 << i); } } } diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 00ea679..db3437c 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -60,7 +60,7 @@ void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) { struct vhost_vring_state state = { .index = info->idx }; struct vhost_vring_file file = { .index = info->idx }; - unsigned long long features = dev->vdev.features[0]; + unsigned long long features = dev->vdev.features; struct vhost_vring_addr addr =...
2014 Nov 24
0
[PATCH v3 01/41] virtio: use u32, not bitmap for struct virtio_device's features
...lear_bit(i, vdev->features); + vdev->features &= ~(1 << i); } } } diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 00ea679..db3437c 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -60,7 +60,7 @@ void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) { struct vhost_vring_state state = { .index = info->idx }; struct vhost_vring_file file = { .index = info->idx }; - unsigned long long features = dev->vdev.features[0]; + unsigned long long features = dev->vdev.features; struct vhost_vring_addr addr =...
2014 Oct 22
0
[PATCH RFC v2 03/16] virtio: use u32, not bitmap for struct virtio_device's features
...lear_bit(i, vdev->features); + vdev->features &= ~(1 << i); } } } diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 00ea679..db3437c 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -60,7 +60,7 @@ void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) { struct vhost_vring_state state = { .index = info->idx }; struct vhost_vring_file file = { .index = info->idx }; - unsigned long long features = dev->vdev.features[0]; + unsigned long long features = dev->vdev.features; struct vhost_vring_addr addr =...
2014 Oct 22
0
[PATCH RFC v3 03/16] virtio: use u32, not bitmap for struct virtio_device's features
...lear_bit(i, vdev->features); + vdev->features &= ~(1 << i); } } } diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 00ea679..db3437c 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -60,7 +60,7 @@ void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) { struct vhost_vring_state state = { .index = info->idx }; struct vhost_vring_file file = { .index = info->idx }; - unsigned long long features = dev->vdev.features[0]; + unsigned long long features = dev->vdev.features; struct vhost_vring_addr addr =...
2014 Oct 23
0
[PATCH RFC v4 03/17] virtio: use u32, not bitmap for struct virtio_device's features
...lear_bit(i, vdev->features); + vdev->features &= ~(1 << i); } } } diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 00ea679..db3437c 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -60,7 +60,7 @@ void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) { struct vhost_vring_state state = { .index = info->idx }; struct vhost_vring_file file = { .index = info->idx }; - unsigned long long features = dev->vdev.features[0]; + unsigned long long features = dev->vdev.features; struct vhost_vring_addr addr =...
2014 Oct 22
0
[PATCH RFC v2 03/16] virtio: use u32, not bitmap for struct virtio_device's features
...lear_bit(i, vdev->features); + vdev->features &= ~(1 << i); } } } diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 00ea679..db3437c 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -60,7 +60,7 @@ void vhost_vq_setup(struct vdev_info *dev, struct vq_info *info) { struct vhost_vring_state state = { .index = info->idx }; struct vhost_vring_file file = { .index = info->idx }; - unsigned long long features = dev->vdev.features[0]; + unsigned long long features = dev->vdev.features; struct vhost_vring_addr addr =...