search for: viotest_dev

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

2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...uf->out); + + if (err) + return err; + + err = init_sg(&kaddbuf->sg, kaddbuf->kdata, kaddbuf->in + kaddbuf->out); + if (err) { + free_kvec(kaddbuf->kdata, kaddbuf->in + kaddbuf->out); + return err; + } + + return 0; +} + +static struct viotest_vq *get_virtqueue(struct viotest_dev *vtest, u32 vq_index) +{ + struct viotest_vq *vtvq; + + list_for_each_entry(vtvq, &vtest->vq_list, list) + if (vtvq->index == vq_index) + return vtvq; + + return ERR_PTR(-ENOENT); +} + +static int do_add_buf(struct viotest_dev *vtest, + struct viotest_kaddbuf *kaddbuf) +{ + in...
2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...uf->out); + + if (err) + return err; + + err = init_sg(&kaddbuf->sg, kaddbuf->kdata, kaddbuf->in + kaddbuf->out); + if (err) { + free_kvec(kaddbuf->kdata, kaddbuf->in + kaddbuf->out); + return err; + } + + return 0; +} + +static struct viotest_vq *get_virtqueue(struct viotest_dev *vtest, u32 vq_index) +{ + struct viotest_vq *vtvq; + + list_for_each_entry(vtvq, &vtest->vq_list, list) + if (vtvq->index == vq_index) + return vtvq; + + return ERR_PTR(-ENOENT); +} + +static int do_add_buf(struct viotest_dev *vtest, + struct viotest_kaddbuf *kaddbuf) +{ + in...