summaryrefslogtreecommitdiff
path: root/include/linux/virtio.h
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2012-08-28 15:54:13 +0400
committerRusty Russell <rusty@rustcorp.com.au>2012-09-28 09:35:15 +0400
commit17bb6d40880d4178f5f8a75900ed8c9ff47d3fb2 (patch)
treef9888385b33c144f909eff14713a328dc72296f2 /include/linux/virtio.h
parent7a23eb28fa645f1f0c2ec38274c11bc78c50c047 (diff)
downloadlinux-17bb6d40880d4178f5f8a75900ed8c9ff47d3fb2.tar.xz
virtio-ring: move queue_index to vring_virtqueue
Instead of storing the queue index in transport-specific virtio structs, this patch moves them to vring_virtqueue and introduces an helper to get the value. This lets drivers simplify their management and tracing of virtqueues. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r--include/linux/virtio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index a1ba8bbd9fbe..533b1157f22e 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -50,6 +50,8 @@ void *virtqueue_detach_unused_buf(struct virtqueue *vq);
unsigned int virtqueue_get_vring_size(struct virtqueue *vq);
+int virtqueue_get_queue_index(struct virtqueue *vq);
+
/**
* virtio_device - representation of a device using virtio
* @index: unique position on the virtio bus