diff options
author | Wei Wang <wei.w.wang@intel.com> | 2018-12-28 10:26:25 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2019-01-14 20:15:18 -0500 |
commit | ddbeac07a39a81d82331a312d0578fab94fccbf1 (patch) | |
tree | 97d92ef828e7250d9114c56178dba8c71d0ad611 /drivers/misc/mic | |
parent | d1c1dad89e7a8be2cfdc7b92deca2c8048f0d263 (diff) |
virtio_pci: use queue idx instead of array idx to set up the vq
When find_vqs, there will be no vq[i] allocation if its corresponding
names[i] is NULL. For example, the caller may pass in names[i] (i=4)
with names[2] being NULL because the related feature bit is turned off,
so technically there are 3 queues on the device, and name[4] should
correspond to the 3rd queue on the device.
So we use queue_idx as the queue index, which is increased only when the
queue exists.
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Diffstat (limited to 'drivers/misc/mic')
0 files changed, 0 insertions, 0 deletions