diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-09-24 00:26:31 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-09-23 08:56:31 -0400 |
commit | 3c1b27d5043086a485f8526353ae9fe37bfa1065 (patch) | |
tree | e3b6eda3c66bcd1fc3af6e7fa6e4e3af77459474 /include/linux | |
parent | f68d24082e22ccee3077d11aeb6dc5354f0ca7f1 (diff) |
virtio: make add_buf return capacity remaining
This API change means that virtio_net can tell how much capacity
remains for buffers. It's necessarily fuzzy, since
VIRTIO_RING_F_INDIRECT_DESC means we can fit any number of descriptors
in one, *if* we can kmalloc.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Dinesh Subhraveti <dineshs@us.ibm.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/virtio.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 4fca4f5440ba..057a2e010758 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
@@ -34,7 +34,7 @@ struct virtqueue { | |||
34 | * out_num: the number of sg readable by other side | 34 | * out_num: the number of sg readable by other side |
35 | * in_num: the number of sg which are writable (after readable ones) | 35 | * in_num: the number of sg which are writable (after readable ones) |
36 | * data: the token identifying the buffer. | 36 | * data: the token identifying the buffer. |
37 | * Returns 0 or an error. | 37 | * Returns remaining capacity of queue (sg segments) or a negative error. |
38 | * @kick: update after add_buf | 38 | * @kick: update after add_buf |
39 | * vq: the struct virtqueue | 39 | * vq: the struct virtqueue |
40 | * After one or more add_buf calls, invoke this to kick the other side. | 40 | * After one or more add_buf calls, invoke this to kick the other side. |