search for: n_qsize

Displaying 4 results from an estimated 4 matches for "n_qsize".

Did you mean: __size
2017 Feb 10
1
[virtio-dev] packed ring layout proposal v2
...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: > > nheads = vring_avail_idx(&vdev->vq[i]) - vdev->vq[i].last_avail_...
2017 Feb 10
1
[virtio-dev] packed ring layout proposal v2
...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: > > nheads = vring_avail_idx(&vdev->vq[i]) - vdev->vq[i].last_avail_...
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