search for: signalled_us

Displaying 20 results from an estimated 137 matches for "signalled_us".

Did you mean: signalled_used
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...idx(struct vhost_virtqueue *vq, int n) > +{ > + u16 old, new; > + > + old = vq->last_used_idx; > + new = (vq->last_used_idx += n); > + /* If the driver never bothers to signal in a very long while, > + * used index might wrap around. If that happens, invalidate > + * signalled_used index we stored. TODO: make sure driver > + * signals at least once in 2^16 and remove this. > + */ > + if (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old))) > + vq->signalled_used_valid = false; > + > + /* Make sure buffer is written before we update ind...
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...idx(struct vhost_virtqueue *vq, int n) > +{ > + u16 old, new; > + > + old = vq->last_used_idx; > + new = (vq->last_used_idx += n); > + /* If the driver never bothers to signal in a very long while, > + * used index might wrap around. If that happens, invalidate > + * signalled_used index we stored. TODO: make sure driver > + * signals at least once in 2^16 and remove this. > + */ > + if (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old))) > + vq->signalled_used_valid = false; > + > + /* Make sure buffer is written before we update ind...
2017 Sep 27
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...d, new; > > > + > > > + old = vq->last_used_idx; > > > + new = (vq->last_used_idx += n); > > > + /* If the driver never bothers to signal in a very long while, > > > + * used index might wrap around. If that happens, invalidate > > > + * signalled_used index we stored. TODO: make sure driver > > > + * signals at least once in 2^16 and remove this. > > > + */ > > > + if (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old))) > > > + vq->signalled_used_valid = false; > > > + > &gt...
2017 Sep 27
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...d, new; > > > + > > > + old = vq->last_used_idx; > > > + new = (vq->last_used_idx += n); > > > + /* If the driver never bothers to signal in a very long while, > > > + * used index might wrap around. If that happens, invalidate > > > + * signalled_used index we stored. TODO: make sure driver > > > + * signals at least once in 2^16 and remove this. > > > + */ > > > + if (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old))) > > > + vq->signalled_used_valid = false; > > > + > &gt...
2018 Mar 30
1
[RFC PATCH V2 8/8] vhost: event suppression for packed ring
.../ desc_event_wrap : 1; /* Descriptor Ring Change Event Wrap Counter */ } desc; /* If desc_event_flags set to RING_EVENT_FLAGS_DESC */ le16 { desc_event_flags : 2, /* Descriptor Ring Change Event Flags */ reserved : 14; /* Reserved, set to 0 */ } flags; }; > + > + > + old = vq->signalled_used; > + v = vq->signalled_used_valid; > + new = vq->signalled_used = vq->last_used_idx; > + vq->signalled_used_valid = true; > + > + if (unlikely(!v)) > + return true; > + > + return vhost_vring_packed_need_event(vq, new, old, off) && > + wrap =...
2017 Sep 22
0
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...(vhost_add_used); +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n) +{ + u16 old, new; + + old = vq->last_used_idx; + new = (vq->last_used_idx += n); + /* If the driver never bothers to signal in a very long while, + * used index might wrap around. If that happens, invalidate + * signalled_used index we stored. TODO: make sure driver + * signals at least once in 2^16 and remove this. + */ + if (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old))) + vq->signalled_used_valid = false; + + /* Make sure buffer is written before we update index. */ + smp_wmb(); + if (vhos...
2017 Sep 27
0
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...int n) >> +{ >> + u16 old, new; >> + >> + old = vq->last_used_idx; >> + new = (vq->last_used_idx += n); >> + /* If the driver never bothers to signal in a very long while, >> + * used index might wrap around. If that happens, invalidate >> + * signalled_used index we stored. TODO: make sure driver >> + * signals at least once in 2^16 and remove this. >> + */ >> + if (unlikely((u16)(new - vq->signalled_used) < (u16)(new - old))) >> + vq->signalled_used_valid = false; >> + >> + /* Make sure buffer is writ...
2013 Aug 16
0
[PATCH 3/6] vhost: switch to use vhost_add_used_n()
...ddr + offsetof(struct vring_used, idx), - sizeof vq->used->idx); - if (vq->log_ctx) - eventfd_signal(vq->log_ctx, 1); - } - vq->last_used_idx++; - /* If the driver never bothers to signal in a very long while, - * used index might wrap around. If that happens, invalidate - * signalled_used index we stored. TODO: make sure driver - * signals at least once in 2^16 and remove this. */ - if (unlikely(vq->last_used_idx == vq->signalled_used)) - vq->signalled_used_valid = false; - return 0; + return vhost_add_used_n(vq, &heads, 1); } EXPORT_SYMBOL_GPL(vhost_add_used);...
2013 Aug 16
1
[PATCH 3/6] vhost: switch to use vhost_add_used_n()
...> - sizeof vq->used->idx); > - if (vq->log_ctx) > - eventfd_signal(vq->log_ctx, 1); > - } > - vq->last_used_idx++; > - /* If the driver never bothers to signal in a very long while, > - * used index might wrap around. If that happens, invalidate > - * signalled_used index we stored. TODO: make sure driver > - * signals at least once in 2^16 and remove this. */ > - if (unlikely(vq->last_used_idx == vq->signalled_used)) > - vq->signalled_used_valid = false; > - return 0; > + return vhost_add_used_n(vq, &heads, 1); > } > EX...
2013 Aug 16
1
[PATCH 3/6] vhost: switch to use vhost_add_used_n()
...> - sizeof vq->used->idx); > - if (vq->log_ctx) > - eventfd_signal(vq->log_ctx, 1); > - } > - vq->last_used_idx++; > - /* If the driver never bothers to signal in a very long while, > - * used index might wrap around. If that happens, invalidate > - * signalled_used index we stored. TODO: make sure driver > - * signals at least once in 2^16 and remove this. */ > - if (unlikely(vq->last_used_idx == vq->signalled_used)) > - vq->signalled_used_valid = false; > - return 0; > + return vhost_add_used_n(vq, &heads, 1); > } > EX...
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
On Tue, 2 Dec 2014 21:03:45 +0200 "Michael S. Tsirkin" <mst at redhat.com> wrote: > On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > > { > > + /* > > + * For virtio-1 devices, the number of buffers may only be > > + * updated if the ring addresses have
2014 Dec 03
2
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
On Tue, 2 Dec 2014 21:03:45 +0200 "Michael S. Tsirkin" <mst at redhat.com> wrote: > On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: > > void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) > > { > > + /* > > + * For virtio-1 devices, the number of buffers may only be > > + * updated if the ring addresses have
2013 Aug 16
10
[PATCH 0/6] vhost code cleanup and minor enhancement
Hi all: This series tries to unify and simplify vhost codes especially for zerocopy. Plase review. Thanks Jason Wang (6): vhost_net: make vhost_zerocopy_signal_used() returns void vhost_net: use vhost_add_used_and_signal_n() in vhost_zerocopy_signal_used() vhost: switch to use vhost_add_used_n() vhost_net: determine whether or not to use zerocopy at one time vhost_net: poll vhost
2013 Aug 16
10
[PATCH 0/6] vhost code cleanup and minor enhancement
Hi all: This series tries to unify and simplify vhost codes especially for zerocopy. Plase review. Thanks Jason Wang (6): vhost_net: make vhost_zerocopy_signal_used() returns void vhost_net: use vhost_add_used_and_signal_n() in vhost_zerocopy_signal_used() vhost: switch to use vhost_add_used_n() vhost_net: determine whether or not to use zerocopy at one time vhost_net: poll vhost
2014 Dec 11
0
[PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
...rtio.c b/hw/virtio/virtio.c index 8f69ffa..57190ba 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -69,7 +69,6 @@ typedef struct VRing struct VirtQueue { VRing vring; - hwaddr pa; uint16_t last_avail_idx; /* Last used index value we have signalled on */ uint16_t signalled_used; @@ -92,15 +91,18 @@ struct VirtQueue }; /* virt queue functions */ -static void virtqueue_init(VirtQueue *vq) +void virtio_queue_update_rings(VirtIODevice *vdev, int n) { - hwaddr pa = vq->pa; + VRing *vring = &vdev->vq[n].vring; - vq->vring.desc = pa; - vq->vr...
2014 Dec 11
0
[PATCH RFC v6 07/20] virtio: allow virtio-1 queue layout
...rtio.c b/hw/virtio/virtio.c index 8f69ffa..57190ba 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -69,7 +69,6 @@ typedef struct VRing struct VirtQueue { VRing vring; - hwaddr pa; uint16_t last_avail_idx; /* Last used index value we have signalled on */ uint16_t signalled_used; @@ -92,15 +91,18 @@ struct VirtQueue }; /* virt queue functions */ -static void virtqueue_init(VirtQueue *vq) +void virtio_queue_update_rings(VirtIODevice *vdev, int n) { - hwaddr pa = vq->pa; + VRing *vring = &vdev->vq[n].vring; - vq->vring.desc = pa; - vq->vr...
2011 May 04
4
[PATCH 0/3] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. I see nice performance improvements: e.g. from 12 to 18 Gbit/s host to guest with netperf, but did not spend a lot of time testing performance. I hope others will try this out and report. Note: there
2011 May 04
4
[PATCH 0/3] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. I see nice performance improvements: e.g. from 12 to 18 Gbit/s host to guest with netperf, but did not spend a lot of time testing performance. I hope others will try this out and report. Note: there
2014 Dec 03
0
[PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout
...rtio.c b/hw/virtio/virtio.c index 8f69ffa..b2d553e 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -69,7 +69,6 @@ typedef struct VRing struct VirtQueue { VRing vring; - hwaddr pa; uint16_t last_avail_idx; /* Last used index value we have signalled on */ uint16_t signalled_used; @@ -92,15 +91,18 @@ struct VirtQueue }; /* virt queue functions */ -static void virtqueue_init(VirtQueue *vq) +void virtio_queue_update_rings(VirtIODevice *vdev, int n) { - hwaddr pa = vq->pa; + VRing *vring = &vdev->vq[n].vring; - vq->vring.desc = pa; - vq->vr...
2014 Oct 07
0
[PATCH RFC 07/11] dataplane: allow virtio-1 devices
...n) vring_init(&vring->vr, virtio_queue_get_num(vdev, n), vring_ptr, 4096); vring->last_avail_idx = virtio_queue_get_last_avail_idx(vdev, n); - vring->last_used_idx = vring->vr.used->idx; + vring->last_used_idx = vring_get_used_idx(vdev, vring); vring->signalled_used = 0; vring->signalled_used_valid = false; @@ -104,7 +105,7 @@ void vring_teardown(Vring *vring, VirtIODevice *vdev, int n) void vring_disable_notification(VirtIODevice *vdev, Vring *vring) { if (!(vdev->guest_features[0] & (1 << VIRTIO_RING_F_EVENT_IDX))) { -...