search for: vring_kick

Displaying 20 results from an estimated 28 matches for "vring_kick".

2013 Apr 05
1
Bug in SeaBIOS virtio-ring handling bug with vhost-scsi-pci
...r->num: 128 vring_add_buf, head: 0, index: 0 vring_add_buf, setting desc[prev=2].flags vring_add_buf, setting free_head: 3 vring_add_buf, setting q->vdata[head=0] vring_add_buf, setting q->ring[av=0] virtio_scsi_cmd, after vring_add_buf vr: 0x000ed404 vr->num: 128 virtio_scsi_cmd, after vring_kick vr: 0x000ed404 vr->num: 128 virtio_scsi_cmd, after vring_more_used #4 vr: 0x000ed404 vr->num: 1 ^^^^^^^^^^^^^^^^^^^^^^^^^ Reset from 128 to 1 immediate after first vring_more_used()..? vring_get_buf last_used_idx: 0 vr: 0x000ed404 vr->num:...
2013 Apr 05
1
Bug in SeaBIOS virtio-ring handling bug with vhost-scsi-pci
...r->num: 128 vring_add_buf, head: 0, index: 0 vring_add_buf, setting desc[prev=2].flags vring_add_buf, setting free_head: 3 vring_add_buf, setting q->vdata[head=0] vring_add_buf, setting q->ring[av=0] virtio_scsi_cmd, after vring_add_buf vr: 0x000ed404 vr->num: 128 virtio_scsi_cmd, after vring_kick vr: 0x000ed404 vr->num: 128 virtio_scsi_cmd, after vring_more_used #4 vr: 0x000ed404 vr->num: 1 ^^^^^^^^^^^^^^^^^^^^^^^^^ Reset from 128 to 1 immediate after first vring_more_used()..? vring_get_buf last_used_idx: 0 vr: 0x000ed404 vr->num:...
2009 Aug 18
2
[PATCH 1/2] virtio: Add a can_add_buf helper
...c int vring_add_buf(struct virtqueue *_vq, struct scatterlist sg[], unsigned int out, @@ -350,6 +357,7 @@ EXPORT_SYMBOL_GPL(vring_interrupt); static struct virtqueue_ops vring_vq_ops = { .add_buf = vring_add_buf, .get_buf = vring_get_buf, + .can_add_buf = vring_can_add_buf, .kick = vring_kick, .disable_cb = vring_disable_cb, .enable_cb = vring_enable_cb, diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 4fca4f5..cc0e3aa 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -35,6 +35,9 @@ struct virtqueue { * in_num: the number of sg which are writabl...
2009 Aug 18
2
[PATCH 1/2] virtio: Add a can_add_buf helper
...c int vring_add_buf(struct virtqueue *_vq, struct scatterlist sg[], unsigned int out, @@ -350,6 +357,7 @@ EXPORT_SYMBOL_GPL(vring_interrupt); static struct virtqueue_ops vring_vq_ops = { .add_buf = vring_add_buf, .get_buf = vring_get_buf, + .can_add_buf = vring_can_add_buf, .kick = vring_kick, .disable_cb = vring_disable_cb, .enable_cb = vring_enable_cb, diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 4fca4f5..cc0e3aa 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -35,6 +35,9 @@ struct virtqueue { * in_num: the number of sg which are writabl...
2008 Jan 08
1
[PATCH] Always notify a virtio_ring when it's full
...for it to happen in the notify(). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 7fa1c72..57b7ad3 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -146,7 +146,8 @@ static void vring_kick(struct virtqueue *_vq) /* Need to update avail index before checking if we should notify */ mb(); - if (!(vq->vring.used->flags & VRING_USED_F_NO_NOTIFY)) + /* Always notify when the queue is full */ + if (!(vq->vring.used->flags & VRING_USED_F_NO_NOTIFY) || !vq->num_fr...
2010 Jan 21
1
[PATCH] virtio: use smp_XX barriers
..._mb(); \ } while (0) #define END_USE(_vq) \ - do { BUG_ON(!(_vq)->in_use); (_vq)->in_use = 0; mb(); } while(0) + do { BUG_ON(!(_vq)->in_use); (_vq)->in_use = 0; smp_mb(); } while(0) #else #define BAD_RING(_vq, fmt, args...) \ do { \ @@ -221,13 +221,13 @@ static void vring_kick(struct virtqueue *_vq) START_USE(vq); /* Descriptors and available array need to be set before we expose the * new available array entries. */ - wmb(); + smp_wmb(); vq->vring.avail->idx += vq->num_added; vq->num_added = 0; /* Need to update avail index before checking i...
2008 Jan 08
1
[PATCH] Always notify a virtio_ring when it's full
...for it to happen in the notify(). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 7fa1c72..57b7ad3 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -146,7 +146,8 @@ static void vring_kick(struct virtqueue *_vq) /* Need to update avail index before checking if we should notify */ mb(); - if (!(vq->vring.used->flags & VRING_USED_F_NO_NOTIFY)) + /* Always notify when the queue is full */ + if (!(vq->vring.used->flags & VRING_USED_F_NO_NOTIFY) || !vq->num_fr...
2010 Jan 21
1
[PATCH] virtio: use smp_XX barriers
..._mb(); \ } while (0) #define END_USE(_vq) \ - do { BUG_ON(!(_vq)->in_use); (_vq)->in_use = 0; mb(); } while(0) + do { BUG_ON(!(_vq)->in_use); (_vq)->in_use = 0; smp_mb(); } while(0) #else #define BAD_RING(_vq, fmt, args...) \ do { \ @@ -221,13 +221,13 @@ static void vring_kick(struct virtqueue *_vq) START_USE(vq); /* Descriptors and available array need to be set before we expose the * new available array entries. */ - wmb(); + smp_wmb(); vq->vring.avail->idx += vq->num_added; vq->num_added = 0; /* Need to update avail index before checking i...
2009 Aug 19
1
[PATCH v2 1/2] virtio: Add a can_add_buf helper
...c int vring_add_buf(struct virtqueue *_vq, struct scatterlist sg[], unsigned int out, @@ -350,6 +357,7 @@ EXPORT_SYMBOL_GPL(vring_interrupt); static struct virtqueue_ops vring_vq_ops = { .add_buf = vring_add_buf, .get_buf = vring_get_buf, + .can_add_buf = vring_can_add_buf, .kick = vring_kick, .disable_cb = vring_disable_cb, .enable_cb = vring_enable_cb, diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 4fca4f5..cc0e3aa 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -35,6 +35,9 @@ struct virtqueue { * in_num: the number of sg which are writabl...
2009 Aug 19
1
[PATCH v2 1/2] virtio: Add a can_add_buf helper
...c int vring_add_buf(struct virtqueue *_vq, struct scatterlist sg[], unsigned int out, @@ -350,6 +357,7 @@ EXPORT_SYMBOL_GPL(vring_interrupt); static struct virtqueue_ops vring_vq_ops = { .add_buf = vring_add_buf, .get_buf = vring_get_buf, + .can_add_buf = vring_can_add_buf, .kick = vring_kick, .disable_cb = vring_disable_cb, .enable_cb = vring_enable_cb, diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 4fca4f5..cc0e3aa 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -35,6 +35,9 @@ struct virtqueue { * in_num: the number of sg which are writabl...
2010 Jan 29
3
[PATCH 0/2] virtio net improvements
Hi Dave, Nice driver optimization from Shirley, but requires a new virtio hook. Do you want to take both? I have nothing else overlapping it. Cheers, Rusty.
2010 Jan 29
3
[PATCH 0/2] virtio net improvements
Hi Dave, Nice driver optimization from Shirley, but requires a new virtio hook. Do you want to take both? I have nothing else overlapping it. Cheers, Rusty.
2010 Jan 27
1
[PATCHv2] virtio: use smp_XX barriers on SMP
...(); \ } while (0) #define END_USE(_vq) \ - do { BUG_ON(!(_vq)->in_use); (_vq)->in_use = 0; mb(); } while(0) + do { BUG_ON(!(_vq)->in_use); (_vq)->in_use = 0; virtio_mb(); } while(0) #else #define BAD_RING(_vq, fmt, args...) \ do { \ @@ -221,13 +239,13 @@ static void vring_kick(struct virtqueue *_vq) START_USE(vq); /* Descriptors and available array need to be set before we expose the * new available array entries. */ - wmb(); + virtio_wmb(); vq->vring.avail->idx += vq->num_added; vq->num_added = 0; /* Need to update avail index before checkin...
2010 Jan 27
1
[PATCHv2] virtio: use smp_XX barriers on SMP
...(); \ } while (0) #define END_USE(_vq) \ - do { BUG_ON(!(_vq)->in_use); (_vq)->in_use = 0; mb(); } while(0) + do { BUG_ON(!(_vq)->in_use); (_vq)->in_use = 0; virtio_mb(); } while(0) #else #define BAD_RING(_vq, fmt, args...) \ do { \ @@ -221,13 +239,13 @@ static void vring_kick(struct virtqueue *_vq) START_USE(vq); /* Descriptors and available array need to be set before we expose the * new available array entries. */ - wmb(); + virtio_wmb(); vq->vring.avail->idx += vq->num_added; vq->num_added = 0; /* Need to update avail index before checkin...
2010 Apr 12
10
[PATCH 0/6] virtio: virtqueue ops cleanup
virtqueue ops were introduced in the hope that we'll have multiple implementations besides virtio_ring, but none have surfaced so far, and given that existing virtio ring is deployed in production we are likely stuck with it now, so this layer just adds complexity and overhead. Further, the need to pass vq twice to each call (as in dev->vq->vq_ops->kick(dev->vq) ) adds potential
2010 Apr 12
10
[PATCH 0/6] virtio: virtqueue ops cleanup
virtqueue ops were introduced in the hope that we'll have multiple implementations besides virtio_ring, but none have surfaced so far, and given that existing virtio ring is deployed in production we are likely stuck with it now, so this layer just adds complexity and overhead. Further, the need to pass vq twice to each call (as in dev->vq->vq_ops->kick(dev->vq) ) adds potential
2009 Sep 21
0
[PATCH 2/6] virtio: make add_buf return capacity remaining
...+208,11 @@ add_head: pr_debug("Added buffer head %i to %p\n", head, vq); END_USE(vq); - return 0; + + /* If we're indirect, we can fit many (assuming not OOM). */ + if (vq->indirect) + return vq->num_free ? vq->vring.num : 0; + return vq->num_free; } static void vring_kick(struct virtqueue *_vq) diff --git a/include/linux/virtio.h b/include/linux/virtio.h --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -34,7 +34,7 @@ struct virtqueue { * out_num: the number of sg readable by other side * in_num: the number of sg which are writable (after readable one...
2009 Sep 21
0
[PATCH 2/6] virtio: make add_buf return capacity remaining
...+208,11 @@ add_head: pr_debug("Added buffer head %i to %p\n", head, vq); END_USE(vq); - return 0; + + /* If we're indirect, we can fit many (assuming not OOM). */ + if (vq->indirect) + return vq->num_free ? vq->vring.num : 0; + return vq->num_free; } static void vring_kick(struct virtqueue *_vq) diff --git a/include/linux/virtio.h b/include/linux/virtio.h --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -34,7 +34,7 @@ struct virtqueue { * out_num: the number of sg readable by other side * in_num: the number of sg which are writable (after readable one...
2008 Jan 23
2
[PATCH 1/2] reset support: make net driver alloc/cleanup in probe and remove
Since we want to reset the device to remove them, this is simpler (device is reset for us on driver remove). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/net/virtio_net.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff -r 7e5b3ff06f60 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Wed Jan 23 22:53:14
2008 Jan 23
2
[PATCH 1/2] reset support: make net driver alloc/cleanup in probe and remove
Since we want to reset the device to remove them, this is simpler (device is reset for us on driver remove). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/net/virtio_net.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff -r 7e5b3ff06f60 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Wed Jan 23 22:53:14