diff options
author | Jason Wang <jasowang@redhat.com> | 2012-08-28 07:54:13 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-09-28 01:35:15 -0400 |
commit | 17bb6d40880d4178f5f8a75900ed8c9ff47d3fb2 (patch) | |
tree | f9888385b33c144f909eff14713a328dc72296f2 /drivers/lguest | |
parent | 7a23eb28fa645f1f0c2ec38274c11bc78c50c047 (diff) |
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 'drivers/lguest')
-rw-r--r-- | drivers/lguest/lguest_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index 9e8388efd88e..ccb7dfb028fa 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c | |||
@@ -296,7 +296,7 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev, | |||
296 | * to 'true': the host just a(nother) SMP CPU, so we only need inter-cpu | 296 | * to 'true': the host just a(nother) SMP CPU, so we only need inter-cpu |
297 | * barriers. | 297 | * barriers. |
298 | */ | 298 | */ |
299 | vq = vring_new_virtqueue(lvq->config.num, LGUEST_VRING_ALIGN, vdev, | 299 | vq = vring_new_virtqueue(index, lvq->config.num, LGUEST_VRING_ALIGN, vdev, |
300 | true, lvq->pages, lg_notify, callback, name); | 300 | true, lvq->pages, lg_notify, callback, name); |
301 | if (!vq) { | 301 | if (!vq) { |
302 | err = -ENOMEM; | 302 | err = -ENOMEM; |