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>
This commit is contained in:
@@ -34,7 +34,7 @@ struct virtqueue {
|
||||
* out_num: the number of sg readable by other side
|
||||
* in_num: the number of sg which are writable (after readable ones)
|
||||
* data: the token identifying the buffer.
|
||||
* Returns 0 or an error.
|
||||
* Returns remaining capacity of queue (sg segments) or a negative error.
|
||||
* @kick: update after add_buf
|
||||
* vq: the struct virtqueue
|
||||
* After one or more add_buf calls, invoke this to kick the other side.
|
||||
|
Reference in New Issue
Block a user