[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<CY8PR12MB7195E5B1664941A7B09E5461DC66A@CY8PR12MB7195.namprd12.prod.outlook.com>
Date: Thu, 29 May 2025 06:20:40 +0000
From: Parav Pandit <parav@...dia.com>
To: "Michael S. Tsirkin" <mst@...hat.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
CC: Jason Wang <jasowang@...hat.com>, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>,
"virtualization@...ts.linux.dev" <virtualization@...ts.linux.dev>
Subject: RE: [PATCH] virtio: document ENOSPC
> From: Michael S. Tsirkin <mst@...hat.com>
> Sent: Tuesday, May 27, 2025 7:57 PM
> To: linux-kernel@...r.kernel.org
> Cc: Parav Pandit <parav@...dia.com>; Jason Wang <jasowang@...hat.com>;
> Xuan Zhuo <xuanzhuo@...ux.alibaba.com>; Eugenio Pérez
> <eperezma@...hat.com>; virtualization@...ts.linux.dev
> Subject: [PATCH] virtio: document ENOSPC
>
> drivers handle ENOSPC specially since it's an error one can get from a
> working VQ. Document the semantics.
>
> Reported-by: Parav Pandit <parav@...dia.com>
> Signed-off-by: Michael S. Tsirkin <mst@...hat.com>
> ---
> drivers/virtio/virtio_ring.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index
> b784aab66867..97ab0cce527d 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -2296,6 +2296,10 @@ static inline int virtqueue_add(struct virtqueue
> *_vq,
> * at the same time (except where noted).
> *
> * Returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO).
> + *
> + * NB: ENOSPC is a special code that is only returned on an attempt to
> + add a
> + * buffer to a full VQ. It indicates that some buffers are outstanding
> + and that
> + * the operation can be retried after some buffers have been used.
> */
> int virtqueue_add_sgs(struct virtqueue *_vq,
> struct scatterlist *sgs[],
> --
> MST
Reviewed-by: Parav Pandit <parav@...dia.com>
Powered by blists - more mailing lists