diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2013-03-20 15:44:26 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-03-20 15:44:52 +1030 |
commit | 282edb36499042a92b71f052f51754ae7ed936e4 (patch) | |
tree | 5031caab94e52b30e48515e881ea87a32daaeaeb /include/linux/virtio.h | |
parent | 13816c768d46586e925b22736992258d6105ad2c (diff) | |
download | lwn-282edb36499042a92b71f052f51754ae7ed936e4.tar.gz lwn-282edb36499042a92b71f052f51754ae7ed936e4.zip |
virtio_ring: virtqueue_add_outbuf / virtqueue_add_inbuf.
These are specialized versions of virtqueue_add_buf(), which cover
over 80% of cases and are far clearer.
In particular, the scatterlists passed to these functions don't have
to be clean (ie. we ignore end markers).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r-- | include/linux/virtio.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index ac80288b2920..833f17b6a743 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -41,6 +41,16 @@ int virtqueue_add_buf(struct virtqueue *vq, void *data, gfp_t gfp); +int virtqueue_add_outbuf(struct virtqueue *vq, + struct scatterlist sg[], unsigned int num, + void *data, + gfp_t gfp); + +int virtqueue_add_inbuf(struct virtqueue *vq, + struct scatterlist sg[], unsigned int num, + void *data, + gfp_t gfp); + int virtqueue_add_sgs(struct virtqueue *vq, struct scatterlist *sgs[], unsigned int out_sgs, |