]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'virtio-vsock-seqpacket'
authorDavid S. Miller <davem@davemloft.net>
Fri, 11 Jun 2021 20:32:47 +0000 (13:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Jun 2021 20:32:47 +0000 (13:32 -0700)
commit05ccc9b53f39d9bef7df2adc6fee6df18e176146
tree931dad375142b264b57994224aed62a4e9457027
parent1328b604870862d2d9afe47bde3edaf0a00a0e3b
parent16b7ea2542a0519610462db2dbd76e2972abb254
Merge branch 'virtio-vsock-seqpacket'

Arseny Krasnov says:

====================
virtio/vsock: introduce SOCK_SEQPACKET support

This patchset implements support of SOCK_SEQPACKET for virtio
transport.
As SOCK_SEQPACKET guarantees to save record boundaries, so to
do it, new bit for field 'flags' was added: SEQ_EOR. This bit is
set to 1 in last RW packet of message.
Now as  packets of one socket are not reordered neither on vsock
nor on vhost transport layers, such bit allows to restore original
message on receiver's side. If user's buffer is smaller than message
length, when all out of size data is dropped.
Maximum length of datagram is limited by 'peer_buf_alloc' value.
Implementation also supports 'MSG_TRUNC' flags.
Tests also implemented.

Thanks to stsp2@yandex.ru for encouragements and initial design
recommendations.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>