search for: vring_desc_st

Displaying 20 results from an estimated 76 matches for "vring_desc_st".

Did you mean: vring_desc_t
2016 Feb 02
1
[PATCH v6 6/9] virtio: Add improved queue allocation API
...int i; > + struct vring_virtqueue *vq; > > - /* We assume num is a power of 2. */ > - if (num & (num - 1)) { > - dev_warn(&vdev->dev, "Bad virtqueue length %u\n", num); > - return NULL; > - } > - > - vq = kmalloc(sizeof(*vq) + num * sizeof(struct vring_desc_state), > + vq = kmalloc(sizeof(*vq) + vring.num * sizeof(struct vring_desc_state), > GFP_KERNEL); > if (!vq) > return NULL; > > - vring_init(&vq->vring, num, pages, vring_align); > + vq->vring = vring; > vq->vq.callback = callback; > vq->v...
2016 Feb 02
1
[PATCH v6 6/9] virtio: Add improved queue allocation API
...int i; > + struct vring_virtqueue *vq; > > - /* We assume num is a power of 2. */ > - if (num & (num - 1)) { > - dev_warn(&vdev->dev, "Bad virtqueue length %u\n", num); > - return NULL; > - } > - > - vq = kmalloc(sizeof(*vq) + num * sizeof(struct vring_desc_state), > + vq = kmalloc(sizeof(*vq) + vring.num * sizeof(struct vring_desc_state), > GFP_KERNEL); > if (!vq) > return NULL; > > - vring_init(&vq->vring, num, pages, vring_align); > + vq->vring = vring; > vq->vq.callback = callback; > vq->v...
2014 Aug 27
2
[PATCH 2/3] virtio_ring: Use DMA APIs
...#include <linux/hrtimer.h> > #include <linux/kmemleak.h> > +#include <linux/dma-mapping.h> > > #ifdef DEBUG > /* For development, we want to crash whenever the ring is screwed. */ > @@ -54,6 +55,12 @@ > #define END_USE(vq) > #endif > > +struct vring_desc_state > +{ > + void *data; /* Data for callback. */ > + struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ > +}; > + > struct vring_virtqueue > { > struct virtqueue vq; > @@ -93,12 +100,45 @@ struct vring_virtqueue > ktime_t last_add_time; > #en...
2014 Aug 27
2
[PATCH 2/3] virtio_ring: Use DMA APIs
...#include <linux/hrtimer.h> > #include <linux/kmemleak.h> > +#include <linux/dma-mapping.h> > > #ifdef DEBUG > /* For development, we want to crash whenever the ring is screwed. */ > @@ -54,6 +55,12 @@ > #define END_USE(vq) > #endif > > +struct vring_desc_state > +{ > + void *data; /* Data for callback. */ > + struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ > +}; > + > struct vring_virtqueue > { > struct virtqueue vq; > @@ -93,12 +100,45 @@ struct vring_virtqueue > ktime_t last_add_time; > #en...
2016 Feb 01
0
[PATCH v6 6/9] virtio: Add improved queue allocation API
...) { - struct vring_virtqueue *vq; unsigned int i; + struct vring_virtqueue *vq; - /* We assume num is a power of 2. */ - if (num & (num - 1)) { - dev_warn(&vdev->dev, "Bad virtqueue length %u\n", num); - return NULL; - } - - vq = kmalloc(sizeof(*vq) + num * sizeof(struct vring_desc_state), + vq = kmalloc(sizeof(*vq) + vring.num * sizeof(struct vring_desc_state), GFP_KERNEL); if (!vq) return NULL; - vring_init(&vq->vring, num, pages, vring_align); + vq->vring = vring; vq->vq.callback = callback; vq->vq.vdev = vdev; vq->vq.name = name; - vq-...
2014 Aug 26
0
[PATCH 2/3] virtio_ring: Use DMA APIs
...-24,6 +24,7 @@ #include <linux/module.h> #include <linux/hrtimer.h> #include <linux/kmemleak.h> +#include <linux/dma-mapping.h> #ifdef DEBUG /* For development, we want to crash whenever the ring is screwed. */ @@ -54,6 +55,12 @@ #define END_USE(vq) #endif +struct vring_desc_state +{ + void *data; /* Data for callback. */ + struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ +}; + struct vring_virtqueue { struct virtqueue vq; @@ -93,12 +100,45 @@ struct vring_virtqueue ktime_t last_add_time; #endif - /* Tokens for callbacks. */ - void *data[]; + /...
2014 Aug 27
0
[PATCH 2/3] virtio_ring: Use DMA APIs
...ude <linux/kmemleak.h> > > +#include <linux/dma-mapping.h> > > > > #ifdef DEBUG > > /* For development, we want to crash whenever the ring is screwed. */ > > @@ -54,6 +55,12 @@ > > #define END_USE(vq) > > #endif > > > > +struct vring_desc_state > > +{ > > + void *data; /* Data for callback. */ > > + struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ > > +}; > > + > > struct vring_virtqueue > > { > > struct virtqueue vq; > > @@ -93,12 +100,45 @@ struct vring_virt...
2016 Feb 03
0
[PATCH v7 5/9] virtio_ring: Support DMA APIs
...-24,6 +24,7 @@ #include <linux/module.h> #include <linux/hrtimer.h> #include <linux/kmemleak.h> +#include <linux/dma-mapping.h> #ifdef DEBUG /* For development, we want to crash whenever the ring is screwed. */ @@ -54,6 +55,11 @@ #define END_USE(vq) #endif +struct vring_desc_state { + void *data; /* Data for callback. */ + struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ +}; + struct vring_virtqueue { struct virtqueue vq; @@ -98,8 +104,8 @@ struct vring_virtqueue { ktime_t last_add_time; #endif - /* Tokens for callbacks. */ - void *data[]; + /...
2018 May 29
2
[RFC v5 2/5] virtio_ring: support creating packed ring
...> 2 files changed, 546 insertions(+), 263 deletions(-) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index 71458f493cf8..f5ef5f42a7cf 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -61,11 +61,15 @@ struct vring_desc_state { > struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ > }; > > +struct vring_desc_state_packed { > + int next; /* The next desc state. */ > +}; > + > struct vring_virtqueue { > struct virtqueue vq; > > - /* Actual memory layout f...
2018 May 29
2
[RFC v5 2/5] virtio_ring: support creating packed ring
...> 2 files changed, 546 insertions(+), 263 deletions(-) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index 71458f493cf8..f5ef5f42a7cf 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -61,11 +61,15 @@ struct vring_desc_state { > struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ > }; > > +struct vring_desc_state_packed { > + int next; /* The next desc state. */ > +}; > + > struct vring_virtqueue { > struct virtqueue vq; > > - /* Actual memory layout f...
2018 May 22
0
[RFC v5 2/5] virtio_ring: support creating packed ring
...lude/linux/virtio_ring.h | 8 +- 2 files changed, 546 insertions(+), 263 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 71458f493cf8..f5ef5f42a7cf 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -61,11 +61,15 @@ struct vring_desc_state { struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ }; +struct vring_desc_state_packed { + int next; /* The next desc state. */ +}; + struct vring_virtqueue { struct virtqueue vq; - /* Actual memory layout for this queue */ - struct vring vring; + /* Is this a packed...
2018 Jul 11
0
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...lude/linux/virtio_ring.h | 8 +- 2 files changed, 546 insertions(+), 263 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 814b395007b2..c4f8abc7445a 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -60,11 +60,15 @@ struct vring_desc_state { struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ }; +struct vring_desc_state_packed { + int next; /* The next desc state. */ +}; + struct vring_virtqueue { struct virtqueue vq; - /* Actual memory layout for this queue */ - struct vring vring; + /* Is this a packed...
2016 Feb 03
1
[PATCH v7 5/9] virtio_ring: Support DMA APIs
...include <linux/hrtimer.h> > #include <linux/kmemleak.h> > +#include <linux/dma-mapping.h> > > #ifdef DEBUG > /* For development, we want to crash whenever the ring is screwed. */ > @@ -54,6 +55,11 @@ > #define END_USE(vq) > #endif > > +struct vring_desc_state { > + void *data; /* Data for callback. */ > + struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ > +}; > + > struct vring_virtqueue { > struct virtqueue vq; > > @@ -98,8 +104,8 @@ struct vring_virtqueue { > ktime_t last_add_time; > #endif &...
2016 Feb 03
1
[PATCH v7 5/9] virtio_ring: Support DMA APIs
...include <linux/hrtimer.h> > #include <linux/kmemleak.h> > +#include <linux/dma-mapping.h> > > #ifdef DEBUG > /* For development, we want to crash whenever the ring is screwed. */ > @@ -54,6 +55,11 @@ > #define END_USE(vq) > #endif > > +struct vring_desc_state { > + void *data; /* Data for callback. */ > + struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ > +}; > + > struct vring_virtqueue { > struct virtqueue vq; > > @@ -98,8 +104,8 @@ struct vring_virtqueue { > ktime_t last_add_time; > #endif &...
2015 Oct 30
1
[PATCH v4 2/6] virtio_ring: Support DMA APIs
...lt;linux/module.h> #include <linux/hrtimer.h> #include <linux/kmemleak.h> +#include <linux/dma-mapping.h> #ifdef DEBUG /* For development, we want to crash whenever the ring is screwed. */ @@ -54,7 +55,14 @@ #define END_USE(vq) #endif -struct vring_virtqueue { +struct vring_desc_state +{ + void *data; /* Data for callback. */ + struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ +}; + +struct vring_virtqueue +{ struct virtqueue vq; /* Actual memory layout for this queue */ @@ -92,12 +100,71 @@ struct vring_virtqueue { ktime_t last_add_time; #endif -...
2016 Feb 01
14
[PATCH v6 0/9] virtio DMA API, yet again
This switches virtio to use the DMA API on Xen and if requested by module option. This fixes virtio on Xen, and it should break anything because it's off by default on everything except Xen PV on x86. To the Xen people: is this okay? If it doesn't work on other Xen variants (PVH? HVM?), can you submit follow-up patches to fix it? To everyone else: we've waffled on this for way too
2016 Feb 01
14
[PATCH v6 0/9] virtio DMA API, yet again
This switches virtio to use the DMA API on Xen and if requested by module option. This fixes virtio on Xen, and it should break anything because it's off by default on everything except Xen PV on x86. To the Xen people: is this okay? If it doesn't work on other Xen variants (PVH? HVM?), can you submit follow-up patches to fix it? To everyone else: we've waffled on this for way too
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...changed, 618 insertions(+), 89 deletions(-) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index eb30f3e09a47..393778a2f809 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -58,14 +58,14 @@ > > struct vring_desc_state { > void *data; /* Data for callback. */ > - struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ > + void *indir_desc; /* Indirect descriptor, if any. */ > + int num; /* Descriptor list length. */ > }; > > struct vring_virtqueue { > struct...
2018 Mar 16
2
[PATCH RFC 2/2] virtio_ring: support packed ring
...changed, 618 insertions(+), 89 deletions(-) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index eb30f3e09a47..393778a2f809 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -58,14 +58,14 @@ > > struct vring_desc_state { > void *data; /* Data for callback. */ > - struct vring_desc *indir_desc; /* Indirect descriptor, if any. */ > + void *indir_desc; /* Indirect descriptor, if any. */ > + int num; /* Descriptor list length. */ > }; > > struct vring_virtqueue { > struct...
2016 Feb 03
14
[PATCH v7 0/9] virtio DMA API, yet again
This switches virtio to use the DMA API on Xen and if requested by module option. This fixes virtio on Xen, and it should break anything because it's off by default on everything except Xen PV on x86. To the Xen people: is this okay? If it doesn't work on other Xen variants (PVH? HVM?), can you submit follow-up patches to fix it? To everyone else: we've waffled on this for way too