search for: __vhost_get_vq_desc

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

2017 Sep 22
1
[PATCH net-next RFC 1/5] vhost: split out ring head fetching logic
...two > + * iovecs, but we pack them into one and note how many of each there were. > + * > + * This function returns the descriptor number found, or vq->num (which is > + * never a valid descriptor number) if none was found. A negative code is > + * returned on error. */ > +int __vhost_get_vq_desc(struct vhost_virtqueue *vq, > + struct iovec iov[], unsigned int iov_size, > + unsigned int *out_num, unsigned int *in_num, > + struct vhost_log *log, unsigned int *log_num, > + __virtio16 head) [...] > +int vhost_get_vq_desc(struct vhost_virtqueue *vq, > + struct i...
2017 Sep 22
1
[PATCH net-next RFC 1/5] vhost: split out ring head fetching logic
...two > + * iovecs, but we pack them into one and note how many of each there were. > + * > + * This function returns the descriptor number found, or vq->num (which is > + * never a valid descriptor number) if none was found. A negative code is > + * returned on error. */ > +int __vhost_get_vq_desc(struct vhost_virtqueue *vq, > + struct iovec iov[], unsigned int iov_size, > + unsigned int *out_num, unsigned int *in_num, > + struct vhost_log *log, unsigned int *log_num, > + __virtio16 head) [...] > +int vhost_get_vq_desc(struct vhost_virtqueue *vq, > + struct i...
2017 Sep 22
0
[PATCH net-next RFC 1/5] vhost: split out ring head fetching logic
...escriptors, it's actually two + * iovecs, but we pack them into one and note how many of each there were. + * + * This function returns the descriptor number found, or vq->num (which is + * never a valid descriptor number) if none was found. A negative code is + * returned on error. */ +int __vhost_get_vq_desc(struct vhost_virtqueue *vq, + struct iovec iov[], unsigned int iov_size, + unsigned int *out_num, unsigned int *in_num, + struct vhost_log *log, unsigned int *log_num, + __virtio16 head) +{ + struct vring_desc desc; + unsigned int i, found = 0; + int ret = 0, access; /* If their number...
2017 Sep 27
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...ed_elem *heads, > > > unsigned count) > > > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > > > index 16c2cb6..5dd6c05 100644 > > > --- a/drivers/vhost/vhost.h > > > +++ b/drivers/vhost/vhost.h > > > @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq, > > > void vhost_discard_vq_desc(struct vhost_virtqueue *, int n); > > > int vhost_vq_init_access(struct vhost_virtqueue *); > > > +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n); > > > int vhost_add_used(struct vhost_...
2017 Sep 27
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...ed_elem *heads, > > > unsigned count) > > > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > > > index 16c2cb6..5dd6c05 100644 > > > --- a/drivers/vhost/vhost.h > > > +++ b/drivers/vhost/vhost.h > > > @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq, > > > void vhost_discard_vq_desc(struct vhost_virtqueue *, int n); > > > int vhost_vq_init_access(struct vhost_virtqueue *); > > > +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n); > > > int vhost_add_used(struct vhost_...
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...ed_n(struct vhost_virtqueue *vq, > struct vring_used_elem *heads, > unsigned count) > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 16c2cb6..5dd6c05 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq, > void vhost_discard_vq_desc(struct vhost_virtqueue *, int n); > > int vhost_vq_init_access(struct vhost_virtqueue *); > +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n); > int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int...
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...ed_n(struct vhost_virtqueue *vq, > struct vring_used_elem *heads, > unsigned count) > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 16c2cb6..5dd6c05 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq, > void vhost_discard_vq_desc(struct vhost_virtqueue *, int n); > > int vhost_vq_init_access(struct vhost_virtqueue *); > +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n); > int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int...
2017 Sep 22
17
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
Hi: This series tries to implement basic tx batched processing. This is done by prefetching descriptor indices and update used ring in a batch. This intends to speed up used ring updating and improve the cache utilization. Test shows about ~22% improvement in tx pss. Please review. Jason Wang (5): vhost: split out ring head fetching logic vhost: introduce helper to prefetch desc index
2017 Sep 22
17
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
Hi: This series tries to implement basic tx batched processing. This is done by prefetching descriptor indices and update used ring in a batch. This intends to speed up used ring updating and improve the cache utilization. Test shows about ~22% improvement in tx pss. Please review. Jason Wang (5): vhost: split out ring head fetching logic vhost: introduce helper to prefetch desc index
2017 Sep 22
0
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
..._idx); + static int __vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads, unsigned count) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 16c2cb6..5dd6c05 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq, void vhost_discard_vq_desc(struct vhost_virtqueue *, int n); int vhost_vq_init_access(struct vhost_virtqueue *); +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n); int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int len); int vhost_add_used...
2017 Sep 27
0
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...q, >> struct vring_used_elem *heads, >> unsigned count) >> diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h >> index 16c2cb6..5dd6c05 100644 >> --- a/drivers/vhost/vhost.h >> +++ b/drivers/vhost/vhost.h >> @@ -199,6 +199,7 @@ int __vhost_get_vq_desc(struct vhost_virtqueue *vq, >> void vhost_discard_vq_desc(struct vhost_virtqueue *, int n); >> >> int vhost_vq_init_access(struct vhost_virtqueue *); >> +int vhost_add_used_idx(struct vhost_virtqueue *vq, int n); >> int vhost_add_used(struct vhost_virtqueue *,...
2017 Sep 22
0
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
...msg_control = ubuf; - msg.msg_controllen = sizeof(ubuf); - ubufs = nvq->ubufs; - atomic_inc(&ubufs->refcount); - nvq->upend_idx = (nvq->upend_idx + 1) % UIO_MAXIOV; - } else { - msg.msg_control = NULL; - ubufs = NULL; - } + for (i = 0; i < avails; i++) { + head = __vhost_get_vq_desc(vq, vq->iov, + ARRAY_SIZE(vq->iov), + &out, &in, NULL, NULL, + vhost16_to_cpu(vq, heads[i].id)); + if (in) { + vq_err(vq, "Unexpected descriptor format for " + "TX: out %d, int %d\n", out, in); + goto out; + } - total_...
2017 Sep 26
2
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
...sizeof(ubuf); > - ubufs = nvq->ubufs; > - atomic_inc(&ubufs->refcount); > - nvq->upend_idx = (nvq->upend_idx + 1) % UIO_MAXIOV; > - } else { > - msg.msg_control = NULL; > - ubufs = NULL; > - } > + for (i = 0; i < avails; i++) { > + head = __vhost_get_vq_desc(vq, vq->iov, > + ARRAY_SIZE(vq->iov), > + &out, &in, NULL, NULL, > + vhost16_to_cpu(vq, heads[i].id)); > + if (in) { > + vq_err(vq, "Unexpected descriptor format for " > + "TX: out %d, int %d\n", out, in); &g...
2017 Sep 26
2
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
...sizeof(ubuf); > - ubufs = nvq->ubufs; > - atomic_inc(&ubufs->refcount); > - nvq->upend_idx = (nvq->upend_idx + 1) % UIO_MAXIOV; > - } else { > - msg.msg_control = NULL; > - ubufs = NULL; > - } > + for (i = 0; i < avails; i++) { > + head = __vhost_get_vq_desc(vq, vq->iov, > + ARRAY_SIZE(vq->iov), > + &out, &in, NULL, NULL, > + vhost16_to_cpu(vq, heads[i].id)); > + if (in) { > + vq_err(vq, "Unexpected descriptor format for " > + "TX: out %d, int %d\n", out, in); &g...