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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jul 2019 22:00:00 +0000 (15:00 -0700)
commit6dbd3e66e7785a2f055bf84d98de9b8fd31ff3f5
treeae2446395722f6e26af872493a533ec97c691b20
parent9632e9f61bc4191411c47933abe5f2d93c578f5e
vhost/vsock: split packets to send using multiple buffers

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>
drivers/vhost/vsock.c
net/vmw_vsock/virtio_transport_common.c