Displaying 8 results from an estimated 8 matches for "vp_modern_get_queue_en".
2023 Mar 07
3
[PATCH 1/3] virtio_pci_modern: Remove unnecessary num zero check
...ci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -306,10 +306,10 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
return ERR_PTR(-EINVAL);
/* Check if queue is either not available or already active. */
- num = vp_modern_get_queue_size(mdev, index);
- if (!num || vp_modern_get_queue_enable(mdev, index))
+ if (vp_modern_get_queue_enable(mdev, index))
return ERR_PTR(-ENOENT);
+ num = vp_modern_get_queue_size(mdev, index);
if (!is_power_of_2(num)) {
dev_warn(&vp_dev->pci_dev->dev, "bad queue size %u", num);
return ERR_PTR(-EINVAL);
--
2.34.1
2023 Mar 08
1
[PATCH 1/3] virtio_pci_modern: Remove unnecessary num zero check
...@ -306,10 +306,10 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
> return ERR_PTR(-EINVAL);
>
> /* Check if queue is either not available or already active. */
> - num = vp_modern_get_queue_size(mdev, index);
> - if (!num || vp_modern_get_queue_enable(mdev, index))
> + if (vp_modern_get_queue_enable(mdev, index))
> return ERR_PTR(-ENOENT);
Spec allows non power of 2 size for packed virtqueue, so I think we
should fix it in this way.
"""
Queue Size corresponds to the maximum number of descriptors i...
2023 Mar 15
2
[PATCH v2 1/3] virtio_ring: Allow non power of 2 sizes for packed virtqueue
...a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index 9e496e288cfa..6e713904d8e8 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -310,11 +310,6 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
if (!num || vp_modern_get_queue_enable(mdev, index))
return ERR_PTR(-ENOENT);
- if (!is_power_of_2(num)) {
- dev_warn(&vp_dev->pci_dev->dev, "bad queue size %u", num);
- return ERR_PTR(-EINVAL);
- }
-
info->msix_vector = msix_vec;
/* create the vring */
--
2.34.1
2023 Mar 17
1
[PATCH v2 1/3] virtio_ring: Allow non power of 2 sizes for packed virtqueue
...dern.c b/drivers/virtio/virtio_pci_modern.c
> index 9e496e288cfa..6e713904d8e8 100644
> --- a/drivers/virtio/virtio_pci_modern.c
> +++ b/drivers/virtio/virtio_pci_modern.c
> @@ -310,11 +310,6 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
> if (!num || vp_modern_get_queue_enable(mdev, index))
> return ERR_PTR(-ENOENT);
>
> - if (!is_power_of_2(num)) {
> - dev_warn(&vp_dev->pci_dev->dev, "bad queue size %u", num);
> - return ERR_PTR(-EINVAL);
> - }
> -
> info->...
2023 Mar 07
3
[PATCH 0/3] virtio_ring: Clean up code for virtio ring and pci
This patch series performs a clean up of the code in virtio_ring and
virtio_pci, modifying it to conform with the Linux kernel coding style
guidance [1]. The modifications ensure the code easy to read and
understand. This small series does few short cleanups in the code.
Patch-1 Remove unnecessary num zero check, which performs in power_of_2.
Patch-2 Avoid using inline for small functions.
2023 Mar 10
1
[PATCH v2 1/3] virtio_pci_modern: Allow non power of 2 sizes for virtqueues
...a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index 9e496e288cfa..6e713904d8e8 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -310,11 +310,6 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
if (!num || vp_modern_get_queue_enable(mdev, index))
return ERR_PTR(-ENOENT);
- if (!is_power_of_2(num)) {
- dev_warn(&vp_dev->pci_dev->dev, "bad queue size %u", num);
- return ERR_PTR(-EINVAL);
- }
-
info->msix_vector = msix_vec;
/* create the vring */
--
2.34.1
2023 Mar 15
4
[PATCH v2 0/3] virtio_ring: Clean up code for virtio ring and pci
This patch series performs a clean up of the code in virtio_ring and
virtio_pci, modifying it to conform with the Linux kernel coding style
guidance [1]. The modifications ensure the code easy to read and
understand. This small series does few short cleanups in the code.
Patch-1 Allow non power of 2 sizes for packed virtqueues.
Patch-2 Avoid using inline for small functions.
Patch-3 Use const to
2023 Mar 10
4
[PATCH v2 0/3] virtio_ring: Clean up code for virtio ring and pci
This patch series performs a clean up of the code in virtio_ring and
virtio_pci, modifying it to conform with the Linux kernel coding style
guidance [1]. The modifications ensure the code easy to read and
understand. This small series does few short cleanups in the code.
Patch-1 Allow non power of 2 sizes for virtqueues
Patch-2 Avoid using inline for small functions.
Patch-3 Use const to annotate