search for: last_avail

Displaying 8 results from an estimated 8 matches for "last_avail".

2017 Feb 10
1
[virtio-dev] packed ring layout proposal v2
...to. > > The reason is that it allows indices to be free running. Well what I meant is that with qsize not a power of 2 you can still do this but have to do everything mod N*qsize as opposed to mod 2^16. So you need a branch there - easiest to do if you do signed math. int nheads = avail - last_avail; /*Check and handle index wrap-around */ if (unlikely(nheads < 0)) { nheads += N_qsize; } if (nheads < 0 || nheads > vdev->vq[i].vring.num) { error_report(...); return -1; } This can only catch bugs if N > 1 > This is an > example of QEMU code that requires that: >...
2017 Feb 10
1
[virtio-dev] packed ring layout proposal v2
...to. > > The reason is that it allows indices to be free running. Well what I meant is that with qsize not a power of 2 you can still do this but have to do everything mod N*qsize as opposed to mod 2^16. So you need a branch there - easiest to do if you do signed math. int nheads = avail - last_avail; /*Check and handle index wrap-around */ if (unlikely(nheads < 0)) { nheads += N_qsize; } if (nheads < 0 || nheads > vdev->vq[i].vring.num) { error_report(...); return -1; } This can only catch bugs if N > 1 > This is an > example of QEMU code that requires that: >...
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...ghmem.h> +#include <linux/file.h> +#include <linux/mount.h> +#include <linux/magic.h> +#include <linux/module.h> + +static struct vfsmount *vring_mnt; +static DEFINE_MUTEX(vring_lock); + +struct vring_info +{ + struct vring ring; + u16 mask; + u16 __user *last_used; + u16 last_avail; + + const struct vring_ops *ops; + void *ops_data; + + /* Waitqueue for poll() */ + wait_queue_head_t poll_wait; + + /* The mapped used ring. */ + struct vring_used *used; + struct page *used_page; +}; + +static unsigned int vring_poll(struct file *filp, + struct poll_table_struct *poll)...
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...ghmem.h> +#include <linux/file.h> +#include <linux/mount.h> +#include <linux/magic.h> +#include <linux/module.h> + +static struct vfsmount *vring_mnt; +static DEFINE_MUTEX(vring_lock); + +struct vring_info +{ + struct vring ring; + u16 mask; + u16 __user *last_used; + u16 last_avail; + + const struct vring_ops *ops; + void *ops_data; + + /* Waitqueue for poll() */ + wait_queue_head_t poll_wait; + + /* The mapped used ring. */ + struct vring_used *used; + struct page *used_page; +}; + +static unsigned int vring_poll(struct file *filp, + struct poll_table_struct *poll)...
2008 Jul 23
2
[PULL] lguest and virtio patches
...lguest: Debugging patch for lguest network performance lguest: fix verbose printing of device features. lguest: virtio-rng support virtio: clarify that ABI is usable by any implementations virtio: don't always force a notification when ring is full lguest: wrap last_avail accesses. lguest: net block unneeded receive queue update notifications lguest: Tell Guest net not to notify us on every packet xmit lguest: Adaptive timeout virtio: Formally reserve bits 28-31 to be 'transport' features. virtio: Rename set_features to finalize...
2008 Jul 23
2
[PULL] lguest and virtio patches
...lguest: Debugging patch for lguest network performance lguest: fix verbose printing of device features. lguest: virtio-rng support virtio: clarify that ABI is usable by any implementations virtio: don't always force a notification when ring is full lguest: wrap last_avail accesses. lguest: net block unneeded receive queue update notifications lguest: Tell Guest net not to notify us on every packet xmit lguest: Adaptive timeout virtio: Formally reserve bits 28-31 to be 'transport' features. virtio: Rename set_features to finalize...
2017 Feb 09
2
[virtio-dev] packed ring layout proposal v2
On Thu, Feb 09, 2017 at 04:48:53PM +0100, Paolo Bonzini wrote: > > > On 08/02/2017 20:59, Michael S. Tsirkin wrote: > > We couldn't decide what's better for everyone in 1.0 days and I doubt > > we'll be able to now, but yes, benchmarking is needed to make > > sire it's required. Very easy to remove or not to use/support in > > drivers/devices
2017 Feb 09
2
[virtio-dev] packed ring layout proposal v2
On Thu, Feb 09, 2017 at 04:48:53PM +0100, Paolo Bonzini wrote: > > > On 08/02/2017 20:59, Michael S. Tsirkin wrote: > > We couldn't decide what's better for everyone in 1.0 days and I doubt > > we'll be able to now, but yes, benchmarking is needed to make > > sire it's required. Very easy to remove or not to use/support in > > drivers/devices