search for: needs_kick

Displaying 20 results from an estimated 124 matches for "needs_kick".

2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...irtio_ring.c > @@ -986,7 +986,7 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq, > static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > { > struct vring_virtqueue *vq = to_vvq(_vq); > - u16 flags; > + u16 new, old, off_wrap, flags; > bool needs_kick; > u32 snapshot; > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > * suppressions. */ > virtio_mb(vq->weak_barriers); > > + old = vq->next_avail_idx - vq->num_added; > + new = vq->next_avail_idx; > + vq...
2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...irtio_ring.c > @@ -986,7 +986,7 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq, > static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > { > struct vring_virtqueue *vq = to_vvq(_vq); > - u16 flags; > + u16 new, old, off_wrap, flags; > bool needs_kick; > u32 snapshot; > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > * suppressions. */ > virtio_mb(vq->weak_barriers); > > + old = vq->next_avail_idx - vq->num_added; > + new = vq->next_avail_idx; > + vq...
2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...queue_add_packed(struct virtqueue *_vq, > > > static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > { > > > struct vring_virtqueue *vq = to_vvq(_vq); > > > - u16 flags; > > > + u16 new, old, off_wrap, flags; > > > bool needs_kick; > > > u32 snapshot; > > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > * suppressions. */ > > > virtio_mb(vq->weak_barriers); > > > + old = vq->next_avail_idx - vq->num_added; > > &...
2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...queue_add_packed(struct virtqueue *_vq, > > > static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > { > > > struct vring_virtqueue *vq = to_vvq(_vq); > > > - u16 flags; > > > + u16 new, old, off_wrap, flags; > > > bool needs_kick; > > > u32 snapshot; > > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > * suppressions. */ > > > virtio_mb(vq->weak_barriers); > > > + old = vq->next_avail_idx - vq->num_added; > > &...
2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...> static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > { > > > > > struct vring_virtqueue *vq = to_vvq(_vq); > > > > > - u16 flags; > > > > > + u16 new, old, off_wrap, flags; > > > > > bool needs_kick; > > > > > u32 snapshot; > > > > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > * suppressions. */ > > > > > virtio_mb(vq->weak_barriers); > > > > > + old = vq-...
2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...> static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > { > > > > > struct vring_virtqueue *vq = to_vvq(_vq); > > > > > - u16 flags; > > > > > + u16 new, old, off_wrap, flags; > > > > > bool needs_kick; > > > > > u32 snapshot; > > > > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > * suppressions. */ > > > > > virtio_mb(vq->weak_barriers); > > > > > + old = vq-...
2018 Sep 07
1
[PATCH net-next v2 4/5] virtio_ring: add event idx support in packed ring
...050,7 +1050,7 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq, > static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > { > struct vring_virtqueue *vq = to_vvq(_vq); > - u16 flags; > + u16 new, old, off_wrap, flags, wrap_counter, event_idx; > bool needs_kick; > u32 snapshot; > > @@ -1059,9 +1059,19 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > * suppressions. */ > virtio_mb(vq->weak_barriers); > > + old = vq->next_avail_idx - vq->num_added; > + new = vq->next_avail_idx; > + vq-&g...
2018 May 03
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...truct virtqueue *_vq) > > > > > > > { > > > > > > > struct vring_virtqueue *vq = to_vvq(_vq); > > > > > > > - u16 flags; > > > > > > > + u16 new, old, off_wrap, flags; > > > > > > > bool needs_kick; > > > > > > > u32 snapshot; > > > > > > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > > > * suppressions. */ > > > > > > > virtio_mb(vq->weak_barrier...
2018 May 03
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...truct virtqueue *_vq) > > > > > > > { > > > > > > > struct vring_virtqueue *vq = to_vvq(_vq); > > > > > > > - u16 flags; > > > > > > > + u16 new, old, off_wrap, flags; > > > > > > > bool needs_kick; > > > > > > > u32 snapshot; > > > > > > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > > > * suppressions. */ > > > > > > > virtio_mb(vq->weak_barrier...
2018 May 02
0
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...86,7 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq, > > static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > { > > struct vring_virtqueue *vq = to_vvq(_vq); > > - u16 flags; > > + u16 new, old, off_wrap, flags; > > bool needs_kick; > > u32 snapshot; > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > * suppressions. */ > > virtio_mb(vq->weak_barriers); > > + old = vq->next_avail_idx - vq->num_added; > > + new = vq->next_avail_...
2018 May 02
0
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...eue *_vq, > > > > static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > { > > > > struct vring_virtqueue *vq = to_vvq(_vq); > > > > - u16 flags; > > > > + u16 new, old, off_wrap, flags; > > > > bool needs_kick; > > > > u32 snapshot; > > > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > * suppressions. */ > > > > virtio_mb(vq->weak_barriers); > > > > + old = vq->next_avail_idx - vq-&...
2018 Apr 25
0
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...io/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -986,7 +986,7 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq, static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq); - u16 flags; + u16 new, old, off_wrap, flags; bool needs_kick; u32 snapshot; @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) * suppressions. */ virtio_mb(vq->weak_barriers); + old = vq->next_avail_idx - vq->num_added; + new = vq->next_avail_idx; + vq->num_added = 0; + snapshot = *(u32 *)vq->...
2018 Jul 09
0
[PATCH net-next v1 4/5] virtio_ring: add event idx support in packed ring
...ers/virtio/virtio_ring.c @@ -1050,7 +1050,7 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq, static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq); - u16 flags; + u16 new, old, off_wrap, flags, wrap_counter, event_idx; bool needs_kick; u32 snapshot; @@ -1059,9 +1059,19 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) * suppressions. */ virtio_mb(vq->weak_barriers); + old = vq->next_avail_idx - vq->num_added; + new = vq->next_avail_idx; + vq->num_added = 0; + snapshot = *(u32 *)vq-&g...
2018 Jul 11
0
[PATCH net-next v2 4/5] virtio_ring: add event idx support in packed ring
...ers/virtio/virtio_ring.c @@ -1050,7 +1050,7 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq, static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq); - u16 flags; + u16 new, old, off_wrap, flags, wrap_counter, event_idx; bool needs_kick; u32 snapshot; @@ -1059,9 +1059,19 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) * suppressions. */ virtio_mb(vq->weak_barriers); + old = vq->next_avail_idx - vq->num_added; + new = vq->next_avail_idx; + vq->num_added = 0; + snapshot = READ_ONCE(*(u...
2018 May 03
0
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...eue_kick_prepare_packed(struct virtqueue *_vq) > > > > > > { > > > > > > struct vring_virtqueue *vq = to_vvq(_vq); > > > > > > - u16 flags; > > > > > > + u16 new, old, off_wrap, flags; > > > > > > bool needs_kick; > > > > > > u32 snapshot; > > > > > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > > * suppressions. */ > > > > > > virtio_mb(vq->weak_barriers); > > > &...
2018 Jun 05
0
[RFC v6 4/5] virtio_ring: add event idx support in packed ring
...ers/virtio/virtio_ring.c @@ -1048,7 +1048,7 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq, static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq); - u16 flags; + u16 new, old, off_wrap, flags, wrap_counter, event_idx; bool needs_kick; u32 snapshot; @@ -1057,9 +1057,19 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) * suppressions. */ virtio_mb(vq->weak_barriers); + old = vq->next_avail_idx - vq->num_added; + new = vq->next_avail_idx; + vq->num_added = 0; + snapshot = *(u32 *)vq-&g...
2018 May 16
0
[RFC v4 4/5] virtio_ring: add event idx support in packed ring
...ers/virtio/virtio_ring.c @@ -1006,7 +1006,7 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq, static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq); - u16 flags; + u16 new, old, off_wrap, flags, wrap_counter, event_idx; bool needs_kick; u32 snapshot; @@ -1015,9 +1015,19 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) * suppressions. */ virtio_mb(vq->weak_barriers); + old = vq->next_avail_idx - vq->num_added; + new = vq->next_avail_idx; + vq->num_added = 0; + snapshot = *(u32 *)vq-&g...
2018 May 03
0
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...; > > > > > > > { > > > > > > > > struct vring_virtqueue *vq = to_vvq(_vq); > > > > > > > > - u16 flags; > > > > > > > > + u16 new, old, off_wrap, flags; > > > > > > > > bool needs_kick; > > > > > > > > u32 snapshot; > > > > > > > > @@ -995,7 +995,12 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > > > > * suppressions. */ > > > > > > > > virtio_mb...
2018 Apr 25
9
[RFC v3 0/5] virtio: support packed ring
Hello everyone, This RFC implements packed ring support in virtio driver. Some simple functional tests have been done with Jason's packed ring implementation in vhost: https://lkml.org/lkml/2018/4/23/12 Both of ping and netperf worked as expected (with EVENT_IDX disabled). But there are below known issues: 1. Reloading the guest driver will break the Tx/Rx; 2. Zeroing the flags when
2011 Nov 03
2
[PATCH 3 of 5] virtio: support unlocked queue kick
...s/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -237,10 +237,12 @@ add_head: } EXPORT_SYMBOL_GPL(virtqueue_add_buf); -void virtqueue_kick(struct virtqueue *_vq) +bool virtqueue_kick_prepare(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq); u16 new, old; + bool needs_kick; + START_USE(vq); /* Descriptors and available array need to be set before we expose the * new available array entries. */ @@ -253,13 +255,30 @@ void virtqueue_kick(struct virtqueue *_v /* Need to update avail index before checking if we should notify */ virtio_mb(); - if (vq->event...