diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2016-02-01 11:17:58 +0530 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2016-02-08 16:40:38 +1100 |
commit | fdb62149dc88c8003f1c2273f6becca08629910a (patch) | |
tree | 6c1ae5e12ac0d35dd13ac2b532512707b59ed36c /lib/libvirtio/virtio.h | |
parent | b5a692d3f7c2cf3ca2eea5e9f8f99f0972cf56d1 (diff) | |
download | SLOF-fdb62149dc88c8003f1c2273f6becca08629910a.zip SLOF-fdb62149dc88c8003f1c2273f6becca08629910a.tar.gz SLOF-fdb62149dc88c8003f1c2273f6becca08629910a.tar.bz2 |
virtio-blk: add helpers for filling descriptors
Enable virtio_fill_desc/fill_blk_hdr with legacy and modern mode for
further use
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'lib/libvirtio/virtio.h')
-rw-r--r-- | lib/libvirtio/virtio.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libvirtio/virtio.h b/lib/libvirtio/virtio.h index e41f47d..c26282f 100644 --- a/lib/libvirtio/virtio.h +++ b/lib/libvirtio/virtio.h @@ -14,6 +14,7 @@ #define _LIBVIRTIO_H #include <stdint.h> +#include <stdbool.h> /* Device status bits */ #define VIRTIO_STAT_ACKNOWLEDGE 1 @@ -83,6 +84,9 @@ extern int virtio_get_qsize(struct virtio_device *dev, int queue); extern struct vring_desc *virtio_get_vring_desc(struct virtio_device *dev, int queue); extern struct vring_avail *virtio_get_vring_avail(struct virtio_device *dev, int queue); extern struct vring_used *virtio_get_vring_used(struct virtio_device *dev, int queue); +extern void virtio_fill_desc(struct vring_desc *desc, bool is_modern, + uint64_t addr, uint32_t len, + uint16_t flags, uint16_t next); extern int virtio_queue_init_vq(struct virtio_device *dev, struct vqs *vq, unsigned int id); extern void virtio_reset_device(struct virtio_device *dev); |