search for: vring_used_ev

Displaying 20 results from an estimated 195 matches for "vring_used_ev".

Did you mean: vring_used_t
2014 Oct 15
1
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...rivers/virtio/virtio_ring.c @@ -567,14 +567,32 @@ unsigned virtqueue_enable_cb_prepare(struct virtqueue *_vq) * entry. Always do both to keep code simple. */ vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; /* Make sure used event never go backwards */ - if (!vring_need_event(vring_used_event(&vq->vring), - vq->vring.avail->idx, last_used_idx)) + if (vq->vring.avail->idx != vring_used_event(&vq->vring) && + !vring_need_event(vring_used_event(&vq->vring), + vq->vring.avail->idx, last_used_idx)) { vring_used_event(&a...
2014 Oct 15
1
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...rivers/virtio/virtio_ring.c @@ -567,14 +567,32 @@ unsigned virtqueue_enable_cb_prepare(struct virtqueue *_vq) * entry. Always do both to keep code simple. */ vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; /* Make sure used event never go backwards */ - if (!vring_need_event(vring_used_event(&vq->vring), - vq->vring.avail->idx, last_used_idx)) + if (vq->vring.avail->idx != vring_used_event(&vq->vring) && + !vring_need_event(vring_used_event(&vq->vring), + vq->vring.avail->idx, last_used_idx)) { vring_used_event(&a...
2014 Oct 15
2
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...14 +567,32 @@ unsigned virtqueue_enable_cb_prepare(struct virtqueue *_vq) >> * entry. Always do both to keep code simple. */ >> vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; >> /* Make sure used event never go backwards */ >> - if (!vring_need_event(vring_used_event(&vq->vring), >> - vq->vring.avail->idx, last_used_idx)) >> + if (vq->vring.avail->idx != vring_used_event(&vq->vring) && >> + !vring_need_event(vring_used_event(&vq->vring), >> + vq->vring.avail->idx, last...
2014 Oct 15
2
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...14 +567,32 @@ unsigned virtqueue_enable_cb_prepare(struct virtqueue *_vq) >> * entry. Always do both to keep code simple. */ >> vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; >> /* Make sure used event never go backwards */ >> - if (!vring_need_event(vring_used_event(&vq->vring), >> - vq->vring.avail->idx, last_used_idx)) >> + if (vq->vring.avail->idx != vring_used_event(&vq->vring) && >> + !vring_need_event(vring_used_event(&vq->vring), >> + vq->vring.avail->idx, last...
2014 Oct 15
1
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
..._enable_cb_prepare(struct virtqueue *_vq) >>>> * entry. Always do both to keep code simple. */ >>>> vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; >>>> /* Make sure used event never go backwards */ >>>> - if (!vring_need_event(vring_used_event(&vq->vring), >>>> - vq->vring.avail->idx, last_used_idx)) >>>> + if (vq->vring.avail->idx != vring_used_event(&vq->vring) && >>>> + !vring_need_event(vring_used_event(&vq->vring), >>>> +...
2014 Oct 15
1
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
..._enable_cb_prepare(struct virtqueue *_vq) >>>> * entry. Always do both to keep code simple. */ >>>> vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; >>>> /* Make sure used event never go backwards */ >>>> - if (!vring_need_event(vring_used_event(&vq->vring), >>>> - vq->vring.avail->idx, last_used_idx)) >>>> + if (vq->vring.avail->idx != vring_used_event(&vq->vring) && >>>> + !vring_need_event(vring_used_event(&vq->vring), >>>> +...
2015 Feb 13
4
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...lem is that there's nothing network specific about interrupt >> coalescing. I can see other devices wanting exactly the same thing, >> which means we'd deprecate this in the next virtio standard. >> >> I think the right answer is to extend like we did with >> vring_used_event(), eg: >> >> 1) Add a new feature VIRTIO_F_RING_COALESCE. >> 2) Add another a 32-bit field after vring_used_event(), eg: >> #define vring_used_delay(vr) (*(u32 *)((vr)->avail->ring[(vr)->num + 2])) >> >> This loses the ability to coalesce by...
2015 Feb 13
4
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...lem is that there's nothing network specific about interrupt >> coalescing. I can see other devices wanting exactly the same thing, >> which means we'd deprecate this in the next virtio standard. >> >> I think the right answer is to extend like we did with >> vring_used_event(), eg: >> >> 1) Add a new feature VIRTIO_F_RING_COALESCE. >> 2) Add another a 32-bit field after vring_used_event(), eg: >> #define vring_used_delay(vr) (*(u32 *)((vr)->avail->ring[(vr)->num + 2])) >> >> This loses the ability to coalesce by...
2014 Oct 15
0
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
....c > @@ -567,14 +567,32 @@ unsigned virtqueue_enable_cb_prepare(struct virtqueue *_vq) > * entry. Always do both to keep code simple. */ > vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; > /* Make sure used event never go backwards */ > - if (!vring_need_event(vring_used_event(&vq->vring), > - vq->vring.avail->idx, last_used_idx)) > + if (vq->vring.avail->idx != vring_used_event(&vq->vring) && > + !vring_need_event(vring_used_event(&vq->vring), > + vq->vring.avail->idx, last_used_idx)) { &g...
2014 Oct 15
1
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...then check if there was * more to do. */ /* Depending on the VIRTIO_RING_F_EVENT_IDX feature, we need to * either clear the flags bit or point the event index at the next * entry. Always do both to keep code simple. */ vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; - vring_used_event(&vq->vring) = last_used_idx = vq->last_used_idx; + /* Make sure used event never go backwards */ + if (!vring_need_event(vring_used_event(&vq->vring), + vq->vring.avail->idx, last_used_idx)) + vring_used_event(&vq->vring) = last_used_idx; END_USE(vq); r...
2014 Oct 15
1
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...then check if there was * more to do. */ /* Depending on the VIRTIO_RING_F_EVENT_IDX feature, we need to * either clear the flags bit or point the event index at the next * entry. Always do both to keep code simple. */ vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; - vring_used_event(&vq->vring) = last_used_idx = vq->last_used_idx; + /* Make sure used event never go backwards */ + if (!vring_need_event(vring_used_event(&vq->vring), + vq->vring.avail->idx, last_used_idx)) + vring_used_event(&vq->vring) = last_used_idx; END_USE(vq); r...
2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...>> /* Depending on the VIRTIO_RING_F_EVENT_IDX feature, we need to >> * either clear the flags bit or point the event index at the next >> * entry. Always do both to keep code simple. */ >> vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; >> - vring_used_event(&vq->vring) = last_used_idx = vq->last_used_idx; >> + /* Make sure used event never go backwards */ > s/go/goes/ > >> + if (!vring_need_event(vring_used_event(&vq->vring), >> + vq->vring.avail->idx, last_used_idx)) >> + vring_used_eve...
2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...>> /* Depending on the VIRTIO_RING_F_EVENT_IDX feature, we need to >> * either clear the flags bit or point the event index at the next >> * entry. Always do both to keep code simple. */ >> vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; >> - vring_used_event(&vq->vring) = last_used_idx = vq->last_used_idx; >> + /* Make sure used event never go backwards */ > s/go/goes/ > >> + if (!vring_need_event(vring_used_event(&vq->vring), >> + vq->vring.avail->idx, last_used_idx)) >> + vring_used_eve...
2014 Oct 15
0
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...ed virtqueue_enable_cb_prepare(struct virtqueue *_vq) > >> * entry. Always do both to keep code simple. */ > >> vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; > >> /* Make sure used event never go backwards */ > >> - if (!vring_need_event(vring_used_event(&vq->vring), > >> - vq->vring.avail->idx, last_used_idx)) > >> + if (vq->vring.avail->idx != vring_used_event(&vq->vring) && > >> + !vring_need_event(vring_used_event(&vq->vring), > >> + vq->vring...
2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...IRTIO_RING_F_EVENT_IDX feature, we need to >>>> * either clear the flags bit or point the event index at the next >>>> * entry. Always do both to keep code simple. */ >>>> vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; >>>> - vring_used_event(&vq->vring) = last_used_idx = vq->last_used_idx; >>>> + /* Make sure used event never go backwards */ >>> s/go/goes/ >>> >>>> + if (!vring_need_event(vring_used_event(&vq->vring), >>>> + vq->vring.avail->idx, la...
2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...IRTIO_RING_F_EVENT_IDX feature, we need to >>>> * either clear the flags bit or point the event index at the next >>>> * entry. Always do both to keep code simple. */ >>>> vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; >>>> - vring_used_event(&vq->vring) = last_used_idx = vq->last_used_idx; >>>> + /* Make sure used event never go backwards */ >>> s/go/goes/ >>> >>>> + if (!vring_need_event(vring_used_event(&vq->vring), >>>> + vq->vring.avail->idx, la...
2015 Dec 31
0
[PATCH v2 32/32] virtio_ring: use virt_store_mb
...d *virtqueue_get_buf(struct virtqueue *_vq, unsigned int *len) /* If we expect an interrupt for the next entry, tell host * by writing event index and flush out the write before * the read in the next get_buf call. */ - if (!(vq->avail_flags_shadow & VRING_AVAIL_F_NO_INTERRUPT)) { - vring_used_event(&vq->vring) = cpu_to_virtio16(_vq->vdev, vq->last_used_idx); - virtio_mb(vq->weak_barriers); - } + if (!(vq->avail_flags_shadow & VRING_AVAIL_F_NO_INTERRUPT)) + virtio_store_mb(vq->weak_barriers, + &vring_used_event(&vq->vring), + cpu_to_virtio16(_vq-...
2023 Mar 28
2
9p regression (Was: [PATCH v2] virtio_ring: don't update event idx on get_buf)
...'ll leave this up to you) > > If we disable the napi_tx, it will only be called when the tx ring > buffer is relatively small. > > Because event_triggered is true. Therefore, VRING_AVAIL_F_NO_INTERRUPT or > VRING_PACKED_EVENT_FLAG_DISABLE will not be set. So we update > vring_used_event(&vq->split.vring) or vq->packed.vring.driver->off_wrap > every time we call virtqueue_get_buf_ctx. This will bring more interruptions. > > To summarize: > 1) event_triggered was set to true in vring_interrupt() > 2) after this nothing will happen for virtqueue_disabl...
2014 Oct 15
15
[RFC PATCH net-next 0/6] Always use tx interrupt for virtio-net
According to David, proper accounting and queueing (at all levels, not just TCP sockets) is more important than trying to skim a bunch of cycles by avoiding TX interrupts. Having an event to free the SKB is absolutely essential for the stack to operate correctly. This series tries to enable tx interrupt for virtio-net. The idea is simple: enable tx interrupt and schedule a tx napi to free old
2014 Oct 15
15
[RFC PATCH net-next 0/6] Always use tx interrupt for virtio-net
According to David, proper accounting and queueing (at all levels, not just TCP sockets) is more important than trying to skim a bunch of cycles by avoiding TX interrupts. Having an event to free the SKB is absolutely essential for the stack to operate correctly. This series tries to enable tx interrupt for virtio-net. The idea is simple: enable tx interrupt and schedule a tx napi to free old