diff options
author | Jiri Pirko <jiri@nvidia.com> | 2024-07-16 13:35:49 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-17 05:43:21 -0400 |
commit | b00c4150c435eed6e80ab302ae3a02a3d41460c3 (patch) | |
tree | 2bf84e050536106f183b10b360cc25f8775a5cfa /drivers/virtio/virtio_pci_modern.c | |
parent | af22bbe1f4a514c80b89a27252beef033168f4e9 (diff) | |
download | lwn-b00c4150c435eed6e80ab302ae3a02a3d41460c3.tar.gz lwn-b00c4150c435eed6e80ab302ae3a02a3d41460c3.zip |
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>
Diffstat (limited to 'drivers/virtio/virtio_pci_modern.c')
-rw-r--r-- | drivers/virtio/virtio_pci_modern.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 5ceb4b2c18df..a649c9dc436d 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -550,8 +550,7 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev, if (index >= vp_modern_get_num_queues(mdev) && !is_avq) return ERR_PTR(-EINVAL); - num = is_avq ? - VIRTIO_AVQ_SGS_MAX : vp_modern_get_queue_size(mdev, index); + num = vp_modern_get_queue_size(mdev, index); /* Check if queue is either not available or already active. */ if (!num || vp_modern_get_queue_enable(mdev, index)) return ERR_PTR(-ENOENT); |