[SLOF] [PATCH v1 1/3] virtio-scsi: use idx during initialization

Thomas Huth thuth at redhat.com
Wed Feb 10 23:31:51 AEDT 2016


On 10.02.2016 10:05, Nikunj A Dadhania wrote:
> Fix the initialization of the virtqueues. It was always initializing the
> first virtqueue, while the objective is to init all the virtqueues.
> 
> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
> ---
>  lib/libvirtio/virtio-scsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/libvirtio/virtio-scsi.c b/lib/libvirtio/virtio-scsi.c
> index fd65a03..3128252 100644
> --- a/lib/libvirtio/virtio-scsi.c
> +++ b/lib/libvirtio/virtio-scsi.c
> @@ -123,7 +123,7 @@ int virtioscsi_init(struct virtio_device *dev)
>  			break;
>  		virtio_vring_size(qsize);
>  
> -		vq_avail = virtio_get_vring_avail(dev, 0);
> +		vq_avail = virtio_get_vring_avail(dev, idx);
>  		vq_avail->flags = VRING_AVAIL_F_NO_INTERRUPT;
>  		vq_avail->idx = 0;
>  		idx++;

Sounds reasonable.

Reviewed-by: Thomas Huth <thuth at redhat.com>



More information about the SLOF mailing list