search for: vring_free_queue

Displaying 20 results from an estimated 47 matches for "vring_free_queue".

2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...tio16(vdev, i + 1); >>> - memset(vq->desc_state, 0, vring.num * sizeof(struct vring_desc_state)); >>> + memset(vq->desc_state, 0, num * sizeof(struct vring_desc_state)); >>> return &vq->vq; >>> } >>> @@ -1058,6 +1548,14 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, >>> } >>> } >>> +static inline int >>> +__vring_size(unsigned int num, unsigned long align, bool packed) >>> +{ >>> + if (packed) >>> + return vring_packed_size(num, align); >>>...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...tio16(vdev, i + 1); >>> - memset(vq->desc_state, 0, vring.num * sizeof(struct vring_desc_state)); >>> + memset(vq->desc_state, 0, num * sizeof(struct vring_desc_state)); >>> return &vq->vq; >>> } >>> @@ -1058,6 +1548,14 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, >>> } >>> } >>> +static inline int >>> +__vring_size(unsigned int num, unsigned long align, bool packed) >>> +{ >>> + if (packed) >>> + return vring_packed_size(num, align); >>>...
2018 Nov 21
19
[PATCH net-next v3 00/13] virtio: support packed ring
Hi, This patch set implements packed ring support in virtio driver. A performance test between pktgen (pktgen_sample03_burst_single_flow.sh) and DPDK vhost (testpmd/rxonly/vhost-PMD) has been done, I saw ~30% performance gain in packed ring in this case. To make this patch set work with below patch set for vhost, some hacks are needed to set the _F_NEXT flag in indirect descriptors (this should
2018 Nov 21
19
[PATCH net-next v3 00/13] virtio: support packed ring
Hi, This patch set implements packed ring support in virtio driver. A performance test between pktgen (pktgen_sample03_burst_single_flow.sh) and DPDK vhost (testpmd/rxonly/vhost-PMD) has been done, I saw ~30% performance gain in packed ring in this case. To make this patch set work with below patch set for vhost, some hacks are needed to set the _F_NEXT flag in indirect descriptors (this should
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...gt;vring.desc[i].next = cpu_to_virtio16(vdev, i + 1); > - memset(vq->desc_state, 0, vring.num * sizeof(struct vring_desc_state)); > + memset(vq->desc_state, 0, num * sizeof(struct vring_desc_state)); > > return &vq->vq; > } > @@ -1058,6 +1548,14 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, > } > } > > +static inline int > +__vring_size(unsigned int num, unsigned long align, bool packed) > +{ > + if (packed) > + return vring_packed_size(num, align); > + return vring_size(num, align); > +} > + > str...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...gt;vring.desc[i].next = cpu_to_virtio16(vdev, i + 1); > - memset(vq->desc_state, 0, vring.num * sizeof(struct vring_desc_state)); > + memset(vq->desc_state, 0, num * sizeof(struct vring_desc_state)); > > return &vq->vq; > } > @@ -1058,6 +1548,14 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, > } > } > > +static inline int > +__vring_size(unsigned int num, unsigned long align, bool packed) > +{ > + if (packed) > + return vring_packed_size(num, align); > + return vring_size(num, align); > +} > + > str...
2018 Sep 12
1
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...; + context, notify, callback, name); > > > } > > > EXPORT_SYMBOL_GPL(vring_new_virtqueue); > > > > > > @@ -1142,7 +1408,9 @@ void vring_del_virtqueue(struct virtqueue *_vq) > > > > > > if (vq->we_own_ring) { > > > vring_free_queue(vq->vq.vdev, vq->queue_size_in_bytes, > > > - vq->vring.desc, vq->queue_dma_addr); > > > + vq->packed ? (void *)vq->vring_packed.desc : > > > + (void *)vq->vring.desc, > > > + vq->queue_dma_addr); > > > } &...
2020 Jul 21
0
[PATCH v2] virtio_ring: use alloc_pages_node for NUMA-aware allocation
...page = alloc_pages_node(dev_to_node(vdev->dev.parent), > + flag, get_order(size)); > + if (page) { > + queue = page_address(page); > phys_addr_t phys_addr = virt_to_phys(queue); > *dma_handle = (dma_addr_t)phys_addr; > > @@ -308,7 +310,7 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, > if (vring_use_dma_api(vdev)) > dma_free_coherent(vdev->dev.parent, size, queue, dma_handle); > else > - free_pages_exact(queue, PAGE_ALIGN(size)); > + free_pages((unsigned long)queue, get_order(size)); > } > > /* &gt...
2018 Sep 07
3
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...vring.num-1; i++) > - vq->vring.desc[i].next = cpu_to_virtio16(vdev, i + 1); > - memset(vq->desc_state, 0, vring.num * sizeof(struct vring_desc_state)); > - > return &vq->vq; > } > EXPORT_SYMBOL_GPL(__vring_new_virtqueue); > @@ -1055,6 +1299,12 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, > } > } > > +static inline int > +__vring_size(unsigned int num, unsigned long align, bool packed) > +{ > + return packed ? vring_size_packed(num, align) : vring_size(num, align); > +} > + > struct virtqueue *vring_create_...
2018 Sep 07
3
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...vring.num-1; i++) > - vq->vring.desc[i].next = cpu_to_virtio16(vdev, i + 1); > - memset(vq->desc_state, 0, vring.num * sizeof(struct vring_desc_state)); > - > return &vq->vq; > } > EXPORT_SYMBOL_GPL(__vring_new_virtqueue); > @@ -1055,6 +1299,12 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, > } > } > > +static inline int > +__vring_size(unsigned int num, unsigned long align, bool packed) > +{ > + return packed ? vring_size_packed(num, align) : vring_size(num, align); > +} > + > struct virtqueue *vring_create_...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
..., weak_barriers, context, >>>>> - notify, callback, name); >>>>> + vq = __vring_new_virtqueue(index, vring, packed, vdev, weak_barriers, >>>>> + context, notify, callback, name); >>>>> if (!vq) { >>>>> vring_free_queue(vdev, queue_size_in_bytes, queue, >>>>> dma_addr); > [...]
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
..., weak_barriers, context, >>>>> - notify, callback, name); >>>>> + vq = __vring_new_virtqueue(index, vring, packed, vdev, weak_barriers, >>>>> + context, notify, callback, name); >>>>> if (!vq) { >>>>> vring_free_queue(vdev, queue_size_in_bytes, queue, >>>>> dma_addr); > [...]
2018 Feb 23
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...i < vring.num-1; i++) - vq->vring.desc[i].next = cpu_to_virtio16(vdev, i + 1); - memset(vq->desc_state, 0, vring.num * sizeof(struct vring_desc_state)); + memset(vq->desc_state, 0, num * sizeof(struct vring_desc_state)); return &vq->vq; } @@ -1058,6 +1548,14 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, } } +static inline int +__vring_size(unsigned int num, unsigned long align, bool packed) +{ + if (packed) + return vring_packed_size(num, align); + return vring_size(num, align); +} + struct virtqueue *vring_create_virtqueue( unsigned int index, u...
2018 Feb 23
5
[PATCH RFC 0/2] Packed ring for virtio
Hello everyone, This RFC implements a subset of packed ring which is described at https://github.com/oasis-tcs/virtio-docs/blob/master/virtio-v1.1-packed-wd08.pdf The code was tested with DPDK vhost (testpmd/vhost-PMD) implemented by Jens at http://dpdk.org/ml/archives/dev/2018-January/089417.html Minor changes are needed for the vhost code, e.g. to kick the guest. It's not a complete
2018 May 22
0
[RFC v5 2/5] virtio_ring: support creating packed ring
...free_head = 0; - for (i = 0; i < vring.num-1; i++) - vq->vring.desc[i].next = cpu_to_virtio16(vdev, i + 1); - memset(vq->desc_state, 0, vring.num * sizeof(struct vring_desc_state)); - return &vq->vq; } EXPORT_SYMBOL_GPL(__vring_new_virtqueue); @@ -1056,6 +1300,12 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, } } +static inline int +__vring_size(unsigned int num, unsigned long align, bool packed) +{ + return packed ? vring_size_packed(num, align) : vring_size(num, align); +} + struct virtqueue *vring_create_virtqueue( unsigned int index, unsigned int nu...
2018 Jul 11
0
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...free_head = 0; - for (i = 0; i < vring.num-1; i++) - vq->vring.desc[i].next = cpu_to_virtio16(vdev, i + 1); - memset(vq->desc_state, 0, vring.num * sizeof(struct vring_desc_state)); - return &vq->vq; } EXPORT_SYMBOL_GPL(__vring_new_virtqueue); @@ -1055,6 +1299,12 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, } } +static inline int +__vring_size(unsigned int num, unsigned long align, bool packed) +{ + return packed ? vring_size_packed(num, align) : vring_size(num, align); +} + struct virtqueue *vring_create_virtqueue( unsigned int index, unsigned int nu...
2018 Mar 16
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...next = cpu_to_virtio16(vdev, i + 1); > > - memset(vq->desc_state, 0, vring.num * sizeof(struct vring_desc_state)); > > + memset(vq->desc_state, 0, num * sizeof(struct vring_desc_state)); > > return &vq->vq; > > } > > @@ -1058,6 +1548,14 @@ static void vring_free_queue(struct virtio_device *vdev, size_t size, > > } > > } > > +static inline int > > +__vring_size(unsigned int num, unsigned long align, bool packed) > > +{ > > + if (packed) > > + return vring_packed_size(num, align); > > + return vring_size(num, a...
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
2018 Mar 16
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...g, vdev, weak_barriers, context, > > > > - notify, callback, name); > > > > + vq = __vring_new_virtqueue(index, vring, packed, vdev, weak_barriers, > > > > + context, notify, callback, name); > > > > if (!vq) { > > > > vring_free_queue(vdev, queue_size_in_bytes, queue, > > > > dma_addr); [...]
2018 Sep 10
0
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...cked, vdev, weak_barriers, > > + context, notify, callback, name); > > } > > EXPORT_SYMBOL_GPL(vring_new_virtqueue); > > > > @@ -1142,7 +1408,9 @@ void vring_del_virtqueue(struct virtqueue *_vq) > > > > if (vq->we_own_ring) { > > vring_free_queue(vq->vq.vdev, vq->queue_size_in_bytes, > > - vq->vring.desc, vq->queue_dma_addr); > > + vq->packed ? (void *)vq->vring_packed.desc : > > + (void *)vq->vring.desc, > > + vq->queue_dma_addr); > > } > > list_del(&...