virtio: make add_buf return capacity remaining
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 24 Sep 2009 04:26:31 +0000 (22:26 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 23 Sep 2009 12:56:31 +0000 (21:56 +0930)
commit3c1b27d5043086a485f8526353ae9fe37bfa1065
treee3b6eda3c66bcd1fc3af6e7fa6e4e3af77459474
parentf68d24082e22ccee3077d11aeb6dc5354f0ca7f1
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>
drivers/block/virtio_blk.c
drivers/char/hw_random/virtio-rng.c
drivers/char/virtio_console.c
drivers/net/virtio_net.c
drivers/virtio/virtio_balloon.c
drivers/virtio/virtio_ring.c
include/linux/virtio.h
net/9p/trans_virtio.c