search for: vringh_notify_enable_kern

Displaying 14 results from an estimated 14 matches for "vringh_notify_enable_kern".

2013 Mar 11
1
Opposite return values in vringh_notify_enable_kern() and virtqueue_enable_cb().
...in vringh and virtqueue for turning on interrupts has opposite return values if there are buffers available in the ring. I think it would be better if these two functions aligned the use of return values. Maybe it's just me, but I got the logic for re-scheduling 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. *...
2013 Mar 11
1
Opposite return values in vringh_notify_enable_kern() and virtqueue_enable_cb().
...in vringh and virtqueue for turning on interrupts has opposite return values if there are buffers available in the ring. I think it would be better if these two functions aligned the use of return values. Maybe it's just me, but I got the logic for re-scheduling 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. *...
2013 Mar 22
2
[PATCH virtio-next 1/2] caif_virtio: Use vringh_notify_enable correctly
Check on the correct return value from vringh_notify_enable_kern(). It returns false if more packets are available, not true. Signed-off-by: Sjur Br?ndeland <sjur.brandeland at stericsson.com> --- Hi, This patch applies to Rusty's virtio-next branch. Thanks, Sjur drivers/net/caif/caif_virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-...
2013 Mar 22
2
[PATCH virtio-next 1/2] caif_virtio: Use vringh_notify_enable correctly
Check on the correct return value from vringh_notify_enable_kern(). It returns false if more packets are available, not true. Signed-off-by: Sjur Br?ndeland <sjur.brandeland at stericsson.com> --- Hi, This patch applies to Rusty's virtio-next branch. Thanks, Sjur drivers/net/caif/caif_virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-...
2013 Jan 17
8
[PATCH 1/6] virtio_host: host-side implementation of virtio rings.
...have written. + * @notify: set if we should notify the other side, otherwise left alone. + */ +int vringh_complete_kern(struct vringh *vrh, u16 head, u32 len, + bool *notify) +{ + return __vringh_complete(vrh, head, len, + getu16_kern, putu16_kern, putused_kern, + notify); +} + +/** + * 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) +{ + return __vringh_notify_enable(vrh, getu16_kern, putu16_ker...
2013 Jan 17
8
[PATCH 1/6] virtio_host: host-side implementation of virtio rings.
...have written. + * @notify: set if we should notify the other side, otherwise left alone. + */ +int vringh_complete_kern(struct vringh *vrh, u16 head, u32 len, + bool *notify) +{ + return __vringh_complete(vrh, head, len, + getu16_kern, putu16_kern, putused_kern, + notify); +} + +/** + * 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) +{ + return __vringh_notify_enable(vrh, getu16_kern, putu16_ker...
2013 Feb 12
3
[PATCHv2 vringh 0/3] Introduce CAIF Virtio driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> This driver depends on Rusty's new host virtio ring implementation, so this patch-set is based on the vringh branch in Rusty's git. Changes since V1: - Use the new iov helper functions, and simplify iov handling. However this triggers compile warnings, as it takes struct iov while kernel api uses struct kiov - Introduced
2013 Feb 12
3
[PATCHv2 vringh 0/3] Introduce CAIF Virtio driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> This driver depends on Rusty's new host virtio ring implementation, so this patch-set is based on the vringh branch in Rusty's git. Changes since V1: - Use the new iov helper functions, and simplify iov handling. However this triggers compile warnings, as it takes struct iov while kernel api uses struct kiov - Introduced
2013 Feb 10
3
[PATCH vringh 0/2] Introduce CAIF Virtio driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> This patch-set introduces the CAIF Virtio Link layer driver. This driver depends on Rusty's new host virtio ring implementation, so this patch-set is based on the vringh branch in Rusty's git. Regards, Sjur cc: Rusty Russell <rusty at rustcorp.com.au> cc: Ohad Ben-Cohen <ohad at wizery.com> cc: David S. Miller
2013 Feb 10
3
[PATCH vringh 0/2] Introduce CAIF Virtio driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> This patch-set introduces the CAIF Virtio Link layer driver. This driver depends on Rusty's new host virtio ring implementation, so this patch-set is based on the vringh branch in Rusty's git. Regards, Sjur cc: Rusty Russell <rusty at rustcorp.com.au> cc: Ohad Ben-Cohen <ohad at wizery.com> cc: David S. Miller
2013 Mar 15
4
[PATCHv3 vringh] caif_virtio: Introduce caif over virtio
...+= skb_len; + } + + ++riov->i; + ++rxcnt; + } while (rxcnt < quota); + + ++cfv->stats.rx_napi_resched; + goto out; + +exit: + switch (err) { + case 0: + ++cfv->stats.rx_napi_complete; + + /* Really out of patckets? (stolen from virtio_net)*/ + napi_complete(napi); + if (unlikely(vringh_notify_enable_kern(cfv->vr_rx)) && + napi_schedule_prep(napi)) { + vringh_notify_disable_kern(cfv->vr_rx); + __napi_schedule(napi); + goto again; + } + break; + + case -ENOMEM: + ++cfv->stats.rx_nomem; + dev_kfree_skb(skb); + /* Stop NAPI poll on OOM, we hope to be polled later */ +...
2013 Mar 15
4
[PATCHv3 vringh] caif_virtio: Introduce caif over virtio
...+= skb_len; + } + + ++riov->i; + ++rxcnt; + } while (rxcnt < quota); + + ++cfv->stats.rx_napi_resched; + goto out; + +exit: + switch (err) { + case 0: + ++cfv->stats.rx_napi_complete; + + /* Really out of patckets? (stolen from virtio_net)*/ + napi_complete(napi); + if (unlikely(vringh_notify_enable_kern(cfv->vr_rx)) && + napi_schedule_prep(napi)) { + vringh_notify_disable_kern(cfv->vr_rx); + __napi_schedule(napi); + goto again; + } + break; + + case -ENOMEM: + ++cfv->stats.rx_nomem; + dev_kfree_skb(skb); + /* Stop NAPI poll on OOM, we hope to be polled later */ +...
2013 Feb 18
9
[PATCH 0/5] vringh
This introduces vringh, which are generic accessors for virtio rings (host side). There's a host-side implementation in vhost, but it assumes that the rings are in userspace, and is tied to the vhost implementation. I have patches to adapt it to use vringh, but I'm pushing this in the next merge window for Sjur, who has CAIF patches which need it. This also includes a test program in
2013 Feb 18
9
[PATCH 0/5] vringh
This introduces vringh, which are generic accessors for virtio rings (host side). There's a host-side implementation in vhost, but it assumes that the rings are in userspace, and is tied to the vhost implementation. I have patches to adapt it to use vringh, but I'm pushing this in the next merge window for Sjur, who has CAIF patches which need it. This also includes a test program in