search for: virtqueue_enable_cb

Displaying 20 results from an estimated 301 matches for "virtqueue_enable_cb".

2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...n 10/15/2014 05:34 PM, Michael S. Tsirkin wrote: >>> On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: >>>> This patch checks the new event idx to make sure used event idx never >>>> goes back. This is used to synchronize the calls between >>>> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). >>>> >>>> Cc: Rusty Russell <rusty at rustcorp.com.au> >>>> Cc: Michael S. Tsirkin <mst at redhat.com> >>>> Signed-off-by: Jason Wang <jasowang at redhat.com> >>> the implication being th...
2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...n 10/15/2014 05:34 PM, Michael S. Tsirkin wrote: >>> On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: >>>> This patch checks the new event idx to make sure used event idx never >>>> goes back. This is used to synchronize the calls between >>>> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). >>>> >>>> Cc: Rusty Russell <rusty at rustcorp.com.au> >>>> Cc: Michael S. Tsirkin <mst at redhat.com> >>>> Signed-off-by: Jason Wang <jasowang at redhat.com> >>> the implication being th...
2013 Jul 08
3
[PATCH 1/2] virtio: support unlocked queue poll
...) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 5217baf..37d58f8 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -607,19 +607,21 @@ void virtqueue_disable_cb(struct virtqueue *_vq) EXPORT_SYMBOL_GPL(virtqueue_disable_cb); /** - * virtqueue_enable_cb - restart callbacks after disable_cb. + * virtqueue_enable_cb_prepare - restart callbacks after disable_cb * @vq: the struct virtqueue we're talking about. * - * This re-enables callbacks; it returns "false" if there are pending - * buffers in the queue, to detect a possible race...
2013 Jul 08
3
[PATCH 1/2] virtio: support unlocked queue poll
...) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 5217baf..37d58f8 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -607,19 +607,21 @@ void virtqueue_disable_cb(struct virtqueue *_vq) EXPORT_SYMBOL_GPL(virtqueue_disable_cb); /** - * virtqueue_enable_cb - restart callbacks after disable_cb. + * virtqueue_enable_cb_prepare - restart callbacks after disable_cb * @vq: the struct virtqueue we're talking about. * - * This re-enables callbacks; it returns "false" if there are pending - * buffers in the queue, to detect a possible race...
2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
On 10/15/2014 05:34 PM, Michael S. Tsirkin wrote: > On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: >> This patch checks the new event idx to make sure used event idx never >> goes back. This is used to synchronize the calls between >> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). >> >> Cc: Rusty Russell <rusty at rustcorp.com.au> >> Cc: Michael S. Tsirkin <mst at redhat.com> >> Signed-off-by: Jason Wang <jasowang at redhat.com> > the implication being that moving event idx back might cause som...
2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
On 10/15/2014 05:34 PM, Michael S. Tsirkin wrote: > On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: >> This patch checks the new event idx to make sure used event idx never >> goes back. This is used to synchronize the calls between >> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). >> >> Cc: Rusty Russell <rusty at rustcorp.com.au> >> Cc: Michael S. Tsirkin <mst at redhat.com> >> Signed-off-by: Jason Wang <jasowang at redhat.com> > the implication being that moving event idx back might cause som...
2013 Mar 11
1
Opposite return values in vringh_notify_enable_kern() and virtqueue_enable_cb().
...ing NAPI wrong due to this. /** * vringh_notify_enable_kern - we want to know if something changes. * @vrh: the vring. * * This always enables notifications, but returns true if there are * now more buffers available in the vring. */ bool vringh_notify_enable_kern(struct vringh *vrh) /** * virtqueue_enable_cb - restart callbacks after disable_cb. * @vq: the struct virtqueue we're talking about. * * This re-enables callbacks; it returns "false" if there are pending * buffers in the queue, .... */ bool virtqueue_enable_cb(struct virtqueue *_vq) Regards. Sjur
2013 Mar 11
1
Opposite return values in vringh_notify_enable_kern() and virtqueue_enable_cb().
...ing NAPI wrong due to this. /** * vringh_notify_enable_kern - we want to know if something changes. * @vrh: the vring. * * This always enables notifications, but returns true if there are * now more buffers available in the vring. */ bool vringh_notify_enable_kern(struct vringh *vrh) /** * virtqueue_enable_cb - restart callbacks after disable_cb. * @vq: the struct virtqueue we're talking about. * * This re-enables callbacks; it returns "false" if there are pending * buffers in the queue, .... */ bool virtqueue_enable_cb(struct virtqueue *_vq) Regards. Sjur
2015 Feb 10
4
[PATCH RFC v5 net-next 1/6] virtio_ring: fix virtqueue_enable_cb() when only 1 buffers were pending
...->idx - last_used_idx) * 3 / 4; > > This is ok now since we only try to enable the delayed callbacks when > the queue is about to be full. This may not work well when there is > only one pending buffer in the virtqueue (this may be the case after > tx interrupt was enabled). Since virtqueue_enable_cb() will return > false which may cause unnecessary triggering of napis. This patch > correct this by only calculate the four thirds when bufs is not one. I mildly prefer to avoid the branch, by changing the calculation like so: /* Set bufs >= 1, even if there's only one pendin...
2015 Feb 10
4
[PATCH RFC v5 net-next 1/6] virtio_ring: fix virtqueue_enable_cb() when only 1 buffers were pending
...->idx - last_used_idx) * 3 / 4; > > This is ok now since we only try to enable the delayed callbacks when > the queue is about to be full. This may not work well when there is > only one pending buffer in the virtqueue (this may be the case after > tx interrupt was enabled). Since virtqueue_enable_cb() will return > false which may cause unnecessary triggering of napis. This patch > correct this by only calculate the four thirds when bufs is not one. I mildly prefer to avoid the branch, by changing the calculation like so: /* Set bufs >= 1, even if there's only one pendin...
2014 Oct 15
0
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...rote: > On 10/15/2014 05:34 PM, Michael S. Tsirkin wrote: > > On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: > >> This patch checks the new event idx to make sure used event idx never > >> goes back. This is used to synchronize the calls between > >> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). > >> > >> Cc: Rusty Russell <rusty at rustcorp.com.au> > >> Cc: Michael S. Tsirkin <mst at redhat.com> > >> Signed-off-by: Jason Wang <jasowang at redhat.com> > > the implication being that moving event...
2015 Feb 10
0
[PATCH RFC v5 net-next 1/6] virtio_ring: fix virtqueue_enable_cb() when only 1 buffers were pending
...* 3 / 4; > > > > This is ok now since we only try to enable the delayed callbacks when > > the queue is about to be full. This may not work well when there is > > only one pending buffer in the virtqueue (this may be the case after > > tx interrupt was enabled). Since virtqueue_enable_cb() will return > > false which may cause unnecessary triggering of napis. This patch > > correct this by only calculate the four thirds when bufs is not one. > > I mildly prefer to avoid the branch, by changing the calculation like > so: > > /* Set bufs >= 1,...
2015 Feb 10
0
[PATCH RFC v5 net-next 1/6] virtio_ring: fix virtqueue_enable_cb() when only 1 buffers were pending
...* 3 / 4; > > > > This is ok now since we only try to enable the delayed callbacks when > > the queue is about to be full. This may not work well when there is > > only one pending buffer in the virtqueue (this may be the case after > > tx interrupt was enabled). Since virtqueue_enable_cb() will return > > false which may cause unnecessary triggering of napis. This patch > > correct this by only calculate the four thirds when bufs is not one. > > I mildly prefer to avoid the branch, by changing the calculation like > so: > > /* Set bufs >= 1,...
2014 Oct 15
0
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...M, Michael S. Tsirkin wrote: > >>> On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: > >>>> This patch checks the new event idx to make sure used event idx never > >>>> goes back. This is used to synchronize the calls between > >>>> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). > >>>> > >>>> Cc: Rusty Russell <rusty at rustcorp.com.au> > >>>> Cc: Michael S. Tsirkin <mst at redhat.com> > >>>> Signed-off-by: Jason Wang <jasowang at redhat.com> > >>>...
2013 Jul 09
0
[PATCH v2 1/2] virtio: support unlocked queue poll
...) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 5217baf..37d58f8 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -607,19 +607,21 @@ void virtqueue_disable_cb(struct virtqueue *_vq) EXPORT_SYMBOL_GPL(virtqueue_disable_cb); /** - * virtqueue_enable_cb - restart callbacks after disable_cb. + * virtqueue_enable_cb_prepare - restart callbacks after disable_cb * @vq: the struct virtqueue we're talking about. * - * This re-enables callbacks; it returns "false" if there are pending - * buffers in the queue, to detect a possible race...
2013 Jul 09
0
[PATCH v2 1/2] virtio: support unlocked queue poll
...) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 5217baf..37d58f8 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -607,19 +607,21 @@ void virtqueue_disable_cb(struct virtqueue *_vq) EXPORT_SYMBOL_GPL(virtqueue_disable_cb); /** - * virtqueue_enable_cb - restart callbacks after disable_cb. + * virtqueue_enable_cb_prepare - restart callbacks after disable_cb * @vq: the struct virtqueue we're talking about. * - * This re-enables callbacks; it returns "false" if there are pending - * buffers in the queue, to detect a possible race...
2015 Feb 09
0
[PATCH RFC v5 net-next 1/6] virtio_ring: fix virtqueue_enable_cb() when only 1 buffers were pending
...tly does: bufs = (avail->idx - last_used_idx) * 3 / 4; This is ok now since we only try to enable the delayed callbacks when the queue is about to be full. This may not work well when there is only one pending buffer in the virtqueue (this may be the case after tx interrupt was enabled). Since virtqueue_enable_cb() will return false which may cause unnecessary triggering of napis. This patch correct this by only calculate the four thirds when bufs is not one. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/virtio/virtio_ring.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)...
2015 Feb 09
0
[PATCH RFC v5 net-next 1/6] virtio_ring: fix virtqueue_enable_cb() when only 1 buffers were pending
...tly does: bufs = (avail->idx - last_used_idx) * 3 / 4; This is ok now since we only try to enable the delayed callbacks when the queue is about to be full. This may not work well when there is only one pending buffer in the virtqueue (this may be the case after tx interrupt was enabled). Since virtqueue_enable_cb() will return false which may cause unnecessary triggering of napis. This patch correct this by only calculate the four thirds when bufs is not one. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/virtio/virtio_ring.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)...
2013 Jul 27
1
Merge of "virtio_net: fix race in RX VQ processing" for linux-3.2.48
On Fri, 2013-07-12 at 23:13 +0200, Wolfram Gloger wrote: > Hi, > > Today I merged M. Tsirkin's patch v2 "virtio_net: fix race in RX VQ > processing": > > http://lkml.indiana.edu/hypermail/linux/kernel/1307.1/00503.html > > into 3.2.48 and lightly tested the result (vhost-net, virtio-disk > and 9pfs using virtio). This sounds like it could be suitable
2013 Jul 27
1
Merge of "virtio_net: fix race in RX VQ processing" for linux-3.2.48
On Fri, 2013-07-12 at 23:13 +0200, Wolfram Gloger wrote: > Hi, > > Today I merged M. Tsirkin's patch v2 "virtio_net: fix race in RX VQ > processing": > > http://lkml.indiana.edu/hypermail/linux/kernel/1307.1/00503.html > > into 3.2.48 and lightly tested the result (vhost-net, virtio-disk > and 9pfs using virtio). This sounds like it could be suitable