vsock: read from socket's error queue
authorArseniy Krasnov <avkrasnov@salutedevices.com>
Tue, 10 Oct 2023 19:15:14 +0000 (22:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:19:38 +0000 (17:19 +0000)
commitd55a40a6fbeda6e0b96acce4729a88a98cb74106
tree45085e33006b90942480cd0a1c39eef80f4315c3
parent0570c9fd1609da5d981a181892fa74bbd1ca860a
vsock: read from socket's error queue

[ Upstream commit 49dbe25adac42d3e06f65d1420946bec65896222 ]

This adds handling of MSG_ERRQUEUE input flag in receive call. This flag
is used to read socket's error queue instead of data queue. Possible
scenario of error queue usage is receiving completions for transmission
with MSG_ZEROCOPY flag. This patch also adds new defines: 'SOL_VSOCK'
and 'VSOCK_RECVERR'.

Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/socket.h
include/uapi/linux/vm_sockets.h
net/vmw_vsock/af_vsock.c