[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210726163137.2589102-1-arseny.krasnov@kaspersky.com>
Date: Mon, 26 Jul 2021 19:31:33 +0300
From: Arseny Krasnov <arseny.krasnov@...persky.com>
To: Stefan Hajnoczi <stefanha@...hat.com>,
Stefano Garzarella <sgarzare@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Arseny Krasnov <arseny.krasnov@...persky.com>,
Colin Ian King <colin.king@...onical.com>,
Andra Paraschiv <andraprs@...zon.com>,
Norbert Slusarek <nslusarek@....net>
CC: <kvm@...r.kernel.org>, <virtualization@...ts.linux-foundation.org>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<oxffffaa@...il.com>
Subject: [RFC PATCH v1 0/7] virtio/vsock: introduce MSG_EOR flag for SEQPACKET
This patchset implements support of MSG_EOR bit for SEQPACKET
AF_VSOCK sockets over virtio transport.
Idea is to distinguish concepts of 'messages' and 'records'.
Message is result of sending calls: 'write()', 'send()', 'sendmsg()'
etc. It has fixed maximum length, and it bounds are visible using
return from receive calls: 'read()', 'recv()', 'recvmsg()' etc.
Current implementation based on message definition above.
Record has unlimited length, it consists of multiple message,
and bounds of record are visible via MSG_EOR flag returned from
'recvmsg()' call. Sender passes MSG_EOR to sending system call and
receiver will see MSG_EOR when corresponding message will be processed.
To support MSG_EOR new bit was added along with existing
'VIRTIO_VSOCK_SEQ_EOR': 'VIRTIO_VSOCK_SEQ_EOM'(end-of-message) - now it
works in the same way as 'VIRTIO_VSOCK_SEQ_EOR'. But 'VIRTIO_VSOCK_SEQ_EOR'
is used to mark 'MSG_EOR' bit passed from userspace.
This patchset includes simple test for MSG_EOR.
Also i've added new vsock test for '-EAGAIN' receive result.
Arseny Krasnov(7):
virtio/vsock: add 'VIRTIO_VSOCK_SEQ_EOM' bit
vsock: rename implementation from 'record' to 'message'
vhost/vsock: support MSG_EOR bit processing
virito/vsock: support MSG_EOR bit processing
af_vsock: rename variables in receive loop
vsock_test: update message bounds test for MSG_EOR
vsock_test: 'SO_RCVTIMEO' test for SEQPACKET
drivers/vhost/vsock.c | 28 +++++++----
include/uapi/linux/virtio_vsock.h | 1 +
net/vmw_vsock/af_vsock.c | 10 ++--
net/vmw_vsock/virtio_transport_common.c | 23 +++++----
tools/testing/vsock/vsock_test.c | 57 ++++++++++++++++++++++-
5 files changed, 96 insertions(+), 23 deletions(-)
Signed-off-by: Arseny Krasnov <arseny.krasnov@...persky.com>
--
2.25.1
Powered by blists - more mailing lists