[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZHtQybyy3qg+xw10@corigine.com>
Date: Sat, 3 Jun 2023 16:40:09 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Shunsuke Mie <mie@...l.co.jp>
Cc: "Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Rusty Russell <rusty@...tcorp.com.au>, kvm@...r.kernel.org,
virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/1] vringh: IOMEM support
On Fri, Jun 02, 2023 at 02:52:11PM +0900, Shunsuke Mie wrote:
> Introduce a new memory accessor for vringh. It is able to use vringh to
> virtio rings located on io-memory region.
>
> Signed-off-by: Shunsuke Mie <mie@...l.co.jp>
...
> +/**
> + * vringh_iov_pull_iomem - copy bytes from vring_iov.
Hi Mie-san,
as it looks like there will be a v2,
please consider documenting the vrh parameter here.
> + * @riov: the riov as passed to vringh_getdesc_iomem() (updated as we consume)
> + * @dst: the place to copy.
> + * @len: the maximum length to copy.
> + *
> + * Returns the bytes copied <= len or a negative errno.
> + */
> +ssize_t vringh_iov_pull_iomem(struct vringh *vrh, struct vringh_kiov *riov,
> + void *dst, size_t len)
> +{
> + return vringh_iov_xfer(vrh, riov, dst, len, xfer_from_iomem);
> +}
> +EXPORT_SYMBOL(vringh_iov_pull_iomem);
> +
> +/**
> + * vringh_iov_push_iomem - copy bytes into vring_iov.
And here.
> + * @wiov: the wiov as passed to vringh_getdesc_iomem() (updated as we consume)
> + * @src: the place to copy from.
> + * @len: the maximum length to copy.
> + *
> + * Returns the bytes copied <= len or a negative errno.
> + */
> +ssize_t vringh_iov_push_iomem(struct vringh *vrh, struct vringh_kiov *wiov,
> + const void *src, size_t len)
> +{
> + return vringh_iov_xfer(vrh, wiov, (void *)src, len, xfer_to_iomem);
> +}
> +EXPORT_SYMBOL(vringh_iov_push_iomem);
...
Powered by blists - more mailing lists