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

virtio_ring: fix description of virtqueue_get_buf

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>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

authored by

Felipe Franciosi and committed by
Michael S. Tsirkin
0c7eaf59 b9fd06d0

+1 -1
+1 -1
drivers/virtio/virtio_ring.c
··· 649 649 * @vq: the struct virtqueue we're talking about. 650 650 * @len: the length written into the buffer 651 651 * 652 - * If the driver wrote data into the buffer, @len will be set to the 652 + * If the device wrote data into the buffer, @len will be set to the 653 653 * amount written. This means you don't need to clear the buffer 654 654 * beforehand to ensure there's no data leakage in the case of short 655 655 * writes.