On 13.04.2021 15:47, Arseny Krasnov wrote:
> This add logic, that serializes write access to single socket
> by multiple threads. It is implemented be adding field with TID
> of current writer. When writer tries to send something, it checks
> that field is -1(free), else it sleep in
I'll fix some issues of this patch found by kernel test robot
On 13.04.2021 15:44, Arseny Krasnov wrote:
> This adds transport callback and it's logic for SEQPACKET dequeue.
> Callback fetches RW packets from rx queue of socket until whole record
> is copied(if user's buf
This implementation is PoC and not related to SEQPACKET close, so
i've placed it after whole patchset.
Signed-off-by: Arseny Krasnov
---
include/net/af_vsock.h | 1 +
net/vmw_vsock/af_vsock.c | 10 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/net/af
This adds SEQPACKET socket's type for trace event of virtio vsock.
Signed-off-by: Arseny Krasnov
---
v7 -> v8:
- Code used for SEQ_BEGIN and SEQ_END removed.
include/trace/events/vsock_virtio_transport_common.h | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a
This adds test of SOCK_SEQPACKET socket: it transfer data and
then tests MSG_TRUNC flag. Cases for connect(), bind(), etc. are
not tested, because it is same as for stream socket.
Signed-off-by: Arseny Krasnov
---
v7 -> v8:
- Test for MSG_EOR flags now removed.
tools/testing/vsock/uti
This adds SEQPACKET ops for loopback transport and 'seqpacket_allow()'
callback.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock/vsock_loopback.c | 12
1 file changed, 12 insertions(+)
diff --git a/net/vmw_vsock/vsock_loopback.c b/net
of guest's
rx queue, keep this bit set only when last piece of data is copied.
Signed-off-by: Arseny Krasnov
---
v7 -> v8:
- This patch merged with patch which adds SEQPACKET feature bit to
virtio transport.
- It now handles VIRTIO_VSOCK_SEQ_EOR bit(see commit msg).
drivers/
This adds
1) SEQPACKET ops for virtio transport and 'seqpacket_allow()' callback.
2) Handling of SEQPACKET bit: guest tries to negotiate it with vhost.
Signed-off-by: Arseny Krasnov
---
v7 -> v8:
- This patch merged with patch which adds SEQPACKET feature bit to
virtio tra
This adds rest of logic for SEQPACKET:
1) Send SHUTDOWN on socket close for SEQPACKET type.
2) Set SEQPACKET packet type during send.
3) 'seqpacket_allow' flag to virtio transport.
4) Set 'VIRTIO_VSOCK_SEQ_EOR' bit in flags for last
packet of message.
Signed-off-by: Ar
This modifies current receive logic for SEQPACKET support:
1) Inserts 'RW' packet to socket's rx queue, but without merging with
buffer of last packet in queue.
2) Performs check for packet and socket types on receive(if mismatch,
then reset connection).
Signed-off-by:
will send credit update for rest of record, and sender will wait
for next enter of read syscall at receiver's side. So if user buffer is
full, we just send credit update and drop data.
Signed-off-by: Arseny Krasnov
---
v7 -> v8:
- Things like SEQ_BEGIN, SEQ_END, 'msg_len' and &
This adds set of defines and constants for SOCK_SEQPACKET
support in vsock.
Signed-off-by: Arseny Krasnov
---
v7 -> v8:
- Things like SEQ_BEGIN, SEQ_END, 'msg_len' and 'msg_id' now removed.
Now only last RW packet of each message marked by 'VIRTIO_VSOCK_SEQ_EOR
This function is static and 'hdr' arg was always NULL.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock/virtio_transport_common.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/vmw_vsock/virtio_transport_common.c
b/net
ort_send_
pkt_info()', so callers don't need to set it.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock/virtio_transport_common.c | 19 +--
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/net/vmw_vsock/virtio_
This replaces 'stream' to 'connection oriented' in comments as
SEQPACKET is also connection oriented.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock/af_vsock.c | 31 +--
1 file changed, 17 insertions(+), 14 deleti
This does rest of SOCK_SEQPACKET support:
1) Adds socket ops for SEQPACKET type.
2) Allows to create socket with SEQPACKET type.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
include/net/af_vsock.h | 1 +
net/vmw_vsock/af_vsock.c | 36
This adds some logic to current stream enqueue function for SEQPACKET
support:
1) Use transport's seqpacket enqueue callback.
2) Return value from enqueue function is whole record length or error
for SOCK_SEQPACKET.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
in
in SEQPACKET case.
3) It waits until whole record is received or error is found during
receiving.
4) It processes and sets 'MSG_TRUNC' flag.
So to avoid extra conditions for two types of socket inside one loop, two
independent functions were created.
Signed-off-by: Arseny Krasnov
---
v
Move STREAM specific data receive logic to '__vsock_stream_recvmsg()'
dedicated function, while checks, that will be same for both STREAM
and SEQPACKET sockets, stays in 'vsock_connectible_recvmsg()' shared
functions.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano
This moves wait loop for data to dedicated function, because later it
will be used by SEQPACKET data receive loop. While moving the code
around, let's update an old comment.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock/af_vsock.c
This prepares af_vsock.c for SEQPACKET support: some functions such
as setsockopt(), getsockopt(), connect(), recvmsg(), sendmsg() are
shared between both types of sockets, so rename them in general
manner.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock
initial design
recommendations.
Arseny Krasnov (19):
af_vsock: update functions for connectible socket
af_vsock: separate wait data loop
af_vsock: separate receive data loop
af_vsock: implement SEQPACKET receive loop
af_vsock: implement send logic for SEQPACKET
af_vsock: rest of SEQPAC
On 25.03.2021 13:52, Stefano Garzarella wrote:
> Hi Arseny,
>
> On Tue, Mar 23, 2021 at 04:07:13PM +0300, Arseny Krasnov wrote:
>> This patchset implements support of SOCK_SEQPACKET for virtio
>> transport.
>> As SOCK_SEQPACKET guarantees to save record boun
On 25.03.2021 13:42, Stefano Garzarella wrote:
> On Tue, Mar 23, 2021 at 04:14:18PM +0300, Arseny Krasnov wrote:
>> This also removes ignore of non-stream type of packets and adds
>> 'seqpacket_allow()' callback.
>>
>> Signed-off-by: Arseny Krasnov
On 25.03.2021 13:39, Stefano Garzarella wrote:
> On Tue, Mar 23, 2021 at 04:14:03PM +0300, Arseny Krasnov wrote:
>> This adds SEQPACKET ops for virtio transport and 'seqpacket_allow()'
>> callback.
>>
>> Signed-off-by: Arseny Krasnov
>> -
On 25.03.2021 13:26, Stefano Garzarella wrote:
> On Tue, Mar 23, 2021 at 04:13:49PM +0300, Arseny Krasnov wrote:
>> This adds new virtio vsock specific feature bit which means
>> SOCK_SEQPACKET support. Guest negotiates this bit with vhost,
>> thus checking that vhost si
On 25.03.2021 13:18, Stefano Garzarella wrote:
> On Tue, Mar 23, 2021 at 04:13:29PM +0300, Arseny Krasnov wrote:
>> This adds rest of logic for SEQPACKET:
>> 1) SEQPACKET specific functions which send SEQ_BEGIN/SEQ_END.
>> Note that both functions may sleep to
On 25.03.2021 13:08, Stefano Garzarella wrote:
> On Tue, Mar 23, 2021 at 04:12:55PM +0300, Arseny Krasnov wrote:
>> This adds transport callback which tries to fetch record begin marker
> >from socket's rx queue. It is called from af_vsock.c before reading data
>> packe
On 25.03.2021 12:56, Stefano Garzarella wrote:
> On Tue, Mar 23, 2021 at 04:12:41PM +0300, Arseny Krasnov wrote:
>> This adds transport callback and it's logic for SEQPACKET dequeue.
>> Callback fetches RW packets from rx queue of socket until whole record
>> is copie
On 25.03.2021 12:34, Stefano Garzarella wrote:
> On Tue, Mar 23, 2021 at 04:10:03PM +0300, Arseny Krasnov wrote:
>> This adds receive loop for SEQPACKET. It looks like receive loop for
>> STREAM, but there is a little bit difference:
>> 1) It doesn't call notify callba
This updates current implementation for trace event of virtio vsock:
SEQPACKET socket's type, SEQPACKET specific ops and SEQPACKET 'msg_len'
and 'msg_id' fields are added.
Signed-off-by: Arseny Krasnov
---
.../events/vsock_virtio_transport_common.h| 48 +
This adds two tests of SOCK_SEQPACKET socket: both transfer data and
then test MSG_EOR and MSG_TRUNC flags. Cases for connect(), bind(),
etc. are not tested, because it is same as for stream socket.
Signed-off-by: Arseny Krasnov
---
tools/testing/vsock/util.c | 32 ++--
tools/testing
This adds handling of SEQPACKET bit: guest tries to negotiate it
with vhost.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/virtio_transport.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
index 83ae2078c847
This adds handling of SEQPACKET bit: if guest sets features with
this bit cleared, then SOCK_SEQPACKET support will be disabled.
Signed-off-by: Arseny Krasnov
---
drivers/vhost/vsock.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/vhost/vsock.c b/drivers/vhost
This adds SEQPACKET ops for loopback transport and 'seqpacket_allow()'
callback.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/vsock_loopback.c | 12
1 file changed, 12 insertions(+)
diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c
index a4
This also removes ignore of non-stream type of packets and adds
'seqpacket_allow()' callback.
Signed-off-by: Arseny Krasnov
---
drivers/vhost/vsock.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vso
This adds SEQPACKET ops for virtio transport and 'seqpacket_allow()'
callback.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/virtio_transport.c | 12
1 file changed, 12 insertions(+)
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transpo
packet type during send.
5) Set MSG_EOR in flags for SEQPACKET during send.
6) 'seqpacket_allow' flag to virtio transport.
Signed-off-by: Arseny Krasnov
---
v6 -> v7:
In 'virtio_transport_seqpacket_enqueue()', 'next_tx_msg_id' is updated
in both cases when m
This adds new virtio vsock specific feature bit which means
SOCK_SEQPACKET support. Guest negotiates this bit with vhost,
thus checking that vhost side supports SEQPACKET.
Signed-off-by: Arseny Krasnov
---
include/uapi/linux/virtio_vsock.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a
n receive(if mismatch,
then reset connection).
Signed-off-by: Arseny Krasnov
---
v6 -> v7:
In 'virtio_transport_recv_pkt()', 'sock_put()' is added, when type of
received packet does not match to the type of socket.
net/vmw_vsock/virtio_transport_common.c | 64 ++
This adds transport callback which tries to fetch record begin marker
from socket's rx queue. It is called from af_vsock.c before reading data
packets of record.
Signed-off-by: Arseny Krasnov
---
v6 -> v7:
1) Now 'virtio_transport_seqpacket_seq_get_len()' returns 0, if rx
ov iterator(previous unfinished data is dropped).
Signed-off-by: Arseny Krasnov
---
v6 -> v7:
1) 'struct virtio_vsock_seqpacket_state' now renamed to
'struct virtio_vsock_seq_state'.
2) Field 'seqpacket_state' of 'struct virtio_vsock_sock' now
This function is static and 'hdr' arg was always NULL.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock/virtio_transport_common.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/vmw_vsock/virtio_transport_common.c
b/net
ort_send_
pkt_info()', so callers don't need to set it.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock/virtio_transport_common.c | 19 +--
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/net/vmw_vsock/virtio_
This replaces 'stream' to 'connection oriented' in comments as
SEQPACKET is also connection oriented.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock/af_vsock.c | 31 +--
1 file changed, 17 insertions(+), 14 deleti
This does rest of SOCK_SEQPACKET support:
1) Adds socket ops for SEQPACKET type.
2) Allows to create socket with SEQPACKET type.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
include/net/af_vsock.h | 1 +
net/vmw_vsock/af_vsock.c | 36
This adds some logic to current stream enqueue function for SEQPACKET
support:
1) Use transport's seqpacket enqueue callback.
2) Return value from enqueue function is whole record length or error
for SOCK_SEQPACKET.
Signed-off-by: Arseny Krasnov
---
v6 -> v7:
'seqpacket_enqu
so to avoid it, sender waits until
enough space will be ready.
Signed-off-by: Arseny Krasnov
---
include/net/af_vsock.h | 2 +
net/vmw_vsock/af_vsock.c | 99 +---
2 files changed, 63 insertions(+), 38 deletions(-)
diff --git a/include/net/af_vsock.h b/includ
in SEQPACKET case.
3) It waits until whole record is received or error is found during
receiving.
4) It processes and sets 'MSG_TRUNC' flag.
So to avoid extra conditions for two types of socket inside one loop, two
independent functions were created.
Signed-off-by: Arseny Krasnov
---
v6
Move STREAM specific data receive logic to '__vsock_stream_recvmsg()'
dedicated function, while checks, that will be same for both STREAM
and SEQPACKET sockets, stays in 'vsock_connectible_recvmsg()' shared
functions.
Signed-off-by: Arseny Krasnov
---
net/vmw_vs
This moves wait loop for data to dedicated function, because later it
will be used by SEQPACKET data receive loop. While moving the code
around, let's update an old comment.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock/af_vsock.c
This prepares af_vsock.c for SEQPACKET support: some functions such
as setsockopt(), getsockopt(), connect(), recvmsg(), sendmsg() are
shared between both types of sockets, so rename them in general
manner.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
net/vmw_vsock
supports 'MSG_EOR' and 'MSG_TRUNC' flags.
Tests also implemented.
Thanks to st...@yandex.ru for encouragements and initial design
recommendations.
Arseny Krasnov (22):
af_vsock: update functions for connectible socket
af_vsock: separate wait data loop
On 15.03.2021 18:22, Arseny Krasnov wrote:
> On 15.03.2021 14:40, Stefano Garzarella wrote:
>> Hi Arseny,
>>
>> On Sun, Mar 07, 2021 at 08:57:19PM +0300, Arseny Krasnov wrote:
>>> This patchset implements support of SOCK_SEQPACKET for virtio
>>&g
On 15.03.2021 14:40, Stefano Garzarella wrote:
> Hi Arseny,
>
> On Sun, Mar 07, 2021 at 08:57:19PM +0300, Arseny Krasnov wrote:
>> This patchset implements support of SOCK_SEQPACKET for virtio
>> transport.
>> As SOCK_SEQPACKET guarantees to save record boun
On 12.03.2021 18:10, Stefano Garzarella wrote:
> On Sun, Mar 07, 2021 at 09:00:26PM +0300, Arseny Krasnov wrote:
>> This adds some logic to current stream enqueue function for SEQPACKET
>> support:
>> 1) Use transport's seqpacket enqueue callback.
>> 2) Retur
On 12.03.2021 18:17, Stefano Garzarella wrote:
> On Sun, Mar 07, 2021 at 08:59:45PM +0300, Arseny Krasnov wrote:
>> This adds receive loop for SEQPACKET. It looks like receive loop for
>> STREAM, but there is a little bit difference:
>> 1) It doesn't call notify callba
On 12.03.2021 18:20, Stefano Garzarella wrote:
> On Sun, Mar 07, 2021 at 09:02:31PM +0300, Arseny Krasnov wrote:
>> This adds transport callback which tries to fetch record begin marker
> >from socket's rx queue. It is called from af_vsock.c before reading data
>> packe
hat
>> record length, when all out of size data is dropped.
>> Maximum length of datagram is not limited as in stream socket,
>> because same credit logic is used. Difference with stream socket is
>> that user is not woken up until whole record is received or err
This updates current implementation for trace event of virtio vsock:
SEQPACKET socket's type, SEQPACKET specific ops and SEQPACKET 'msg_len'
and 'msg_id' fields are added.
Signed-off-by: Arseny Krasnov
---
.../events/vsock_virtio_transport_common.h| 48 +
This adds two tests of SOCK_SEQPACKET socket: both transfer data and
then test MSG_EOR and MSG_TRUNC flags. Cases for connect(), bind(),
etc. are not tested, because it is same as for stream socket.
Signed-off-by: Arseny Krasnov
---
tools/testing/vsock/util.c | 32 ++--
tools/testing
This adds SEQPACKET ops for loopback transport and 'seqpacket_allow()'
callback.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/vsock_loopback.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c
index a4
This also removes ignore of non-stream type of packets and adds
'seqpacket_allow()' callback.
Signed-off-by: Arseny Krasnov
---
drivers/vhost/vsock.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vso
This adds SEQPACKET ops for virtio transport and 'seqpacket_allow()'
callback.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/virtio_transport.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transpo
This adds handling of SEQPACKET bit: guest tries to negotiate it
with vhost.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/virtio_transport.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
index 2700a63ab095
This adds handling of SEQPACKET bit: if guest sets features with
this bit cleared, then SOCK_SEQPACKET support will be disabled.
Signed-off-by: Arseny Krasnov
---
drivers/vhost/vsock.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/vhost/vsock.c b/drivers/vhost
This adds new virtio vsock specific feature bit which means
SOCK_SEQPACKET support. Guest negotiates this bit with vhost,
thus checking that vhost side supports SEQPACKET.
Signed-off-by: Arseny Krasnov
---
include/uapi/linux/virtio_vsock.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a
packet type during send.
5) Set MSG_EOR in flags for SEQPACKET during send.
6) 'seqpacket_allow' flag to virtio transport.
Signed-off-by: Arseny Krasnov
---
include/linux/virtio_vsock.h| 8 +++
net/vmw_vsock/virtio_transport_common.c | 87 -
2 fil
n receive(if mismatch,
then reset connection).
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/virtio_transport_common.c | 63 +
1 file changed, 44 insertions(+), 19 deletions(-)
diff --git a/net/vmw_vsock/virtio_transport_common.c
b/net/vmw_vsock/virtio_transpo
This adds transport callback which tries to fetch record begin marker
from socket's rx queue. It is called from af_vsock.c before reading data
packets of record.
Signed-off-by: Arseny Krasnov
---
include/linux/virtio_vsock.h| 1 +
net/vmw_vsock/virtio_transport_common.c
This function is static and 'hdr' arg was always NULL.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/virtio_transport_common.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/vmw_vsock/virtio_transport_common.c
b/net/vmw_vsock/virtio_transport_comm
ov iterator(previous unfinished data is dropped).
Signed-off-by: Arseny Krasnov
---
include/linux/virtio_vsock.h| 13 +++
include/uapi/linux/virtio_vsock.h | 16
net/vmw_vsock/virtio_transport_common.c | 116
3 files changed, 145 insertions(+)
ort_send_
pkt_info()', so callers don't need to set it.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/virtio_transport_common.c | 19 +--
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/net/vmw_vsock/virtio_transport_common.c
b/net/vmw_vsock/virtio_tr
This replaces 'stream' to 'connection oriented' in comments as
SEQPACKET is also connection oriented.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/af_vsock.c | 31 +--
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/net/vmw_vs
This does rest of SOCK_SEQPACKET support:
1) Adds socket ops for SEQPACKET type.
2) Allows to create socket with SEQPACKET type.
Signed-off-by: Arseny Krasnov
---
include/net/af_vsock.h | 1 +
net/vmw_vsock/af_vsock.c | 36 +++-
2 files changed, 36 insertions
so to avoid it, sender waits until
enough space will be ready.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano Garzarella
---
include/net/af_vsock.h | 2 +
net/vmw_vsock/af_vsock.c | 99 +---
2 files changed, 63 insertions(+), 38 deletions(-)
diff --
This adds some logic to current stream enqueue function for SEQPACKET
support:
1) Use transport's seqpacket enqueue callback.
2) Return value from enqueue function is whole record length or error
for SOCK_SEQPACKET.
Signed-off-by: Arseny Krasnov
---
include/net/af_vsock.h | 2 ++
in SEQPACKET case.
3) It waits until whole record is received or error is found during
receiving.
4) It processes and sets 'MSG_TRUNC' flag.
So to avoid extra conditions for two types of socket inside one loop, two
independent functions were created.
Signed-off-by: Arseny Krasnov
---
Move STREAM specific data receive logic to '__vsock_stream_recvmsg()'
dedicated function, while checks, that will be same for both STREAM
and SEQPACKET sockets, stays in 'vsock_connectible_recvmsg()' shared
functions.
Signed-off-by: Arseny Krasnov
Reviewed-by: Stefano
This moves wait loop for data to dedicated function, because later it
will be used by SEQPACKET data receive loop. While moving the code
around, let's update an old comment.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/af_vsock.c | 156 +--
1 file ch
This prepares af_vsock.c for SEQPACKET support: some functions such
as setsockopt(), getsockopt(), connect(), recvmsg(), sendmsg() are
shared between both types of sockets, so rename them in general
manner.
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/af_vsock.c | 64
supports 'MSG_EOR' and 'MSG_TRUNC' flags.
Tests also implemented.
Thanks to st...@yandex.ru for encouragements and initial design
recommendations.
Arseny Krasnov (22):
af_vsock: update functions for connectible socket
af_vsock: separate wait data loop
On 03.03.2021 01:25, Steven Rostedt wrote:
> On Thu, 18 Feb 2021 08:42:15 +0300
> Arseny Krasnov wrote:
>
> Not sure if this was pulled in yet, but I do have a small issue with this
> patch.
No, it is in RFC state.
>
>> @@ -69,14 +82,19 @@ TRACE_EVENT(vi
On 24.02.2021 09:41, Michael S. Tsirkin wrote:
> On Wed, Feb 24, 2021 at 08:07:48AM +0300, Arseny Krasnov wrote:
>> On 23.02.2021 17:17, Michael S. Tsirkin wrote:
>>> On Thu, Feb 18, 2021 at 08:39:37AM +0300, Arseny Krasnov wrote:
>>>> This adds transport callbac
On 25.02.2021 17:24, Jorgen Hansen wrote:
>> On 18 Feb 2021, at 06:36, Arseny Krasnov
>> wrote:
>>
>> This moves wait loop for data to dedicated function, because later
>> it will be used by SEQPACKET data receive loop.
>>
>> Signed-off-by: Arseny K
On 25.02.2021 19:27, Jorgen Hansen wrote:
> On 18 Feb 2021, at 06:37, Arseny Krasnov wrote:
>> This adds receive loop for SEQPACKET. It looks like receive loop for
>> STREAM, but there is a little bit difference:
>> 1) It doesn't call notify callbacks.
>> 2) It
On 24.02.2021 11:35, Stefano Garzarella wrote:
> On Wed, Feb 24, 2021 at 11:28:50AM +0300, Arseny Krasnov wrote:
>> On 24.02.2021 11:23, Stefano Garzarella wrote:
>>> On Wed, Feb 24, 2021 at 07:29:25AM +0300, Arseny Krasnov wrote:
>>>> On 23.02.2021 17:50, Stefano
On 24.02.2021 11:23, Stefano Garzarella wrote:
> On Wed, Feb 24, 2021 at 07:29:25AM +0300, Arseny Krasnov wrote:
>> On 23.02.2021 17:50, Stefano Garzarella wrote:
>>> On Mon, Feb 22, 2021 at 03:23:11PM +0100, Stefano Garzarella wrote:
>>>> Hi Arseny,
>>>&g
On 23.02.2021 17:17, Michael S. Tsirkin wrote:
> On Thu, Feb 18, 2021 at 08:39:37AM +0300, Arseny Krasnov wrote:
>> This adds transport callback and it's logic for SEQPACKET dequeue.
>> Callback fetches RW packets from rx queue of socket until whole record
>> is copie
On 23.02.2021 17:50, Stefano Garzarella wrote:
> On Mon, Feb 22, 2021 at 03:23:11PM +0100, Stefano Garzarella wrote:
>> Hi Arseny,
>>
>> On Thu, Feb 18, 2021 at 08:33:44AM +0300, Arseny Krasnov wrote:
>>> This patchset impelements support of SOCK_SEQP
On 22.02.2021 13:50, Stefano Garzarella wrote:
> On Thu, Feb 18, 2021 at 08:36:03AM +0300, Arseny Krasnov wrote:
>> This prepares af_vsock.c for SEQPACKET support: some functions such
>> as setsockopt(), getsockopt(), connect(), recvmsg(), sendmsg() are
>> shared between
This adds SEQPACKET ops for virtio transport
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/virtio_transport.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
index 2700a63ab095..bd3a854bb366 100644
--- a/net
This also removes ignore of non-stream type of packets.
Signed-off-by: Arseny Krasnov
---
drivers/vhost/vsock.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index 5e78fb719602..5c86d09e36d9 100644
--- a/drivers/vhost
This adds two tests of SOCK_SEQPACKET socket: both transfer data and
then test MSG_EOR and MSG_TRUNC flags. Cases for connect(), bind(),
etc. are not tested, because it is same as for stream socket.
Signed-off-by: Arseny Krasnov
---
tools/testing/vsock/util.c | 32 ++--
tools/testing
This adds SEQPACKET ops for loopback transport
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/vsock_loopback.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c
index a45f7ffca8c5..c0da94119f74 100644
--- a/net/vmw_vsock
This updates current implementation for trace event of virtio vsock:
SEQPACKET socket's type, SEQPACKET specific ops and SEQPACKET 'msg_len'
and 'msg_cnt' fields are added.
Signed-off-by: Arseny Krasnov
---
.../events/vsock_virtio_transport_common.h| 48 +
n receive(if mismatch,
then reset connection).
Signed-off-by: Arseny Krasnov
---
net/vmw_vsock/virtio_transport_common.c | 63 +
1 file changed, 44 insertions(+), 19 deletions(-)
diff --git a/net/vmw_vsock/virtio_transport_common.c
b/net/vmw_vsock/virtio_transpo
This adds transport callback which tries to fetch record begin marker
from socket's rx queue. It is called from af_vsock.c before reading data
packets of record.
Signed-off-by: Arseny Krasnov
---
include/linux/virtio_vsock.h| 1 +
net/vmw_vsock/virtio_transport_common.c
packet type during send.
5) Set MSG_EOR in flags for SEQPACKET during send.
Signed-off-by: Arseny Krasnov
---
include/linux/virtio_vsock.h| 3 ++
net/vmw_vsock/virtio_transport_common.c | 67 -
2 files changed, 68 insertions(+), 2 deletions(-)
diff --git a
ov iterator(previous unfinished data is dropped).
Signed-off-by: Arseny Krasnov
---
include/linux/virtio_vsock.h| 10 +++
include/uapi/linux/virtio_vsock.h | 16
net/vmw_vsock/virtio_transport_common.c | 114
3 files changed, 140 insertions(+)
1 - 100 of 181 matches
Mail list logo