mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] virtio_ring: fix description of virtqueue_get_buf
@ 2016-11-14 14:16 Felipe Franciosi
  2016-11-15  3:21 ` Jason Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Felipe Franciosi @ 2016-11-14 14:16 UTC (permalink / raw)
  To: Michael S. Tsirkin, Jason Wang
  Cc: virtualization, linux-kernel, Felipe Franciosi

The device (not the driver) populates the used ring and includes the len
of how much data was written.

Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
---
 drivers/virtio/virtio_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 489bfc6..8a0d6a9 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -649,7 +649,7 @@ static inline bool more_used(const struct vring_virtqueue *vq)
  * @vq: the struct virtqueue we're talking about.
  * @len: the length written into the buffer
  *
- * If the driver wrote data into the buffer, @len will be set to the
+ * If the device wrote data into the buffer, @len will be set to the
  * amount written.  This means you don't need to clear the buffer
  * beforehand to ensure there's no data leakage in the case of short
  * writes.
-- 
1.9.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] virtio_ring: fix description of virtqueue_get_buf
  2016-11-14 14:16 [PATCH] virtio_ring: fix description of virtqueue_get_buf Felipe Franciosi
@ 2016-11-15  3:21 ` Jason Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2016-11-15  3:21 UTC (permalink / raw)
  To: Felipe Franciosi, Michael S. Tsirkin; +Cc: virtualization, linux-kernel



On 2016年11月14日 22:16, Felipe Franciosi wrote:
> The device (not the driver) populates the used ring and includes the len
> of how much data was written.
>
> Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
> ---
>   drivers/virtio/virtio_ring.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 489bfc6..8a0d6a9 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -649,7 +649,7 @@ static inline bool more_used(const struct vring_virtqueue *vq)
>    * @vq: the struct virtqueue we're talking about.
>    * @len: the length written into the buffer
>    *
> - * If the driver wrote data into the buffer, @len will be set to the
> + * If the device wrote data into the buffer, @len will be set to the
>    * amount written.  This means you don't need to clear the buffer
>    * beforehand to ensure there's no data leakage in the case of short
>    * writes.

Reviewed-by: Jason Wang <jasowang@redhat.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-15  3:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-14 14:16 [PATCH] virtio_ring: fix description of virtqueue_get_buf Felipe Franciosi
2016-11-15  3:21 ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®