search for: free_id_packed

Displaying 4 results from an estimated 4 matches for "free_id_packed".

2018 May 16
0
[RFC v4 3/5] virtio_ring: add packed ring support
...HIGHMEM; + + desc = kmalloc(total_sg * sizeof(struct vring_packed_desc), gfp); + + return desc; +} + +static u16 alloc_id_packed(struct vring_virtqueue *vq) +{ + u16 id; + + id = idr_alloc(&vq->buffer_id, NULL, 0, vq->vring_packed.num, + GFP_KERNEL); + return id; +} + +static void free_id_packed(struct vring_virtqueue *vq, u16 id) +{ + idr_remove(&vq->buffer_id, id); +} + static inline int virtqueue_add_packed(struct virtqueue *_vq, struct scatterlist *sgs[], unsigned int total_sg, @@ -750,47 +819,446 @@ static inline int virtqueue_add_packed(struct virtqueu...
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...), gfp); > + > + return desc; > +} > + > +static u16 alloc_id_packed(struct vring_virtqueue *vq) > +{ > + u16 id; > + > + id = idr_alloc(&vq->buffer_id, NULL, 0, vq->vring_packed.num, > + GFP_KERNEL); > + return id; > +} > + > +static void free_id_packed(struct vring_virtqueue *vq, u16 id) > +{ > + idr_remove(&vq->buffer_id, id); > +} > + > static inline int virtqueue_add_packed(struct virtqueue *_vq, > struct scatterlist *sgs[], > unsigned int total_sg, > @@ -750,47 +819,446 @@ static inli...
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...), gfp); > + > + return desc; > +} > + > +static u16 alloc_id_packed(struct vring_virtqueue *vq) > +{ > + u16 id; > + > + id = idr_alloc(&vq->buffer_id, NULL, 0, vq->vring_packed.num, > + GFP_KERNEL); > + return id; > +} > + > +static void free_id_packed(struct vring_virtqueue *vq, u16 id) > +{ > + idr_remove(&vq->buffer_id, id); > +} > + > static inline int virtqueue_add_packed(struct virtqueue *_vq, > struct scatterlist *sgs[], > unsigned int total_sg, > @@ -750,47 +819,446 @@ static inli...
2018 May 16
8
[RFC v4 0/5] virtio: support packed ring
Hello everyone, This RFC implements packed ring support in virtio driver. Some simple functional tests have been done with Jason's packed ring implementation in vhost: https://lkml.org/lkml/2018/4/23/12 Both of ping and netperf worked as expected (with EVENT_IDX disabled). TODO: - Refinements (for code and commit log); - More tests; - Bug fixes; RFC v3 -> RFC v4: - Make ID allocation