mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
f68d24082e
commit
3c1b27d504
8 changed files with 19 additions and 15 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue