search for: vhost_sign

Displaying 20 results from an estimated 201 matches for "vhost_sign".

Did you mean: vhost_signal
2020 Jun 07
0
[PATCH RFC v5 13/13] vhost: drop head based APIs
...4 +2509,17 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) return vhost_add_used_n(vq, &heads, 1); } -EXPORT_SYMBOL_GPL(vhost_add_used); +/* After we've used one of their buffers, we tell them about it. We'll then + * want to notify the guest, using vhost_signal. */ int vhost_put_used_buf(struct vhost_virtqueue *vq, struct vhost_buf *buf) { return vhost_add_used(vq, buf->id, buf->in_len); } EXPORT_SYMBOL_GPL(vhost_put_used_buf); +/* After we've used one of their buffers, we tell them about it. We'll then + * want to notify the gues...
2010 May 18
2
[PATCHv2] vhost-net: utilize PUBLISH_USED_IDX feature
...n) +static int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, + int len) { struct vring_used_elem __user *used; @@ -1034,9 +1037,10 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) } /* This actually signals the guest, using eventfd. */ -void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) +static void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) { __u16 flags; + __u16 used; /* Flush out used index updates. This is paired * with the barrier that the Guest executes when enabling * interrupts. */ @@ -105...
2010 May 18
2
[PATCHv2] vhost-net: utilize PUBLISH_USED_IDX feature
...n) +static int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, + int len) { struct vring_used_elem __user *used; @@ -1034,9 +1037,10 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) } /* This actually signals the guest, using eventfd. */ -void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) +static void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) { __u16 flags; + __u16 used; /* Flush out used index updates. This is paired * with the barrier that the Guest executes when enabling * interrupts. */ @@ -105...
2012 Mar 18
3
vhost question
...(0 < n || n == vq->num) break; if ((t = queue_pop(&node->rxq))) { BUG_ON(copy_to_user(vq->iov[0].iov_base, t->buf, t->buf_sz)); vq->iov[0].iov_len = t->buf_sz; // ToDo: copy_to_user the rx_status vhost_add_used(vq, n, out); transmission_free(t); ++frames; } } if (frames) vhost_signal(dev, vq); vhost_enable_notify(dev, vq); mutex_unlock(&vq->mutex); } static void handle_tx(struct vhost_work *work) { int n; unsigned out, in; struct transmission *t; struct vhost_poll *p = container_of(work, struct vhost_poll, work); struct vhost_virtqueue *vq = container_of(p, struct vho...
2012 Mar 18
3
vhost question
...(0 < n || n == vq->num) break; if ((t = queue_pop(&node->rxq))) { BUG_ON(copy_to_user(vq->iov[0].iov_base, t->buf, t->buf_sz)); vq->iov[0].iov_len = t->buf_sz; // ToDo: copy_to_user the rx_status vhost_add_used(vq, n, out); transmission_free(t); ++frames; } } if (frames) vhost_signal(dev, vq); vhost_enable_notify(dev, vq); mutex_unlock(&vq->mutex); } static void handle_tx(struct vhost_work *work) { int n; unsigned out, in; struct transmission *t; struct vhost_poll *p = container_of(work, struct vhost_poll, work); struct vhost_virtqueue *vq = container_of(p, struct vho...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
..._elem *heads, > > > } > > > return r; > > > } > > > +EXPORT_SYMBOL_GPL(vhost_add_used_n); > > > > > > static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > > > { > > > @@ -1456,6 +1482,7 @@ void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) > > > if (vq->call_ctx && vhost_notify(dev, vq)) > > > eventfd_signal(vq->call_ctx, 1); > > > } > > > +EXPORT_SYMBOL_GPL(vhost_signal); > > > > > > /* And here's the...
2013 Jul 07
2
[PATCH v2 03/11] vhost: Make vhost a separate module
..._elem *heads, > > > } > > > return r; > > > } > > > +EXPORT_SYMBOL_GPL(vhost_add_used_n); > > > > > > static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > > > { > > > @@ -1456,6 +1482,7 @@ void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) > > > if (vq->call_ctx && vhost_notify(dev, vq)) > > > eventfd_signal(vq->call_ctx, 1); > > > } > > > +EXPORT_SYMBOL_GPL(vhost_signal); > > > > > > /* And here's the...
2010 May 11
1
[PATCH RFC] vhost: fix barrier pairing
...--git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index e69d238..14fa2f5 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1035,7 +1035,10 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) /* This actually signals the guest, using eventfd. */ void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) { - __u16 flags = 0; + __u16 flags; + /* Flush out used index updates. */ + smp_mb(); + if (get_user(flags, &vq->avail->flags)) { vq_err(vq, "Failed to get flags"); return; -- 1.7.1.12.g42b7f
2010 May 11
1
[PATCH RFC] vhost: fix barrier pairing
...--git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index e69d238..14fa2f5 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1035,7 +1035,10 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) /* This actually signals the guest, using eventfd. */ void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) { - __u16 flags = 0; + __u16 flags; + /* Flush out used index updates. */ + smp_mb(); + if (get_user(flags, &vq->avail->flags)) { vq_err(vq, "Failed to get flags"); return; -- 1.7.1.12.g42b7f
2010 Apr 06
1
[PATCH v3] Add Mergeable receive buffer support to vhost_net
..."Failed to increment used idx"); return -EFAULT; } @@ -1023,7 +1075,7 @@ int vhost_add_used(struct vhost_virtqueu if (vq->log_ctx) eventfd_signal(vq->log_ctx, 1); } - vq->last_used_idx++; + vq->last_used_idx += count; return 0; } @@ -1049,10 +1101,23 @@ void vhost_signal(struct vhost_dev *dev, /* And here's the combo meal deal. Supersize me! */ void vhost_add_used_and_signal(struct vhost_dev *dev, - struct vhost_virtqueue *vq, - unsigned int head, int len) + struct vhost_virtqueue *vq, unsigned int id, + int len) +{ +...
2010 Apr 06
1
[PATCH v3] Add Mergeable receive buffer support to vhost_net
..."Failed to increment used idx"); return -EFAULT; } @@ -1023,7 +1075,7 @@ int vhost_add_used(struct vhost_virtqueu if (vq->log_ctx) eventfd_signal(vq->log_ctx, 1); } - vq->last_used_idx++; + vq->last_used_idx += count; return 0; } @@ -1049,10 +1101,23 @@ void vhost_signal(struct vhost_dev *dev, /* And here's the combo meal deal. Supersize me! */ void vhost_add_used_and_signal(struct vhost_dev *dev, - struct vhost_virtqueue *vq, - unsigned int head, int len) + struct vhost_virtqueue *vq, unsigned int id, + int len) +{ +...
2014 Sep 19
2
[PATCH RFC 2/2] vhost: support urgent descriptors
..., &vq->avail->flags)) { > vq_err(vq, "Failed to get flags"); > return true; > } > + vq->urgent = false; > return !(flags & VRING_AVAIL_F_NO_INTERRUPT); > } > old = vq->signalled_used; > @@ -1468,9 +1475,10 @@ EXPORT_SYMBOL_GPL(vhost_signal); > /* And here's the combo meal deal. Supersize me! */ > void vhost_add_used_and_signal(struct vhost_dev *dev, > struct vhost_virtqueue *vq, > + bool urgent, > unsigned int head, int len) > { > - vhost_add_used(vq, head, len); > + vh...
2014 Sep 19
2
[PATCH RFC 2/2] vhost: support urgent descriptors
..., &vq->avail->flags)) { > vq_err(vq, "Failed to get flags"); > return true; > } > + vq->urgent = false; > return !(flags & VRING_AVAIL_F_NO_INTERRUPT); > } > old = vq->signalled_used; > @@ -1468,9 +1475,10 @@ EXPORT_SYMBOL_GPL(vhost_signal); > /* And here's the combo meal deal. Supersize me! */ > void vhost_add_used_and_signal(struct vhost_dev *dev, > struct vhost_virtqueue *vq, > + bool urgent, > unsigned int head, int len) > { > - vhost_add_used(vq, head, len); > + vh...
2010 Apr 26
1
[PATCH v6] Add mergeable rx buffer support to vhost_net
...ed_idx % vq->num; + n = min(vq->num - start, count); + if (n < count) { + r = __vhost_add_used_n(vq, heads, n); + if (r < 0) + return r; + heads += n; + count -= n; + } + return __vhost_add_used_n(vq, heads, count); +} + /* This actually signals the guest, using eventfd. */ void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) { @@ -1062,6 +1172,15 @@ void vhost_add_used_and_signal(struct vh vhost_signal(dev, vq); } +/* multi-buffer version of vhost_add_used_and_signal */ +void vhost_add_used_and_signal_n(struct vhost_dev *dev, + struct vhost_virtqueue *vq, +...
2010 Apr 26
1
[PATCH v6] Add mergeable rx buffer support to vhost_net
...ed_idx % vq->num; + n = min(vq->num - start, count); + if (n < count) { + r = __vhost_add_used_n(vq, heads, n); + if (r < 0) + return r; + heads += n; + count -= n; + } + return __vhost_add_used_n(vq, heads, count); +} + /* This actually signals the guest, using eventfd. */ void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) { @@ -1062,6 +1172,15 @@ void vhost_add_used_and_signal(struct vh vhost_signal(dev, vq); } +/* multi-buffer version of vhost_add_used_and_signal */ +void vhost_add_used_and_signal_n(struct vhost_dev *dev, + struct vhost_virtqueue *vq, +...
2015 Feb 09
10
[PATCH RFC v5 net-next 0/6] enable tx interrupts for virtio-net
...it(), try to enable the callback only when current skb is the last in the list or tx has already been stopped. This avoid the callbacks enabling in heavy load. - return ns instead of us in vhost_net_check_coalesce_and_signal() - measure the time interval of real interrupts instead of calls to vhost_signal() - drop bql from the series since it does not affact performance from the test result. Changes from RFC V3: - Don't free tx packets in ndo_start_xmit() - Add interrupt coalescing support for virtio-net Changes from RFC v2: - clean up code, address issues raised by Jason Changes from RFC v1...
2015 Feb 09
10
[PATCH RFC v5 net-next 0/6] enable tx interrupts for virtio-net
...it(), try to enable the callback only when current skb is the last in the list or tx has already been stopped. This avoid the callbacks enabling in heavy load. - return ns instead of us in vhost_net_check_coalesce_and_signal() - measure the time interval of real interrupts instead of calls to vhost_signal() - drop bql from the series since it does not affact performance from the test result. Changes from RFC V3: - Don't free tx packets in ndo_start_xmit() - Add interrupt coalescing support for virtio-net Changes from RFC v2: - clean up code, address issues raised by Jason Changes from RFC v1...
2013 Jul 07
0
[PATCH v2 03/11] vhost: Make vhost a separate module
...t; > > > return r; > > > > } > > > > +EXPORT_SYMBOL_GPL(vhost_add_used_n); > > > > > > > > static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > > > > { > > > > @@ -1456,6 +1482,7 @@ void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) > > > > if (vq->call_ctx && vhost_notify(dev, vq)) > > > > eventfd_signal(vq->call_ctx, 1); > > > > } > > > > +EXPORT_SYMBOL_GPL(vhost_signal); > > > > > > &g...
2010 May 18
2
[PATCH] vhost-net: utilize PUBLISH_USED_IDX feature
...n) +static int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, + int len) { struct vring_used_elem __user *used; @@ -1034,9 +1037,10 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) } /* This actually signals the guest, using eventfd. */ -void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) +static void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) { __u16 flags; + __u16 used; /* Flush out used index updates. This is paired * with the barrier that the Guest executes when enabling * interrupts. */ @@ -105...
2010 May 18
2
[PATCH] vhost-net: utilize PUBLISH_USED_IDX feature
...n) +static int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, + int len) { struct vring_used_elem __user *used; @@ -1034,9 +1037,10 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) } /* This actually signals the guest, using eventfd. */ -void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) +static void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) { __u16 flags; + __u16 used; /* Flush out used index updates. This is paired * with the barrier that the Guest executes when enabling * interrupts. */ @@ -105...