search for: avail_wrap_count

Displaying 20 results from an estimated 94 matches for "avail_wrap_count".

Did you mean: avail_wrap_counter
2018 May 22
0
[RFC v5 3/5] virtio_ring: add packed ring support
...virtqueue *_vq, void *ctx, gfp_t gfp) { + struct vring_virtqueue *vq = to_vvq(_vq); + struct vring_packed_desc *desc; + struct scatterlist *sg; + unsigned int i, n, descs_used, uninitialized_var(prev), err_idx; + __virtio16 uninitialized_var(head_flags), flags; + u16 head, avail_wrap_counter, id, cur; + bool indirect; + + START_USE(vq); + + BUG_ON(data == NULL); + BUG_ON(ctx && vq->indirect); + + if (unlikely(vq->broken)) { + END_USE(vq); + return -EIO; + } + +#ifdef DEBUG + { + ktime_t now = ktime_get(); + + /* No kick or get, with .1 second between? Warn. */ + i...
2018 Jul 11
0
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...virtqueue *_vq, void *ctx, gfp_t gfp) { + struct vring_virtqueue *vq = to_vvq(_vq); + struct vring_packed_desc *desc; + struct scatterlist *sg; + unsigned int i, n, descs_used, uninitialized_var(prev), err_idx; + __virtio16 uninitialized_var(head_flags), flags; + u16 head, avail_wrap_counter, id, curr; + bool indirect; + + START_USE(vq); + + BUG_ON(data == NULL); + BUG_ON(ctx && vq->indirect); + + if (unlikely(vq->broken)) { + END_USE(vq); + return -EIO; + } + +#ifdef DEBUG + { + ktime_t now = ktime_get(); + + /* No kick or get, with .1 second between? Warn. */ +...
2023 Aug 28
0
[PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed
Nope - it will be in the next linux release. On Mon, Aug 28, 2023 at 12:33:46PM +0900, Yuan Yao wrote: > I'm writing?to confirm the process for the patch,?since I'm not sure if this > thread is done for this patch. > Do I need any further steps to take to make this patch be launched? > > On Tue, Aug 8, 2023 at 7:00?PM Yuan Yao <yuanyaogoog at chromium.org> wrote:
2018 May 22
2
[RFC V4 PATCH 7/8] vhost: packed ring support
...rivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -1358,6 +1382,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > break; > } > vq->last_avail_idx = s.num; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) > + vq->avail_wrap_counter = s.num >> 31; > /* Forget the cached index value. */ > vq->avail_idx = vq->last_avail_idx; > break; > @@ -1366,6 +1392,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > s.num = vq->last_avail_idx; > if (copy_to...
2018 May 22
2
[RFC V4 PATCH 7/8] vhost: packed ring support
...rivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -1358,6 +1382,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > break; > } > vq->last_avail_idx = s.num; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) > + vq->avail_wrap_counter = s.num >> 31; > /* Forget the cached index value. */ > vq->avail_idx = vq->last_avail_idx; > break; > @@ -1366,6 +1392,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > s.num = vq->last_avail_idx; > if (copy_to...
2018 Nov 07
2
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...> gfp_t gfp) > { > + struct vring_virtqueue *vq = to_vvq(_vq); > + struct vring_packed_desc *desc; > + struct scatterlist *sg; > + unsigned int i, n, descs_used, uninitialized_var(prev), err_idx; > + __virtio16 uninitialized_var(head_flags), flags; > + u16 head, avail_wrap_counter, id, curr; > + bool indirect; > + > + START_USE(vq); > + > + BUG_ON(data == NULL); > + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now =...
2018 Nov 07
2
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...> gfp_t gfp) > { > + struct vring_virtqueue *vq = to_vvq(_vq); > + struct vring_packed_desc *desc; > + struct scatterlist *sg; > + unsigned int i, n, descs_used, uninitialized_var(prev), err_idx; > + __virtio16 uninitialized_var(head_flags), flags; > + u16 head, avail_wrap_counter, id, curr; > + bool indirect; > + > + START_USE(vq); > + > + BUG_ON(data == NULL); > + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now =...
2018 Sep 07
1
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...> gfp_t gfp) > { > + struct vring_virtqueue *vq = to_vvq(_vq); > + struct vring_packed_desc *desc; > + struct scatterlist *sg; > + unsigned int i, n, descs_used, uninitialized_var(prev), err_idx; > + __virtio16 uninitialized_var(head_flags), flags; > + u16 head, avail_wrap_counter, id, curr; > + bool indirect; > + > + START_USE(vq); > + > + BUG_ON(data == NULL); > + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now =...
2018 Oct 15
2
[PATCH net-next V2 6/8] vhost: packed ring support
...v *d, unsigned int ioctl, void __user *arg >>> vq->last_avail_idx = s.num; >>> /* Forget the cached index value. */ >>> vq->avail_idx = vq->last_avail_idx; >>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { >>> + vq->last_avail_wrap_counter = wrap_counter; >>> + vq->avail_wrap_counter = vq->last_avail_wrap_counter; >>> + } >>> break; >>> case VHOST_GET_VRING_BASE: >>> s.index = idx; >>> s.num = vq->last_avail_idx; >>> + if (vhost_has_feature(v...
2018 Oct 15
2
[PATCH net-next V2 6/8] vhost: packed ring support
...v *d, unsigned int ioctl, void __user *arg >>> vq->last_avail_idx = s.num; >>> /* Forget the cached index value. */ >>> vq->avail_idx = vq->last_avail_idx; >>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { >>> + vq->last_avail_wrap_counter = wrap_counter; >>> + vq->avail_wrap_counter = vq->last_avail_wrap_counter; >>> + } >>> break; >>> case VHOST_GET_VRING_BASE: >>> s.index = idx; >>> s.num = vq->last_avail_idx; >>> + if (vhost_has_feature(v...
2018 May 29
2
[RFC v5 3/5] virtio_ring: add packed ring support
...t; gfp_t gfp) > { > + struct vring_virtqueue *vq = to_vvq(_vq); > + struct vring_packed_desc *desc; > + struct scatterlist *sg; > + unsigned int i, n, descs_used, uninitialized_var(prev), err_idx; > + __virtio16 uninitialized_var(head_flags), flags; > + u16 head, avail_wrap_counter, id, cur; > + bool indirect; > + > + START_USE(vq); > + > + BUG_ON(data == NULL); > + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now =...
2018 May 29
2
[RFC v5 3/5] virtio_ring: add packed ring support
...t; gfp_t gfp) > { > + struct vring_virtqueue *vq = to_vvq(_vq); > + struct vring_packed_desc *desc; > + struct scatterlist *sg; > + unsigned int i, n, descs_used, uninitialized_var(prev), err_idx; > + __virtio16 uninitialized_var(head_flags), flags; > + u16 head, avail_wrap_counter, id, cur; > + bool indirect; > + > + START_USE(vq); > + > + BUG_ON(data == NULL); > + BUG_ON(ctx && vq->indirect); > + > + if (unlikely(vq->broken)) { > + END_USE(vq); > + return -EIO; > + } > + > +#ifdef DEBUG > + { > + ktime_t now =...
2018 Jul 16
3
[PATCH net-next V2 0/8] Packed virtqueue support for vhost
...nd use Tiwei's >> - split the enablement of packed virtqueue into a separate patch >> >> Changes from RFC V5: >> >> - save unnecessary barriers during vhost_add_used_packed_n() >> - more compact math for event idx >> - fix failure of SET_VRING_BASE when avail_wrap_counter is true >> - fix not copy avail_wrap_counter during GET_VRING_BASE >> - introduce SET_VRING_USED_BASE/GET_VRING_USED_BASE for syncing last_used_idx >> - rename used_wrap_counter to last_used_wrap_counter >> - rebase to net-next >> >> Changes from RFC V4: >&g...
2018 Jul 16
3
[PATCH net-next V2 0/8] Packed virtqueue support for vhost
...nd use Tiwei's >> - split the enablement of packed virtqueue into a separate patch >> >> Changes from RFC V5: >> >> - save unnecessary barriers during vhost_add_used_packed_n() >> - more compact math for event idx >> - fix failure of SET_VRING_BASE when avail_wrap_counter is true >> - fix not copy avail_wrap_counter during GET_VRING_BASE >> - introduce SET_VRING_USED_BASE/GET_VRING_USED_BASE for syncing last_used_idx >> - rename used_wrap_counter to last_used_wrap_counter >> - rebase to net-next >> >> Changes from RFC V4: >&g...
2018 May 23
1
[RFC V4 PATCH 7/8] vhost: packed ring support
....c > >>@@ -1358,6 +1382,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > >> break; > >> } > >> vq->last_avail_idx = s.num; > >>+ if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) > >>+ vq->avail_wrap_counter = s.num >> 31; > >> /* Forget the cached index value. */ > >> vq->avail_idx = vq->last_avail_idx; > >> break; > >>@@ -1366,6 +1392,8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > >> s.num...
2018 Oct 12
2
[PATCH net-next V2 6/8] vhost: packed ring support
...8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > vq->last_avail_idx = s.num; > /* Forget the cached index value. */ > vq->avail_idx = vq->last_avail_idx; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { > + vq->last_avail_wrap_counter = wrap_counter; > + vq->avail_wrap_counter = vq->last_avail_wrap_counter; > + } > break; > case VHOST_GET_VRING_BASE: > s.index = idx; > s.num = vq->last_avail_idx; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) > + s.num |= vq->last_avai...
2018 Oct 12
2
[PATCH net-next V2 6/8] vhost: packed ring support
...8 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > vq->last_avail_idx = s.num; > /* Forget the cached index value. */ > vq->avail_idx = vq->last_avail_idx; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { > + vq->last_avail_wrap_counter = wrap_counter; > + vq->avail_wrap_counter = vq->last_avail_wrap_counter; > + } > break; > case VHOST_GET_VRING_BASE: > s.index = idx; > s.num = vq->last_avail_idx; > + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) > + s.num |= vq->last_avai...
2018 Oct 15
1
[PATCH net-next V2 6/8] vhost: packed ring support
...>>>>> vq->last_avail_idx = s.num; >>>>> /* Forget the cached index value. */ >>>>> vq->avail_idx = vq->last_avail_idx; >>>>> + if (vhost_has_feature(vq, VIRTIO_F_RING_PACKED)) { >>>>> + vq->last_avail_wrap_counter = wrap_counter; >>>>> + vq->avail_wrap_counter = vq->last_avail_wrap_counter; >>>>> + } >>>>> break; >>>>> case VHOST_GET_VRING_BASE: >>>>> s.index = idx; >>>>> s.num = vq->las...
2018 Jul 16
0
[PATCH net-next V2 0/8] Packed virtqueue support for vhost
...: > - drop uapi patch and use Tiwei's > - split the enablement of packed virtqueue into a separate patch > > Changes from RFC V5: > > - save unnecessary barriers during vhost_add_used_packed_n() > - more compact math for event idx > - fix failure of SET_VRING_BASE when avail_wrap_counter is true > - fix not copy avail_wrap_counter during GET_VRING_BASE > - introduce SET_VRING_USED_BASE/GET_VRING_USED_BASE for syncing last_used_idx > - rename used_wrap_counter to last_used_wrap_counter > - rebase to net-next > > Changes from RFC V4: > > - fix signalled_us...
2018 Jul 11
15
[PATCH net-next v2 0/5] virtio: support packed ring
Hello everyone, This patch set implements packed ring support in virtio driver. Some functional tests have been done with Jason's packed ring implementation in vhost: https://lkml.org/lkml/2018/7/3/33 Both of ping and netperf worked as expected. v1 -> v2: - Use READ_ONCE() to read event off_wrap and flags together (Jason); - Add comments related to ccw (Jason); RFC (v6) -> v1: -