search for: vring_used_elem

Displaying 20 results from an estimated 443 matches for "vring_used_elem".

2019 Jul 17
17
[PATCH V3 00/15] Packed virtqueue support for vhost
...itch TX to use shadow used ring API vhost_net: calculate last used length once for mergeable buffer vhost_net: switch to use shadow used ring API for RX vhost: do not export vhost_add_used_n() and vhost_add_used_and_signal_n() vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost: vhost_put_user() can accept metadata type vhost: packed ring support vhost: event suppression for packed ring vhost: enable packed virtqueues drivers/vhost/net.c | 200 +++--- drivers/vhost/scsi.c | 72 +- drivers/vhost/test.c | 6 +- drivers/vhost/vhost.c | 1508 ++++++++...
2019 Jul 17
17
[PATCH V3 00/15] Packed virtqueue support for vhost
...itch TX to use shadow used ring API vhost_net: calculate last used length once for mergeable buffer vhost_net: switch to use shadow used ring API for RX vhost: do not export vhost_add_used_n() and vhost_add_used_and_signal_n() vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost: vhost_put_user() can accept metadata type vhost: packed ring support vhost: event suppression for packed ring vhost: enable packed virtqueues drivers/vhost/net.c | 200 +++--- drivers/vhost/scsi.c | 72 +- drivers/vhost/test.c | 6 +- drivers/vhost/vhost.c | 1508 ++++++++...
2011 Aug 27
1
[PATCH] virtio: fix size computation according to the definition of struct vring_used in vring_size
The patch is against 3.1-rc3. struct vring_used has two __u16 fields plus array of struct vring_used_elem. Current vring_size counts the __u16 fields to 3. Fix it to 2 in the patch. Signed-off-by: Wang Sheng-Hui <shhuiw at gmail.com> --- include/linux/virtio_ring.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h...
2011 Aug 27
1
[PATCH] virtio: fix size computation according to the definition of struct vring_used in vring_size
The patch is against 3.1-rc3. struct vring_used has two __u16 fields plus array of struct vring_used_elem. Current vring_size counts the __u16 fields to 3. Fix it to 2 in the patch. Signed-off-by: Wang Sheng-Hui <shhuiw at gmail.com> --- include/linux/virtio_ring.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h...
2018 Apr 23
11
[RFC V3 PATCH 0/8] Packed ring for vhost
...rocopy support. - vIOMMU support. - SCSI/VSOCK support (compile test only). - Fix several bugs For simplicity, I don't implement batching or other optimizations. Please review. Jason Wang (8): vhost: move get_rx_bufs to vhost.c vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost_net: do not explicitly manipulate vhost_used_elem vhost: vhost_put_user() can accept metadata type virtio: introduce packed ring defines vhost: packed ring support vhost: event suppression for packed ring drivers/vhost/net.c | 136 ++---- drivers/vhost/scsi.c...
2018 Apr 23
11
[RFC V3 PATCH 0/8] Packed ring for vhost
...rocopy support. - vIOMMU support. - SCSI/VSOCK support (compile test only). - Fix several bugs For simplicity, I don't implement batching or other optimizations. Please review. Jason Wang (8): vhost: move get_rx_bufs to vhost.c vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost_net: do not explicitly manipulate vhost_used_elem vhost: vhost_put_user() can accept metadata type virtio: introduce packed ring defines vhost: packed ring support vhost: event suppression for packed ring drivers/vhost/net.c | 136 ++---- drivers/vhost/scsi.c...
2018 Mar 26
12
[RFC PATCH V2 0/8] Packed ring for vhost
...upport. - vIOMMU support. - SCSI/VSOCK support (compile test only). - Fix several bugs For simplicity, I don't implement batching or other optimizations. Please review. Thanks Jason Wang (8): vhost: move get_rx_bufs to vhost.c vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost_net: do not explicitly manipulate vhost_used_elem vhost: vhost_put_user() can accept metadata type virtio: introduce packed ring defines vhost: packed ring support vhost: event suppression for packed ring drivers/vhost/net.c | 138 ++----- drivers/vhost/scsi.c...
2018 Mar 26
12
[RFC PATCH V2 0/8] Packed ring for vhost
...upport. - vIOMMU support. - SCSI/VSOCK support (compile test only). - Fix several bugs For simplicity, I don't implement batching or other optimizations. Please review. Thanks Jason Wang (8): vhost: move get_rx_bufs to vhost.c vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost_net: do not explicitly manipulate vhost_used_elem vhost: vhost_put_user() can accept metadata type virtio: introduce packed ring defines vhost: packed ring support vhost: event suppression for packed ring drivers/vhost/net.c | 138 ++----- drivers/vhost/scsi.c...
2018 May 16
12
[RFC V4 PATCH 0/8] Packed ring layout for vhost
...ion support (compile test only). - Indirect descriptor support (compile test only). - Zerocopy support. - vIOMMU support. - SCSI/VSOCK support (compile test only). - Fix several bugs Jason Wang (8): vhost: move get_rx_bufs to vhost.c vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost_net: do not explicitly manipulate vhost_used_elem vhost: vhost_put_user() can accept metadata type virtio: introduce packed ring defines vhost: packed ring support vhost: event suppression for packed ring drivers/vhost/net.c | 136 ++---- drivers/vhost/scsi.c...
2018 May 16
12
[RFC V4 PATCH 0/8] Packed ring layout for vhost
...ion support (compile test only). - Indirect descriptor support (compile test only). - Zerocopy support. - vIOMMU support. - SCSI/VSOCK support (compile test only). - Fix several bugs Jason Wang (8): vhost: move get_rx_bufs to vhost.c vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost_net: do not explicitly manipulate vhost_used_elem vhost: vhost_put_user() can accept metadata type virtio: introduce packed ring defines vhost: packed ring support vhost: event suppression for packed ring drivers/vhost/net.c | 136 ++---- drivers/vhost/scsi.c...
2020 Apr 20
2
[PATCH v3] virtio: force spec specified alignment on types
...using the header in the buggy way - so fixing header and asking userspace to recompile is the best we can do. I verified that the produced kernel binary on x86 is exactly identical before and after the change. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- changes from v2: add vring_used_elem_t to ensure alignment for substructures changes from v1: swicth all __user to the new typedefs drivers/vhost/vhost.c | 8 +++--- drivers/vhost/vhost.h | 6 ++--- drivers/vhost/vringh.c | 6 ++--- include/linux/vringh.h | 6 ++--- include/uapi/linux/v...
2020 Apr 20
2
[PATCH v3] virtio: force spec specified alignment on types
...using the header in the buggy way - so fixing header and asking userspace to recompile is the best we can do. I verified that the produced kernel binary on x86 is exactly identical before and after the change. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- changes from v2: add vring_used_elem_t to ensure alignment for substructures changes from v1: swicth all __user to the new typedefs drivers/vhost/vhost.c | 8 +++--- drivers/vhost/vhost.h | 6 ++--- drivers/vhost/vringh.c | 6 ++--- include/linux/vringh.h | 6 ++--- include/uapi/linux/v...
2020 Apr 22
2
[PATCH v4] virtio: force spec specified alignment on types
...struct vring_used __user *used) + vring_desc_t __user *desc, + vring_avail_t __user *avail, + vring_used_t __user *used) { return access_ok(desc, vhost_get_desc_size(vq, num)) && @@ -2301,7 +2301,7 @@ static int __vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads, unsigned count) { - struct vring_used_elem __user *used; + vring_used_elem_t __user *used; u16 old, new; int start; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index f8403bd46b85..60cab4c78229 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -6...
2020 Apr 22
2
[PATCH v4] virtio: force spec specified alignment on types
...struct vring_used __user *used) + vring_desc_t __user *desc, + vring_avail_t __user *avail, + vring_used_t __user *used) { return access_ok(desc, vhost_get_desc_size(vq, num)) && @@ -2301,7 +2301,7 @@ static int __vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads, unsigned count) { - struct vring_used_elem __user *used; + vring_used_elem_t __user *used; u16 old, new; int start; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index f8403bd46b85..60cab4c78229 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -6...
2018 Jul 16
11
[PATCH net-next V2 0/8] Packed virtqueue support for vhost
...ion support (compile test only). - Indirect descriptor support (compile test only). - Zerocopy support. - vIOMMU support. - SCSI/VSOCK support (compile test only). - Fix several bugs Jason Wang (8): vhost: move get_rx_bufs to vhost.c vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost_net: do not explicitly manipulate vhost_used_elem vhost: vhost_put_user() can accept metadata type vhost: packed ring support vhost: event suppression for packed ring vhost: enable packed virtqueues drivers/vhost/net.c | 143 ++----- drivers/vhost/scsi.c | 62 +-- dr...
2018 Jul 16
11
[PATCH net-next V2 0/8] Packed virtqueue support for vhost
...ion support (compile test only). - Indirect descriptor support (compile test only). - Zerocopy support. - vIOMMU support. - SCSI/VSOCK support (compile test only). - Fix several bugs Jason Wang (8): vhost: move get_rx_bufs to vhost.c vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost_net: do not explicitly manipulate vhost_used_elem vhost: vhost_put_user() can accept metadata type vhost: packed ring support vhost: event suppression for packed ring vhost: enable packed virtqueues drivers/vhost/net.c | 143 ++----- drivers/vhost/scsi.c | 62 +-- dr...
2010 Apr 06
1
[PATCH v3] Add Mergeable receive buffer support to vhost_net
...re to vhost_net. +-DLS Changes from previous revision: 1) renamed: vhost_discard_vq_desc -> vhost_discard_desc vhost_get_heads -> vhost_get_desc_n vhost_get_vq_desc -> vhost_get_desc 2) added heads as argument to ghost_get_desc_n 3) changed "vq->heads" from iovec to vring_used_elem, removed casts 4) changed vhost_add_used to do multiple elements in a single copy_to_user, or two when we wrap the ring. 5) removed rxmaxheadcount and available buffer checks in favor of running until an allocation failure, but making sure we break the loop if we get two in a row, indicating we...
2010 Apr 06
1
[PATCH v3] Add Mergeable receive buffer support to vhost_net
...re to vhost_net. +-DLS Changes from previous revision: 1) renamed: vhost_discard_vq_desc -> vhost_discard_desc vhost_get_heads -> vhost_get_desc_n vhost_get_vq_desc -> vhost_get_desc 2) added heads as argument to ghost_get_desc_n 3) changed "vq->heads" from iovec to vring_used_elem, removed casts 4) changed vhost_add_used to do multiple elements in a single copy_to_user, or two when we wrap the ring. 5) removed rxmaxheadcount and available buffer checks in favor of running until an allocation failure, but making sure we break the loop if we get two in a row, indicating we...
2018 May 29
9
[RFC V5 PATCH 0/8] Packed ring layout for vhost
...ion support (compile test only). - Indirect descriptor support (compile test only). - Zerocopy support. - vIOMMU support. - SCSI/VSOCK support (compile test only). - Fix several bugs Jason Wang (8): vhost: move get_rx_bufs to vhost.c vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost_net: do not explicitly manipulate vhost_used_elem vhost: vhost_put_user() can accept metadata type virtio: introduce packed ring defines vhost: packed ring support vhost: event suppression for packed ring drivers/vhost/net.c | 144 ++---- drivers/vhost/scsi.c...
2020 Jun 07
0
[PATCH RFC v5 13/13] vhost: drop head based APIs
...*/ @@ -2464,8 +2464,7 @@ static int __vhost_add_used_n(struct vhost_virtqueue *vq, return 0; } -/* After we've used one of their buffers, we tell them about it. We'll then - * want to notify the guest, using eventfd. */ +static int vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads, unsigned count) { @@ -2499,10 +2498,8 @@ int vhost_add_used_n(struct vhost_virtqueue *vq, struct vring_used_elem *heads, } return r; } -EXPORT_SYMBOL_GPL(vhost_add_used_n); -/* After we've used one of their buffers, we tell them about it. We'll then - * want to noti...