Displaying 20 results from an estimated 53 matches for "vring_alloc_queue".
2019 Oct 29
2
[RFC PATCH 0/2] virtio: allow per vq DMA domain
We used to have use a single parent for all DMA operations. This tends
to complicate the mdev based hardware virtio datapath offloading which
may not implement the control path over datapath like ctrl vq in the
case of virtio-net.
So this series tries to intorduce per DMA domain by allowing trasnport
to specify the parent device for each virtqueue. Then for the case of
virtio-mdev device, it can
2020 Apr 06
0
[PATCH v4 08/12] virtio_ring: switch to virtio_legacy_init/size
...44
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -867,8 +867,10 @@ static struct virtqueue *vring_create_virtqueue_split(
}
/* TODO: allocate each queue chunk individually */
- for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
- queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
+ for (; num && vring_legacy_size(num, vring_align) > PAGE_SIZE;
+ num /= 2) {
+ queue = vring_alloc_queue(vdev,
+ vring_legacy_size(num, vring_align),
&dma_addr,
GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);
if (queue)
@@ -88...
2020 Apr 06
0
[PATCH v5 08/12] virtio_ring: switch to virtio_legacy_init/size
...44
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -867,8 +867,10 @@ static struct virtqueue *vring_create_virtqueue_split(
}
/* TODO: allocate each queue chunk individually */
- for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
- queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
+ for (; num && vring_legacy_size(num, vring_align) > PAGE_SIZE;
+ num /= 2) {
+ queue = vring_alloc_queue(vdev,
+ vring_legacy_size(num, vring_align),
&dma_addr,
GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);
if (queue)
@@ -88...
2020 Apr 06
0
[PATCH v6 08/12] virtio_ring: switch to virtio_legacy_init/size
...44
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -867,8 +867,10 @@ static struct virtqueue *vring_create_virtqueue_split(
}
/* TODO: allocate each queue chunk individually */
- for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
- queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
+ for (; num && vring_legacy_size(num, vring_align) > PAGE_SIZE;
+ num /= 2) {
+ queue = vring_alloc_queue(vdev,
+ vring_legacy_size(num, vring_align),
&dma_addr,
GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);
if (queue)
@@ -88...
2020 Apr 07
0
[PATCH v7 12/19] virtio_ring: switch to virtio_legacy_init/size
...44
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -867,8 +867,10 @@ static struct virtqueue *vring_create_virtqueue_split(
}
/* TODO: allocate each queue chunk individually */
- for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
- queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
+ for (; num && vring_legacy_size(num, vring_align) > PAGE_SIZE;
+ num /= 2) {
+ queue = vring_alloc_queue(vdev,
+ vring_legacy_size(num, vring_align),
&dma_addr,
GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);
if (queue)
@@ -88...
2020 Apr 07
0
[PATCH v8 12/19] virtio_ring: switch to virtio_legacy_init/size
...44
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -867,8 +867,10 @@ static struct virtqueue *vring_create_virtqueue_split(
}
/* TODO: allocate each queue chunk individually */
- for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
- queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
+ for (; num && vring_legacy_size(num, vring_align) > PAGE_SIZE;
+ num /= 2) {
+ queue = vring_alloc_queue(vdev,
+ vring_legacy_size(num, vring_align),
&dma_addr,
GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);
if (queue)
@@ -88...
2020 Apr 06
0
[PATCH v4 08/12] virtio_ring: switch to virtio_legacy_init/size
...44
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -867,8 +867,10 @@ static struct virtqueue *vring_create_virtqueue_split(
}
/* TODO: allocate each queue chunk individually */
- for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
- queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
+ for (; num && vring_legacy_size(num, vring_align) > PAGE_SIZE;
+ num /= 2) {
+ queue = vring_alloc_queue(vdev,
+ vring_legacy_size(num, vring_align),
&dma_addr,
GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);
if (queue)
@@ -88...
2018 Mar 16
3
[PATCH RFC 2/2] virtio_ring: support packed ring
...a value greater than vq.num.
>
[...]
>> @@ -1096,17 +1599,21 @@ struct virtqueue *vring_create_virtqueue(
>>>>>>> if (!queue) {
>>>>>>> /* Try to get a single page. You are my only hope! */
>>>>>>> - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
>>>>>>> + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
>>>>>>> + packed),
>>>>>>> &dma_addr, GFP_KERNEL|__GFP_ZERO);
>>>>>>> }...
2018 Mar 16
3
[PATCH RFC 2/2] virtio_ring: support packed ring
...a value greater than vq.num.
>
[...]
>> @@ -1096,17 +1599,21 @@ struct virtqueue *vring_create_virtqueue(
>>>>>>> if (!queue) {
>>>>>>> /* Try to get a single page. You are my only hope! */
>>>>>>> - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
>>>>>>> + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
>>>>>>> + packed),
>>>>>>> &dma_addr, GFP_KERNEL|__GFP_ZERO);
>>>>>>> }...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...n NULL;
>>> }
>>> + packed = virtio_has_feature(vdev, VIRTIO_F_RING_PACKED);
>>> +
>>> /* TODO: allocate each queue chunk individually */
>>> - for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
>>> - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
>>> + for (; num && __vring_size(num, vring_align, packed) > PAGE_SIZE;
>>> + num /= 2) {
>>> + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
>>> + packed),
>>> &...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...n NULL;
>>> }
>>> + packed = virtio_has_feature(vdev, VIRTIO_F_RING_PACKED);
>>> +
>>> /* TODO: allocate each queue chunk individually */
>>> - for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
>>> - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
>>> + for (; num && __vring_size(num, vring_align, packed) > PAGE_SIZE;
>>> + num /= 2) {
>>> + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
>>> + packed),
>>> &...
2018 Mar 16
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...wrote:
> > > @@ -1096,17 +1599,21 @@ struct virtqueue *vring_create_virtqueue(
> > > > > > > > if (!queue) {
> > > > > > > > /* Try to get a single page. You are my only hope! */
> > > > > > > > - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
> > > > > > > > + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
> > > > > > > > + packed),
> > > > > > > > &dma_addr, GFP_KERNEL|__GFP_ZERO);
>...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...;>> + return -EIO;
>>>>> +}
> [...]
>>>>> @@ -1096,17 +1599,21 @@ struct virtqueue *vring_create_virtqueue(
>>>>> if (!queue) {
>>>>> /* Try to get a single page. You are my only hope! */
>>>>> - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
>>>>> + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
>>>>> + packed),
>>>>> &dma_addr, GFP_KERNEL|__GFP_ZERO);
>>>>> }
>>>>> if (!que...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...;>> + return -EIO;
>>>>> +}
> [...]
>>>>> @@ -1096,17 +1599,21 @@ struct virtqueue *vring_create_virtqueue(
>>>>> if (!queue) {
>>>>> /* Try to get a single page. You are my only hope! */
>>>>> - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
>>>>> + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
>>>>> + packed),
>>>>> &dma_addr, GFP_KERNEL|__GFP_ZERO);
>>>>> }
>>>>> if (!que...
2020 Jul 17
0
[PATCH] virtio_ring: use alloc_pages_node for NUMA-aware allocation
...COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All error/warnings (new ones prefixed by >>):
drivers/virtio/virtio_ring.c: In function 'vring_alloc_queue':
>> drivers/virtio/virtio_ring.c:280:52: error: passing argument 1 of 'dev_to_node' from incompatible pointer type [-Werror=incompatible-pointer-types]
280 | struct page *page = alloc_pages_node(dev_to_node(&vdev->dev.parent),
|...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...ue *vring_create_virtqueue(
> return NULL;
> }
>
> + packed = virtio_has_feature(vdev, VIRTIO_F_RING_PACKED);
> +
> /* TODO: allocate each queue chunk individually */
> - for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
> - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
> + for (; num && __vring_size(num, vring_align, packed) > PAGE_SIZE;
> + num /= 2) {
> + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
> + packed),
> &dma_addr,
> GFP_KERNEL|__GFP_...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...ue *vring_create_virtqueue(
> return NULL;
> }
>
> + packed = virtio_has_feature(vdev, VIRTIO_F_RING_PACKED);
> +
> /* TODO: allocate each queue chunk individually */
> - for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
> - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
> + for (; num && __vring_size(num, vring_align, packed) > PAGE_SIZE;
> + num /= 2) {
> + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
> + packed),
> &dma_addr,
> GFP_KERNEL|__GFP_...
2018 Mar 16
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...;
> > > > + return -EIO;
> > > > +}
[...]
> > > > @@ -1096,17 +1599,21 @@ struct virtqueue *vring_create_virtqueue(
> > > > if (!queue) {
> > > > /* Try to get a single page. You are my only hope! */
> > > > - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
> > > > + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
> > > > + packed),
> > > > &dma_addr, GFP_KERNEL|__GFP_ZERO);
> > > > }
> > > > if (!queue)
>...
2018 Mar 16
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...> +}
> > [...]
> > > > > > @@ -1096,17 +1599,21 @@ struct virtqueue *vring_create_virtqueue(
> > > > > > if (!queue) {
> > > > > > /* Try to get a single page. You are my only hope! */
> > > > > > - queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
> > > > > > + queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
> > > > > > + packed),
> > > > > > &dma_addr, GFP_KERNEL|__GFP_ZERO);
> > > > > >...
2018 Feb 23
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...1)) {
@@ -1082,9 +1581,13 @@ struct virtqueue *vring_create_virtqueue(
return NULL;
}
+ packed = virtio_has_feature(vdev, VIRTIO_F_RING_PACKED);
+
/* TODO: allocate each queue chunk individually */
- for (; num && vring_size(num, vring_align) > PAGE_SIZE; num /= 2) {
- queue = vring_alloc_queue(vdev, vring_size(num, vring_align),
+ for (; num && __vring_size(num, vring_align, packed) > PAGE_SIZE;
+ num /= 2) {
+ queue = vring_alloc_queue(vdev, __vring_size(num, vring_align,
+ packed),
&dma_addr,
GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);
if (queue...