]> www.infradead.org Git - users/dwmw2/linux.git/commit
vsock/virtio: add SIOCOUTQ support for all virtio based transports
authorLuigi Leonardi <luigi.leonardi@outlook.com>
Tue, 30 Jul 2024 19:43:07 +0000 (21:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Aug 2024 08:20:28 +0000 (09:20 +0100)
commite6ab45005772014ce49a693a63f928203c0cbbb0
treee9ea6a13aec5f4a2df45f5ebea0e27f601d7c792
parent744500d81f81346b4d442809c0511684bb28c829
vsock/virtio: add SIOCOUTQ support for all virtio based transports

Introduce support for virtio_transport_unsent_bytes
ioctl for virtio_transport, vhost_vsock and vsock_loopback.

For all transports the unsent bytes counter is incremented
in virtio_transport_get_credit.

In virtio_transport (G2H) and in vhost-vsock (H2G) the counter
is decremented when the skbuff is consumed. In vsock_loopback the
same skbuff is passed from the transmitter to the receiver, so
the counter is decremented before queuing the skbuff to the
receiver.

Signed-off-by: Luigi Leonardi <luigi.leonardi@outlook.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/vsock.c
include/linux/virtio_vsock.h
net/vmw_vsock/virtio_transport.c
net/vmw_vsock/virtio_transport_common.c
net/vmw_vsock/vsock_loopback.c