Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <parav@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>

+4
+4
drivers/virtio/virtio_ring.c
··· 2296 2296 * at the same time (except where noted). 2297 2297 * 2298 2298 * 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. 2299 2303 */ 2300 2304 int virtqueue_add_sgs(struct virtqueue *_vq, 2301 2305 struct scatterlist *sgs[],