vhost/vsock: split packets to send using multiple buffers
authorStefano Garzarella <sgarzare@redhat.com>
Tue, 30 Jul 2019 15:43:33 +0000 (17:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:13:11 +0000 (09:13 +0100)
commit4e846d399cde242861c0705a702d95a0e707d4fc
tree98bb70fc3761787a1f6daf3f6e79bc61184f8c55
parentfaacb24993b5505eaa60a1607aa6d16497568188
vhost/vsock: split packets to send using multiple buffers

commit 6dbd3e66e7785a2f055bf84d98de9b8fd31ff3f5 upstream.

If the packets to sent to the guest are bigger than the buffer
available, we can split them, using multiple buffers and fixing
the length in the packet header.
This is safe since virtio-vsock supports only stream sockets.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vhost/vsock.c
net/vmw_vsock/virtio_transport_common.c