search for: count_sg

Displaying 8 results from an estimated 8 matches for "count_sg".

Did you mean: count_p
2013 Feb 07
11
[RFC PATCH 0/8] virtio: new API for addition of buffers, scatterlist changes
The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a single call; 2) it does not support chained scatterlists: the buffers must be provided as an array of struct scatterlist. Because of these limitations, virtio-scsi has to copy each request into a scatterlist internal to the driver. It cannot just use the one that was prepared by the
2013 Feb 07
11
[RFC PATCH 0/8] virtio: new API for addition of buffers, scatterlist changes
The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a single call; 2) it does not support chained scatterlists: the buffers must be provided as an array of struct scatterlist. Because of these limitations, virtio-scsi has to copy each request into a scatterlist internal to the driver. It cannot just use the one that was prepared by the
2012 Dec 18
13
[PATCH v2 0/5] Multiqueue virtio-scsi, and API for piecewise buffer submission
Hi all, this series adds multiqueue support to the virtio-scsi driver, based on Jason Wang's work on virtio-net. It uses a simple queue steering algorithm that expects one queue per CPU. LUNs in the same target always use the same queue (so that commands are not reordered); queue switching occurs when the request being queued is the only one for the target. Also based on Jason's
2012 Dec 18
13
[PATCH v2 0/5] Multiqueue virtio-scsi, and API for piecewise buffer submission
Hi all, this series adds multiqueue support to the virtio-scsi driver, based on Jason Wang's work on virtio-net. It uses a simple queue steering algorithm that expects one queue per CPU. LUNs in the same target always use the same queue (so that commands are not reordered); queue switching occurs when the request being queued is the only one for the target. Also based on Jason's
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...ESC_F_NEXT|VRING_DESC_F_WRITE; desc[i].addr = sg_phys(sg); desc[i].len = sg->length; desc[i].next = i+1; - sg++; + i++; } /* Last one doesn't continue. */ @@ -176,12 +182,21 @@ static int vring_add_indirect(struct vring_virtqueue *vq, return head; } +static unsigned int count_sg(struct scatterlist *sg) +{ + unsigned int count = 0; + struct scatterlist *i; + + foreach_sg(sg, i) + count++; + return count; +} + /** * virtqueue_add_buf - expose buffer to other end * @vq: the struct virtqueue we're talking about. - * @sg: the description of the buffer(s). - * @out_num...
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...ESC_F_NEXT|VRING_DESC_F_WRITE; desc[i].addr = sg_phys(sg); desc[i].len = sg->length; desc[i].next = i+1; - sg++; + i++; } /* Last one doesn't continue. */ @@ -176,12 +182,21 @@ static int vring_add_indirect(struct vring_virtqueue *vq, return head; } +static unsigned int count_sg(struct scatterlist *sg) +{ + unsigned int count = 0; + struct scatterlist *i; + + foreach_sg(sg, i) + count++; + return count; +} + /** * virtqueue_add_buf - expose buffer to other end * @vq: the struct virtqueue we're talking about. - * @sg: the description of the buffer(s). - * @out_num...
2013 Feb 12
12
[PATCH 0/9] virtio: new API for addition of buffers, scatterlist changes
...quot;fast-path" function virtqueue_add_buf_single suggested by mst; this is done in patch 8. Compared to the RFC, I have moved the state of virtqueue_add_sg into struct vring_desc, and I replaced virtqueue_add_sg_single with virtqueue_add_buf_single. I renamed the "count" and "count_sg" to "nents" and "nsg" following a suggestion of Stefan Hajnoczi. And of course the patch is now well tested (including virtio-serial, all three virtio-net receive paths, and virtio-blk SG_IO which I hadn't checked for the RFC); anyway this did not bring in new code chan...
2013 Feb 12
12
[PATCH 0/9] virtio: new API for addition of buffers, scatterlist changes
...quot;fast-path" function virtqueue_add_buf_single suggested by mst; this is done in patch 8. Compared to the RFC, I have moved the state of virtqueue_add_sg into struct vring_desc, and I replaced virtqueue_add_sg_single with virtqueue_add_buf_single. I renamed the "count" and "count_sg" to "nents" and "nsg" following a suggestion of Stefan Hajnoczi. And of course the patch is now well tested (including virtio-serial, all three virtio-net receive paths, and virtio-blk SG_IO which I hadn't checked for the RFC); anyway this did not bring in new code chan...