search for: vring_alloc_queue_split

Displaying 8 results from an estimated 8 matches for "vring_alloc_queue_split".

2023 Mar 15
2
[PATCH v2 1/3] virtio_ring: Allow non power of 2 sizes for packed virtqueue
...it does not have to be a power of 2 for packed virtqueues. However, the virtio_pci_modern driver enforced a power of 2 check for virtqueue sizes, which is unnecessary and restrictive for packed virtuqueue. Split virtqueue still needs to check the virtqueue size is power_of_2 which has been done in vring_alloc_queue_split of the virtio_ring layer. To validate this change, we tested various virtqueue sizes for packed rings, including 128, 256, 512, 100, 200, 500, and 1000, with CONFIG_PAGE_POISONING enabled, and all tests passed successfully. Signed-off-by: Feng Liu <feliu at nvidia.com> Reviewed-by: Jiri Pir...
2023 Mar 17
1
[PATCH v2 1/3] virtio_ring: Allow non power of 2 sizes for packed virtqueue
...r of 2 for packed virtqueues. > However, the virtio_pci_modern driver enforced a power of 2 check for > virtqueue sizes, which is unnecessary and restrictive for packed > virtuqueue. > > Split virtqueue still needs to check the virtqueue size is power_of_2 > which has been done in vring_alloc_queue_split of the virtio_ring layer. > > To validate this change, we tested various virtqueue sizes for packed > rings, including 128, 256, 512, 100, 200, 500, and 1000, with > CONFIG_PAGE_POISONING enabled, and all tests passed successfully. > > Signed-off-by: Feng Liu <feliu at nvidia.c...
2023 May 26
1
[PATCH] virtio_ring: validate used buffer length
...acy devices are known to produce buggy used + * length. In order to let driver work, we won't validate used + * buffer length in this case. + */ + if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) + return false; + if (force_used_validation) + return true; + return false; +} + static int vring_alloc_queue_split(struct vring_virtqueue_split *vring_split, struct virtio_device *vdev, u32 num, @@ -1137,7 +1172,19 @@ static int vring_alloc_queue_split(struct vring_virtqueue_split *vring_split, vring_split->vring_align = vring_align; vring_split->may_reduce_num = may_reduce_num; + if...
2023 May 31
1
[PATCH] virtio_ring: validate used buffer length
...t; > > > > > + if (force_used_validation) > > > > > > > + return true; > > > > > > > + return false; > > > > > > > +} > > > > > > > + > > > > > > > static int vring_alloc_queue_split(struct vring_virtqueue_split *vring_split, > > > > > > > struct virtio_device *vdev, > > > > > > > u32 num, > > > > > > > @@ -1137,7 +1172,19 @@ static int vring_alloc_qu...
2023 May 31
1
[PATCH] virtio_ring: validate used buffer length
...t; + if (force_used_validation) > > > > > > > > + return true; > > > > > > > > + return false; > > > > > > > > +} > > > > > > > > + > > > > > > > > static int vring_alloc_queue_split(struct vring_virtqueue_split *vring_split, > > > > > > > > struct virtio_device *vdev, > > > > > > > > u32 num, > > > > > > > > @@ -1137,7 +1172,19 @@ static int...
2023 Jun 01
1
[PATCH] virtio_ring: validate used buffer length
...t; + if (force_used_validation) > > > > > > > > + return true; > > > > > > > > + return false; > > > > > > > > +} > > > > > > > > + > > > > > > > > static int vring_alloc_queue_split(struct vring_virtqueue_split *vring_split, > > > > > > > > struct virtio_device *vdev, > > > > > > > > u32 num, > > > > > > > > @@ -1137,7 +1172,19 @@ static int...
2023 Jun 01
1
[PATCH] virtio_ring: validate used buffer length
...alidation) > > > > > > > > > + return true; > > > > > > > > > + return false; > > > > > > > > > +} > > > > > > > > > + > > > > > > > > > static int vring_alloc_queue_split(struct vring_virtqueue_split *vring_split, > > > > > > > > > struct virtio_device *vdev, > > > > > > > > > u32 num, > > > > > > > > > @@ -1137,7 +1172,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