search for: __vring_size

Displaying 20 results from an estimated 32 matches for "__vring_size".

Did you mean: __ring_size
2018 Mar 16
3
[PATCH RFC 2/2] virtio_ring: support packed ring
...e( >>>>>>> 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) >>>>>>> return NULL; >>>>&...
2018 Mar 16
3
[PATCH RFC 2/2] virtio_ring: support packed ring
...e( >>>>>>> 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) >>>>>>> return NULL; >>>>&...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...sc_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( >>>...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...sc_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( >>>...
2018 Mar 16
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...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) > > > > &g...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...t 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) >>>>> return NULL; >>>>> - queue_size_in_bytes = vring_size(num,...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...t 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) >>>>> return NULL; >>>>> - queue_size_in_bytes = vring_size(num,...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...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, > unsigned int num, > @@ -1074,7 +1...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...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, > unsigned int num, > @@ -1074,7 +1...
2018 Feb 23
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...- 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, unsigned int num, @@ -1074,7 +1572,8 @@ struct virtqueue *vring_create_virtqueue(...
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 Mar 16
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...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) > > > > return NULL; > > > > - queue_size_in_bytes = vring_size(num, vring_alig...
2018 May 22
0
[RFC v5 2/5] virtio_ring: support creating packed ring
...u_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 num, @@ -1072,7 +1322,8 @@ struct virtqueue *vring_create_virtqueue( void *queue =...
2018 Jul 11
0
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...u_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 num, @@ -1071,7 +1321,8 @@ struct virtqueue *vring_create_virtqueue( void *queue =...
2018 Mar 16
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...; > + 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, >...
2018 Mar 16
0
[PATCH RFC 2/2] virtio_ring: support packed ring
...> > > > > > 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) > > > > > > return NULL; > > > &...
2018 May 29
2
[RFC v5 2/5] virtio_ring: support creating packed ring
...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 num, > @@ -1072,7 +1322,8 @@ struct virtqueu...
2018 May 29
2
[RFC v5 2/5] virtio_ring: support creating packed ring
...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 num, > @@ -1072,7 +1322,8 @@ struct virtqueu...
2018 Apr 10
0
[RFC v2] virtio: support packed ring
...vring_desc_state)); > + memset(vq->desc_state, 0, num * sizeof(struct vring_desc_state)); > > return &vq->vq; > } > @@ -1056,6 +1717,22 @@ 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_packed_size(num, align) : vring_size(num, align); > +} > + > +static inline void vring_packed_init(struct vring_packed *vr, unsigned int num, > + void *p, unsigned long align) > +{ > +...
2018 Apr 13
0
[RFC v2] virtio: support packed ring
...vring_desc_state)); > + memset(vq->desc_state, 0, num * sizeof(struct vring_desc_state)); > > return &vq->vq; > } > @@ -1056,6 +1717,22 @@ 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_packed_size(num, align) : vring_size(num, align); > +} > + > +static inline void vring_packed_init(struct vring_packed *vr, unsigned int num, > + void *p, unsigned long align) > +{ > +...