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 /net/9p | |
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 'net/9p')
-rw-r--r-- | net/9p/trans_virtio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 9bf0b737aa51..53c139d31a21 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
@@ -200,7 +200,7 @@ p9_virtio_request(struct p9_client *client, struct p9_req_t *req) | |||
200 | 200 | ||
201 | req->status = REQ_STATUS_SENT; | 201 | req->status = REQ_STATUS_SENT; |
202 | 202 | ||
203 | if (chan->vq->vq_ops->add_buf(chan->vq, chan->sg, out, in, req->tc)) { | 203 | if (chan->vq->vq_ops->add_buf(chan->vq, chan->sg, out, in, req->tc) < 0) { |
204 | P9_DPRINTK(P9_DEBUG_TRANS, | 204 | P9_DPRINTK(P9_DEBUG_TRANS, |
205 | "9p debug: virtio rpc add_buf returned failure"); | 205 | "9p debug: virtio rpc add_buf returned failure"); |
206 | return -EIO; | 206 | return -EIO; |