Displaying 20 results from an estimated 252 matches for "virtqueue_add".
2023 May 17
2
[PATCH vhost v9 04/12] virtio_ring: virtqueue_add() support premapped
...irtio_ring.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 1ffab1eb40c0..e2fc50c05bec 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -2135,6 +2135,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
unsigned int in_sgs,
void *data,
void *ctx,
+ bool premapped,
gfp_t gfp)
{
struct vring_virtqueue *vq = to_vvq(_vq);
@@ -2176,7 +2177,7 @@ int virtqueue_add_sgs(struct virtqueue *_vq,
total_sg++;
}
return virtqueue_add(_vq, sgs, total_sg, out...
2016 Aug 02
3
[PATCH -next] virtio: fix possible memory leak in virtqueue_add()
desc may malloced in virtqueue_add() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.
Signed-off-by: Wei Yongjun <weiyj.lk at gmail.com>
---
drivers/virtio/virtio_ring.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virt...
2016 Aug 02
3
[PATCH -next] virtio: fix possible memory leak in virtqueue_add()
desc may malloced in virtqueue_add() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.
Signed-off-by: Wei Yongjun <weiyj.lk at gmail.com>
---
drivers/virtio/virtio_ring.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virt...
2016 Apr 08
1
[PATCH] drivers/virtio/virtio_ring.c: Deinline virtqueue_add, save 1016 bytes
...-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index e12e385..77a4771 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -126,7 +126,7 @@ static struct vring_desc *alloc_indirect(struct virtqueue *_vq,
return desc;
}
-static inline int virtqueue_add(struct virtqueue *_vq,
+static int virtqueue_add(struct virtqueue *_vq,
struct scatterlist *sgs[],
unsigned int total_sg,
unsigned int out_sgs,
--
2.1.0
2016 Apr 08
1
[PATCH] drivers/virtio/virtio_ring.c: Deinline virtqueue_add, save 1016 bytes
...-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index e12e385..77a4771 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -126,7 +126,7 @@ static struct vring_desc *alloc_indirect(struct virtqueue *_vq,
return desc;
}
-static inline int virtqueue_add(struct virtqueue *_vq,
+static int virtqueue_add(struct virtqueue *_vq,
struct scatterlist *sgs[],
unsigned int total_sg,
unsigned int out_sgs,
--
2.1.0
2014 Aug 26
0
[PATCH 1/3] virtio_ring: Remove sg_next indirection
...) {
+ for_each_sg(sgs[n], sg, total_in, j) {
+ if (!sg)
+ break;
desc[i].flags = VRING_DESC_F_NEXT|VRING_DESC_F_WRITE;
desc[i].addr = sg_phys(sg);
desc[i].len = sg->length;
@@ -186,8 +174,6 @@ static inline int vring_add_indirect(struct vring_virtqueue *vq,
static inline int virtqueue_add(struct virtqueue *_vq,
struct scatterlist *sgs[],
- struct scatterlist *(*next)
- (struct scatterlist *, unsigned int *),
unsigned int total_out,
unsigned int total_in,
unsigned int out_sgs,
@@ -197,7 +183,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
{...
2014 Sep 03
0
[PATCH 2/3] virtio_ring: assume sgs are always well-formed.
...xt(sg, &total_in)) {
+ for (sg = sgs[n]; sg; sg = sg_next(sg)) {
desc[i].flags = VRING_DESC_F_NEXT|VRING_DESC_F_WRITE;
desc[i].addr = sg_phys(sg);
desc[i].len = sg->length;
@@ -186,10 +168,7 @@ static inline int vring_add_indirect(struct vring_virtqueue *vq,
static inline int virtqueue_add(struct virtqueue *_vq,
struct scatterlist *sgs[],
- struct scatterlist *(*next)
- (struct scatterlist *, unsigned int *),
- unsigned int total_out,
- unsigned int total_in,
+ unsigned int total_sg,
unsigned int out_sgs,
unsigned int in_sgs,
void *data,
@@ -197,7...
2015 May 01
5
[RFC 0/4] rpmsg: Fix init of DMA:able virtqueues
...selectable by the framework. I was hoping that it would be possible
to use _any_ virtio based protocol to communicate with remote-proc/DMA and
not just rpmsg.
Thanks,
Edgar
Edgar E. Iglesias (4):
virtio_ring: Break out vring descriptor setup code
virtio_ring: Add option for DMA mapped sgs in virtqueue_add
virtio: Add dma variants of virtqueue_add_in and outbuf
rpmsg: DMA map sgs passed to virtio
drivers/rpmsg/virtio_rpmsg_bus.c | 28 ++++++++++++++++-----
drivers/virtio/virtio_ring.c | 53 +++++++++++++++++++++++++++++++---------
include/linux/virtio.h | 10 ++++++++
3 files chan...
2015 May 01
5
[RFC 0/4] rpmsg: Fix init of DMA:able virtqueues
...selectable by the framework. I was hoping that it would be possible
to use _any_ virtio based protocol to communicate with remote-proc/DMA and
not just rpmsg.
Thanks,
Edgar
Edgar E. Iglesias (4):
virtio_ring: Break out vring descriptor setup code
virtio_ring: Add option for DMA mapped sgs in virtqueue_add
virtio: Add dma variants of virtqueue_add_in and outbuf
rpmsg: DMA map sgs passed to virtio
drivers/rpmsg/virtio_rpmsg_bus.c | 28 ++++++++++++++++-----
drivers/virtio/virtio_ring.c | 53 +++++++++++++++++++++++++++++++---------
include/linux/virtio.h | 10 ++++++++
3 files chan...
2016 Apr 09
0
[PATCH] drivers/virtio/virtio_ring.c: Deinline virtqueue_add, save 1016 bytes
...ing.c b/drivers/virtio/virtio_ring.c
> index e12e385..77a4771 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -126,7 +126,7 @@ static struct vring_desc *alloc_indirect(struct virtqueue *_vq,
> return desc;
> }
>
> -static inline int virtqueue_add(struct virtqueue *_vq,
> +static int virtqueue_add(struct virtqueue *_vq,
> struct scatterlist *sgs[],
> unsigned int total_sg,
> unsigned int out_sgs,
> --
> 2.1.0
2016 Aug 02
0
[PATCH -next v2] virtio: fix possible memory leak in virtqueue_add()
'desc' is malloced in virtqueue_add() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.
Signed-off-by: Wei Yongjun <weiyj.lk at gmail.com>
---
drivers/virtio/virtio_ring.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/vi...
2017 Mar 29
2
[PATCH 3/6] virtio: allow extra context per descriptor
...de/linux/virtio.h | 9 ++++++
2 files changed, 66 insertions(+), 13 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index b23b5fa..5e1b548 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -263,6 +263,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
unsigned int out_sgs,
unsigned int in_sgs,
void *data,
+ void *ctx,
gfp_t gfp)
{
struct vring_virtqueue *vq = to_vvq(_vq);
@@ -275,6 +276,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
START_USE(vq);
BUG_ON(data == NULL);
+ BUG_ON(...
2017 Mar 29
2
[PATCH 3/6] virtio: allow extra context per descriptor
...de/linux/virtio.h | 9 ++++++
2 files changed, 66 insertions(+), 13 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index b23b5fa..5e1b548 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -263,6 +263,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
unsigned int out_sgs,
unsigned int in_sgs,
void *data,
+ void *ctx,
gfp_t gfp)
{
struct vring_virtqueue *vq = to_vvq(_vq);
@@ -275,6 +276,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
START_USE(vq);
BUG_ON(data == NULL);
+ BUG_ON(...
2014 Oct 12
0
[PATCH net-next RFC 1/3] virtio: support for urgent descriptors
...;
> vq->vring.desc[head].addr = virt_to_phys(desc);
> /* kmemleak gives a false positive, as it's hidden by virt_to_phys */
> kmemleak_ignore(desc);
> @@ -185,6 +188,7 @@ static inline int vring_add_indirect(struct vring_virtqueue *vq,
> }
>
> static inline int virtqueue_add(struct virtqueue *_vq,
> + bool urgent,
> struct scatterlist *sgs[],
> struct scatterlist *(*next)
> (struct scatterlist *, unsigned int *),
> @@ -227,7 +231,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
> /* If the host supports indirect...
2014 Sep 03
8
[PATCH 0/3] virtio: simplify virtio_ring.
...rrected these patches after prompting from Andy Lutomirski's
recent patches. I put them on the back-burner because vring_bench
had a 15% slowdown on my laptop: pktgen testing revealed a speedup,
if anything, so I've cleaned them up.
Rusty Russell (3):
virtio_net: pass well-formed sgs to virtqueue_add_*()
virtio_ring: assume sgs are always well-formed.
virtio_ring: unify direct/indirect code paths.
drivers/net/virtio_net.c | 5 +-
drivers/virtio/virtio_ring.c | 185 +++++++++++++++----------------------------
2 files changed, 69 insertions(+), 121 deletions(-)
--
1.9.1
2014 Sep 03
8
[PATCH 0/3] virtio: simplify virtio_ring.
...rrected these patches after prompting from Andy Lutomirski's
recent patches. I put them on the back-burner because vring_bench
had a 15% slowdown on my laptop: pktgen testing revealed a speedup,
if anything, so I've cleaned them up.
Rusty Russell (3):
virtio_net: pass well-formed sgs to virtqueue_add_*()
virtio_ring: assume sgs are always well-formed.
virtio_ring: unify direct/indirect code paths.
drivers/net/virtio_net.c | 5 +-
drivers/virtio/virtio_ring.c | 185 +++++++++++++++----------------------------
2 files changed, 69 insertions(+), 121 deletions(-)
--
1.9.1
2014 Oct 11
2
[PATCH net-next RFC 1/3] virtio: support for urgent descriptors
...[head].flags |= VRING_DESC_F_URGENT;
vq->vring.desc[head].addr = virt_to_phys(desc);
/* kmemleak gives a false positive, as it's hidden by virt_to_phys */
kmemleak_ignore(desc);
@@ -185,6 +188,7 @@ static inline int vring_add_indirect(struct vring_virtqueue *vq,
}
static inline int virtqueue_add(struct virtqueue *_vq,
+ bool urgent,
struct scatterlist *sgs[],
struct scatterlist *(*next)
(struct scatterlist *, unsigned int *),
@@ -227,7 +231,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
/* If the host supports indirect descriptor tables, and we hav...
2014 Oct 11
2
[PATCH net-next RFC 1/3] virtio: support for urgent descriptors
...[head].flags |= VRING_DESC_F_URGENT;
vq->vring.desc[head].addr = virt_to_phys(desc);
/* kmemleak gives a false positive, as it's hidden by virt_to_phys */
kmemleak_ignore(desc);
@@ -185,6 +188,7 @@ static inline int vring_add_indirect(struct vring_virtqueue *vq,
}
static inline int virtqueue_add(struct virtqueue *_vq,
+ bool urgent,
struct scatterlist *sgs[],
struct scatterlist *(*next)
(struct scatterlist *, unsigned int *),
@@ -227,7 +231,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
/* If the host supports indirect descriptor tables, and we hav...
2014 Aug 26
10
[PATCH 0/3] virtio: Clean up scatterlists and use the DMA API
This fixes virtio on Xen guests as well as on any other platform on
which physical addresses don't match bus addresses.
This can be tested with:
virtme-run --xen xen --kimg arch/x86/boot/bzImage --console
using virtme from here:
https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git
Without these patches, the guest hangs forever. With these patches,
everything works.
There
2014 Aug 26
10
[PATCH 0/3] virtio: Clean up scatterlists and use the DMA API
This fixes virtio on Xen guests as well as on any other platform on
which physical addresses don't match bus addresses.
This can be tested with:
virtme-run --xen xen --kimg arch/x86/boot/bzImage --console
using virtme from here:
https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git
Without these patches, the guest hangs forever. With these patches,
everything works.
There