Skip to content

Commit 482bd84

Browse files
committed
virtio: document ENOSPC
drivers handle ENOSPC specially since it's an error one can get from a working VQ. Document the semantics. Message-Id: <2e6ec46b8d5e6755be291cec8e2ec57ef286e97b.1748356035.git.mst@redhat.com> Reported-by: Parav Pandit <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Parav Pandit <[email protected]>
1 parent 2507789 commit 482bd84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/virtio/virtio_ring.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2296,6 +2296,10 @@ static inline int virtqueue_add(struct virtqueue *_vq,
22962296
* at the same time (except where noted).
22972297
*
22982298
* Returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO).
2299+
*
2300+
* NB: ENOSPC is a special code that is only returned on an attempt to add a
2301+
* buffer to a full VQ. It indicates that some buffers are outstanding and that
2302+
* the operation can be retried after some buffers have been used.
22992303
*/
23002304
int virtqueue_add_sgs(struct virtqueue *_vq,
23012305
struct scatterlist *sgs[],

0 commit comments

Comments
 (0)