search for: vring_avail_f_no_interrupt

Displaying 20 results from an estimated 312 matches for "vring_avail_f_no_interrupt".

2015 Jun 03
2
virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
Hi, I'm a newbie and have a question about vring_new_virtqueue function. Why we set avail->flags to VRING_AVAIL_F_NO_INTERRUPT when no callbacks? I think we should set avail->flags to VRING_AVAIL_F_NO_INTERRUPT even if no callbacks.
2015 Jun 04
1
virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
On 2015/6/4 9:13, Rusty Russell wrote: > Linhaifeng <haifeng.lin at huawei.com> writes: >> Hi, >> >> I'm a newbie and have a question about vring_new_virtqueue function. >> >> Why we set avail->flags to VRING_AVAIL_F_NO_INTERRUPT when no callbacks? >> I think we should set avail->flags to VRING_AVAIL_F_NO_INTERRUPT even if no callbacks. > > Hi Linhaifeng, > > Not sure I understand your question, but I'll try to answer. > > We don't set VRING_AVAIL_F_NO_INTERRUPT if there's a...
2015 Jun 03
2
virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
Hi, I'm a newbie and have a question about vring_new_virtqueue function. Why we set avail->flags to VRING_AVAIL_F_NO_INTERRUPT when no callbacks? I think we should set avail->flags to VRING_AVAIL_F_NO_INTERRUPT even if no callbacks.
2015 Jun 04
1
virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
On 2015/6/4 9:13, Rusty Russell wrote: > Linhaifeng <haifeng.lin at huawei.com> writes: >> Hi, >> >> I'm a newbie and have a question about vring_new_virtqueue function. >> >> Why we set avail->flags to VRING_AVAIL_F_NO_INTERRUPT when no callbacks? >> I think we should set avail->flags to VRING_AVAIL_F_NO_INTERRUPT even if no callbacks. > > Hi Linhaifeng, > > Not sure I understand your question, but I'll try to answer. > > We don't set VRING_AVAIL_F_NO_INTERRUPT if there's a...
2015 Nov 11
2
[PATCH] virtio_ring: Shadow available ring flags & index
...id *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->vring.avail->flags & cpu_to_virtio16(_vq->vdev, VRING_AVAIL_F_NO_INTERRUPT))) { + 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); } @@ -537,7 +544,11 @@ void virtqueue_disable_cb(struct virtqueue *_vq) { struct vring_v...
2015 Nov 11
2
[PATCH] virtio_ring: Shadow available ring flags & index
...id *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->vring.avail->flags & cpu_to_virtio16(_vq->vdev, VRING_AVAIL_F_NO_INTERRUPT))) { + 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); } @@ -537,7 +544,11 @@ void virtqueue_disable_cb(struct virtqueue *_vq) { struct vring_v...
2015 Nov 11
0
[PATCH] virtio_ring: Shadow available ring flags & index
...f(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->vring.avail->flags & cpu_to_virtio16(_vq->vdev, VRING_AVAIL_F_NO_INTERRUPT))) { > + 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); > } > @@ -537,7 +544,11 @@ void virtqueue_disable_cb(struct virtqueue...
2014 Sep 22
1
[PATCH RFC 2/2] vhost: support urgent descriptors
...true here >>>> when vq->urgent is true? >>> Its ||, not &&. >>> >>> Without event index, all descriptors are treated as urgent. >>> >>> Paolo >>> >> The problem is if vq->urgent is true, the patch checks >> VRING_AVAIL_F_NO_INTERRUPT bit. This bit were set unconditionally in >> virtqueue_enable_cb() regardless of event index feature and cleared >> unconditionally in virtqueue_disable_cb(). > The reverse actually, right? Ah, right. > >> So virtqueue_enable_cb() was >> used to not only publish a new...
2014 Sep 22
1
[PATCH RFC 2/2] vhost: support urgent descriptors
...true here >>>> when vq->urgent is true? >>> Its ||, not &&. >>> >>> Without event index, all descriptors are treated as urgent. >>> >>> Paolo >>> >> The problem is if vq->urgent is true, the patch checks >> VRING_AVAIL_F_NO_INTERRUPT bit. This bit were set unconditionally in >> virtqueue_enable_cb() regardless of event index feature and cleared >> unconditionally in virtqueue_disable_cb(). > The reverse actually, right? Ah, right. > >> So virtqueue_enable_cb() was >> used to not only publish a new...
2015 Jun 04
0
virtio-net: why not always to set avail->flags to VRING_AVAIL_F_NO_INTERRUPT
Linhaifeng <haifeng.lin at huawei.com> writes: > Hi, > > I'm a newbie and have a question about vring_new_virtqueue function. > > Why we set avail->flags to VRING_AVAIL_F_NO_INTERRUPT when no callbacks? > I think we should set avail->flags to VRING_AVAIL_F_NO_INTERRUPT even if no callbacks. Hi Linhaifeng, Not sure I understand your question, but I'll try to answer. We don't set VRING_AVAIL_F_NO_INTERRUPT if there's a callback because we want that cal...
2014 Sep 22
2
[PATCH RFC 2/2] vhost: support urgent descriptors
...dex >> even if urgent descriptor is used. Looks like we need return true here >> when vq->urgent is true? > Its ||, not &&. > > Without event index, all descriptors are treated as urgent. > > Paolo > The problem is if vq->urgent is true, the patch checks VRING_AVAIL_F_NO_INTERRUPT bit. This bit were set unconditionally in virtqueue_enable_cb() regardless of event index feature and cleared unconditionally in virtqueue_disable_cb(). So virtqueue_enable_cb() was used to not only publish a new event index but also enable the urgent descriptor. And virtqueue_disable_cb() disabled...
2014 Sep 22
2
[PATCH RFC 2/2] vhost: support urgent descriptors
...dex >> even if urgent descriptor is used. Looks like we need return true here >> when vq->urgent is true? > Its ||, not &&. > > Without event index, all descriptors are treated as urgent. > > Paolo > The problem is if vq->urgent is true, the patch checks VRING_AVAIL_F_NO_INTERRUPT bit. This bit were set unconditionally in virtqueue_enable_cb() regardless of event index feature and cleared unconditionally in virtqueue_disable_cb(). So virtqueue_enable_cb() was used to not only publish a new event index but also enable the urgent descriptor. And virtqueue_disable_cb() disabled...
2016 Aug 31
0
[PATCH v2] virtio_ring: Make interrupt suppression spec compliant
...5 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index e383ecd..926ecb7 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -732,7 +732,8 @@ void virtqueue_disable_cb(struct virtqueue *_vq) if (!(vq->avail_flags_shadow & VRING_AVAIL_F_NO_INTERRUPT)) { vq->avail_flags_shadow |= VRING_AVAIL_F_NO_INTERRUPT; - vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); + if (!vq->event) + vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); } } @@ -764,7 +765,8 @@...
2016 Aug 31
0
[PATCH v2] virtio_ring: Make interrupt suppression spec compliant
...5 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index e383ecd..926ecb7 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -732,7 +732,8 @@ void virtqueue_disable_cb(struct virtqueue *_vq) if (!(vq->avail_flags_shadow & VRING_AVAIL_F_NO_INTERRUPT)) { vq->avail_flags_shadow |= VRING_AVAIL_F_NO_INTERRUPT; - vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); + if (!vq->event) + vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); } } @@ -764,7 +765,8 @@...
2023 Mar 24
1
[External] Re: [PATCH] virtio_ring: Suppress tx interrupt when napi_tx disable
...r: Jason Wang <jasowang at redhat.com> > > Date: Tue Jan 17 11:47:07 2023 +0800 > > > > virtio-net: correctly enable callback during start_xmit > > > > > } > > > } > > > 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. > > > > Can you...
2014 Nov 27
0
[PATCH v6 09/46] virtio_ring: switch to new memory access APIs
...t;, i); @@ -510,8 +511,8 @@ void *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->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) { - vring_used_event(&vq->vring) = vq->last_used_idx; + if (!(vq->vring.avail->flags & cpu_to_virtio16(_vq->vdev, VRING_AVAIL_F_NO_INTERRUPT))) { + vring_used_event(&vq->vring) = cpu_to_virtio16(_vq->vdev, vq->last_used_idx); virtio_mb(vq->weak_barriers...
2014 Nov 30
0
[PATCH v7 09/46] virtio_ring: switch to new memory access APIs
...t;, i); @@ -510,8 +511,8 @@ void *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->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) { - vring_used_event(&vq->vring) = vq->last_used_idx; + if (!(vq->vring.avail->flags & cpu_to_virtio16(_vq->vdev, VRING_AVAIL_F_NO_INTERRUPT))) { + vring_used_event(&vq->vring) = cpu_to_virtio16(_vq->vdev, vq->last_used_idx); virtio_mb(vq->weak_barriers...
2014 Nov 24
0
[PATCH v3 05/41] virtio_ring: switch to new memory access APIs
...t;, i); @@ -510,8 +511,8 @@ void *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->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) { - vring_used_event(&vq->vring) = vq->last_used_idx; + if (!(vq->vring.avail->flags & cpu_to_virtio16(_vq->vdev, VRING_AVAIL_F_NO_INTERRUPT))) { + vring_used_event(&vq->vring) = cpu_to_virtio16(_vq->vdev, vq->last_used_idx); virtio_mb(vq->weak_barriers...
2014 Nov 25
0
[PATCH v4 06/42] virtio_ring: switch to new memory access APIs
...t;, i); @@ -510,8 +511,8 @@ void *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->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) { - vring_used_event(&vq->vring) = vq->last_used_idx; + if (!(vq->vring.avail->flags & cpu_to_virtio16(_vq->vdev, VRING_AVAIL_F_NO_INTERRUPT))) { + vring_used_event(&vq->vring) = cpu_to_virtio16(_vq->vdev, vq->last_used_idx); virtio_mb(vq->weak_barriers...
2014 Nov 27
0
[PATCH v5 08/45] virtio_ring: switch to new memory access APIs
...t;, i); @@ -510,8 +511,8 @@ void *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->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) { - vring_used_event(&vq->vring) = vq->last_used_idx; + if (!(vq->vring.avail->flags & cpu_to_virtio16(_vq->vdev, VRING_AVAIL_F_NO_INTERRUPT))) { + vring_used_event(&vq->vring) = cpu_to_virtio16(_vq->vdev, vq->last_used_idx); virtio_mb(vq->weak_barriers...