Skip to content

Commit b00c415

Browse files
Jiri Pirkomstsirkin
authored andcommitted
virtio_pci_modern: create admin queue of queried size
Don't limit the admin queue size to VIRTIO_AVQ_SGS_MAX and rather rely on the queried queue size. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Message-Id: <20240716113552.80599-11-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent af22bbe commit b00c415

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/virtio/virtio_pci_modern.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,7 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
550550
if (index >= vp_modern_get_num_queues(mdev) && !is_avq)
551551
return ERR_PTR(-EINVAL);
552552

553-
num = is_avq ?
554-
VIRTIO_AVQ_SGS_MAX : vp_modern_get_queue_size(mdev, index);
553+
num = vp_modern_get_queue_size(mdev, index);
555554
/* Check if queue is either not available or already active. */
556555
if (!num || vp_modern_get_queue_enable(mdev, index))
557556
return ERR_PTR(-ENOENT);

0 commit comments

Comments
 (0)