search for: vhost_put_used_n_bufs

Displaying 14 results from an estimated 14 matches for "vhost_put_used_n_bufs".

2020 Jun 03
2
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...d int head, int len) > } > EXPORT_SYMBOL_GPL(vhost_add_used); > > +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); > + > +int vhost_put_used_n_bufs(struct vhost_virtqueue *vq, > + struct vhost_buf *bufs, unsigned count) > +{ > + unsigned i; > + > + for (i = 0; i < count; ++i) { > + vq->heads[i].id = cpu_to_vhost32(vq, bufs[i].id); > + vq->heads[i].len = cpu_to_vhost32(vq, bufs[i].in_len); > + } > + &gt...
2020 Jun 03
2
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...d int head, int len) > } > EXPORT_SYMBOL_GPL(vhost_add_used); > > +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); > + > +int vhost_put_used_n_bufs(struct vhost_virtqueue *vq, > + struct vhost_buf *bufs, unsigned count) > +{ > + unsigned i; > + > + for (i = 0; i < count; ++i) { > + vq->heads[i].id = cpu_to_vhost32(vq, bufs[i].id); > + vq->heads[i].len = cpu_to_vhost32(vq, bufs[i].in_len); > + } > + &gt...
2020 Jun 02
0
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...nt vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) } EXPORT_SYMBOL_GPL(vhost_add_used); +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); + +int vhost_put_used_n_bufs(struct vhost_virtqueue *vq, + struct vhost_buf *bufs, unsigned count) +{ + unsigned i; + + for (i = 0; i < count; ++i) { + vq->heads[i].id = cpu_to_vhost32(vq, bufs[i].id); + vq->heads[i].len = cpu_to_vhost32(vq, bufs[i].in_len); + } + + return vhost_add_used_n(vq, vq->heads, coun...
2020 Jun 04
0
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...t; > EXPORT_SYMBOL_GPL(vhost_add_used); > > +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); > > + > > +int vhost_put_used_n_bufs(struct vhost_virtqueue *vq, > > + struct vhost_buf *bufs, unsigned count) > > +{ > > + unsigned i; > > + > > + for (i = 0; i < count; ++i) { > > + vq->heads[i].id = cpu_to_vhost32(vq, bufs[i].id); > > + vq->heads[i].len = cpu_to_vhost32(vq, b...
2020 Jun 07
0
[PATCH RFC v5 13/13] vhost: drop head based APIs
...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 guest, using vhost_signal. */ int vhost_put_used_n_bufs(struct vhost_virtqueue *vq, struct vhost_buf *bufs, unsigned count) { @@ -2580,26 +2580,6 @@ void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) } EXPORT_SYMBOL_GPL(vhost_signal); -/* And here's the combo meal deal. Supersize me! */ -void vhost_add_used_and_signal(s...
2020 Jun 03
1
[PATCH RFC 08/13] vhost/net: convert to new API: heads->bufs
...+ nvq->bufs[i].in_len = VHOST_DMA_CLEAR_LEN; > ++j; > } else > break; > } > while (j) { > add = min(UIO_MAXIOV - nvq->done_idx, j); > - vhost_add_used_and_signal_n(vq->dev, vq, > - &vq->heads[nvq->done_idx], add); > + vhost_put_used_n_bufs(vq, &nvq->bufs[nvq->done_idx], add); > + vhost_signal(vq->dev, vq); > nvq->done_idx = (nvq->done_idx + add) % UIO_MAXIOV; > j -= add; > } > @@ -390,7 +401,7 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) > rcu_read_lo...
2020 Jun 02
21
[PATCH RFC 00/13] vhost: format independence
We let the specifics of the ring format seep through to vhost API callers - mostly because there was only one format so it was hard to imagine what an independent API would look like. Now that there's an alternative in form of the packed ring, it's easier to see the issues, and fixing them is perhaps the cleanest way to add support for more formats. This patchset does this by indtroducing
2020 Jun 02
0
[PATCH RFC 08/13] vhost/net: convert to new API: heads->bufs
...if (VHOST_DMA_IS_DONE(nvq->bufs[i].in_len)) { + nvq->bufs[i].in_len = VHOST_DMA_CLEAR_LEN; ++j; } else break; } while (j) { add = min(UIO_MAXIOV - nvq->done_idx, j); - vhost_add_used_and_signal_n(vq->dev, vq, - &vq->heads[nvq->done_idx], add); + vhost_put_used_n_bufs(vq, &nvq->bufs[nvq->done_idx], add); + vhost_signal(vq->dev, vq); nvq->done_idx = (nvq->done_idx + add) % UIO_MAXIOV; j -= add; } @@ -390,7 +401,7 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) rcu_read_lock_bh(); /* set len to mark th...
2020 Jun 07
17
[PATCH RFC v5 00/13] vhost: ring format independence
This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. Used ring is similar: we fetch into an independent struct first, convert that to IOV later. The point is that we have a tight loop that fetches descriptors, which is good for cache utilization. This will
2020 Jun 10
18
[PATCH RFC v7 00/14] vhost: ring format independence
This intentionally leaves "fixup" changes separate - hopefully that is enough to fix vhost-net crashes reported here, but it helps me keep track of what changed. I will naturally squash them later when we are done. This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that
2020 Jun 10
18
[PATCH RFC v7 00/14] vhost: ring format independence
This intentionally leaves "fixup" changes separate - hopefully that is enough to fix vhost-net crashes reported here, but it helps me keep track of what changed. I will naturally squash them later when we are done. This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that
2020 Jun 08
14
[PATCH RFC v6 00/11] vhost: ring format independence
This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. Used ring is similar: we fetch into an independent struct first, convert that to IOV later. The point is that we have a tight loop that fetches descriptors, which is good for cache utilization. This will
2020 Jun 11
27
[PATCH RFC v8 00/11] vhost: ring format independence
This still causes corruption issues for people so don't try to use in production please. Posting to expedite debugging. This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. Used ring is similar: we fetch into an independent struct first, convert that to
2020 Jun 11
27
[PATCH RFC v8 00/11] vhost: ring format independence
This still causes corruption issues for people so don't try to use in production please. Posting to expedite debugging. This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. Used ring is similar: we fetch into an independent struct first, convert that to