search for: viotest_getbuf

Displaying 2 results from an estimated 2 matches for "viotest_getbuf".

2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...rn 0; +} + +static void free_kaddbuf_element(struct viotest_kaddbuf *kaddbuf) +{ + free_kvec(kaddbuf->kdata, kaddbuf->in + kaddbuf->out); + sg_free_table(&kaddbuf->sg); + list_del(&kaddbuf->list); + kfree(kaddbuf); +} + +static int do_get_buf(struct viotest_dev *vtest, struct viotest_getbuf __user *arg) +{ + int err; + struct viotest_vq *vtvq; + struct viotest_kaddbuf *kaddbuf; + struct viotest_getbuf getbuf; + unsigned int len; + + + if (copy_from_user(&getbuf, (struct viotest_getbuf __user *)arg, sizeof(struct viotest_getbuf))) + return -EFAULT; + + vtvq = get_virtqueue(vtest,...
2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...rn 0; +} + +static void free_kaddbuf_element(struct viotest_kaddbuf *kaddbuf) +{ + free_kvec(kaddbuf->kdata, kaddbuf->in + kaddbuf->out); + sg_free_table(&kaddbuf->sg); + list_del(&kaddbuf->list); + kfree(kaddbuf); +} + +static int do_get_buf(struct viotest_dev *vtest, struct viotest_getbuf __user *arg) +{ + int err; + struct viotest_vq *vtvq; + struct viotest_kaddbuf *kaddbuf; + struct viotest_getbuf getbuf; + unsigned int len; + + + if (copy_from_user(&getbuf, (struct viotest_getbuf __user *)arg, sizeof(struct viotest_getbuf))) + return -EFAULT; + + vtvq = get_virtqueue(vtest,...