Re: [PATCH net 0/4] vsock: fix server prevents clients from reconnecting

2023-11-06 Thread Stefano Garzarella
On Fri, Nov 03, 2023 at 06:55:47PM +0100, f.storniol...@gmail.com wrote: From: Filippo Storniolo This patch series introduce fix and tests for the following vsock bug: If the same remote peer, using the same port, tries to connect to a server on a listening port more than once, the server will

Re: [PATCH net 4/4] test/vsock: add dobule bind connect test

2023-11-06 Thread Stefano Garzarella
Signed-off-by: Filippo Storniolo --- tools/testing/vsock/util.c | 47 ++ tools/testing/vsock/util.h | 3 ++ tools/testing/vsock/vsock_test.c | 50 3 files changed, 100 insertions(+) LGTM! Reviewed-by: Stefano Garzarella

Re: [PATCH net 3/4] test/vsock: refactor vsock_accept

2023-11-06 Thread Stefano Garzarella
Leonardi Signed-off-by: Filippo Storniolo --- tools/testing/vsock/util.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) LGTM! Reviewed-by: Stefano Garzarella diff --git a/tools/testing/vsock/util.c b/tools/testing/vsock/util.c index 698b0b44a2ee

Re: [PATCH net 2/4] test/vsock fix: add missing check on socket creation

2023-11-06 Thread Stefano Garzarella
/util.c | 8 1 file changed, 8 insertions(+) If you need to resend the entire series, maybe you can remove "fix" from the commit title. But it's a minor thing, so I would only change it if there's something else that justifies sending a v2: Reviewed-by: Stefano Garzare

Re: [PATCH net 1/4] vsock/virtio: remove socket from connected/bound list on shutdown

2023-11-06 Thread Stefano Garzarella
. Just to inform other maintainers as well. Daan reported this issue to me at DevConf.cz, I shared it with Filippo and Luigi who analyzed and solved it. Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH net v2] virtio/vsock: Fix uninit-value in virtio_transport_recv_pkt()

2023-11-06 Thread Stefano Garzarella
--- net/vmw_vsock/virtio_transport_common.c | 2 ++ 1 file changed, 2 insertions(+) The patch remained the same, so you could bring back my R-b ;-) In any case: Reviewed-by: Stefano Garzarella Thanks, Stefano diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transpo

Re: [PATCH v4] ALSA: virtio: use ack callback

2023-10-31 Thread Stefano Garzarella
On Fri, Oct 27, 2023 at 10:10:30AM -0400, Michael S. Tsirkin wrote: On Fri, Oct 27, 2023 at 12:18:00PM +0200, Stefano Garzarella wrote: On Fri, Oct 27, 2023 at 11:27:40AM +0200, Takashi Iwai wrote: > On Wed, 25 Oct 2023 11:49:19 +0200, > Matias Ezequiel Vara Larsen wrote: > > >

[PATCH] vdpa_sim_blk: allocate the buffer zeroed

2023-10-31 Thread Stefano Garzarella
Deleting and recreating a device can lead to having the same content as the old device, so let's always allocate buffers completely zeroed out. Fixes: abebb16254b3 ("vdpa_sim_blk: support shared backend") Suggested-by: Qing Wang Signed-off-by: Stefano Garzarella --- driver

Re: [PATCH v4] ALSA: virtio: use ack callback

2023-10-27 Thread Stefano Garzarella
On Fri, Oct 27, 2023 at 11:27:40AM +0200, Takashi Iwai wrote: On Wed, 25 Oct 2023 11:49:19 +0200, Matias Ezequiel Vara Larsen wrote: This commit uses the ack() callback to determine when a buffer has been updated, then exposes it to guest. The current mechanism splits a dma buffer into descrip

Re: [syzbot] [net?] KMSAN: uninit-value in virtio_transport_recv_pkt

2023-10-27 Thread Stefano Garzarella
On Fri, Oct 27, 2023 at 10:48:39AM +0200, Eric Dumazet wrote: On Fri, Oct 27, 2023 at 10:25 AM Stefano Garzarella wrote: On Fri, Oct 27, 2023 at 01:11:24AM -0700, syzbot wrote: >Hello, > >syzbot found the following issue on: > >HEAD commit:d90b0276af8f Merge tag 'ha

Re: [syzbot] [net?] KMSAN: uninit-value in virtio_transport_recv_pkt

2023-10-27 Thread Stefano Garzarella
On Fri, Oct 27, 2023 at 01:11:24AM -0700, syzbot wrote: Hello, syzbot found the following issue on: HEAD commit:d90b0276af8f Merge tag 'hardening-v6.6-rc3' of git://git.k.. git tree: upstream console+strace: https://syzkaller.appspot.com/x/log.txt?x=102c8b2268 kernel config: http

Re: [PATCH net] virtio/vsock: Fix uninit-value in virtio_transport_recv_pkt()

2023-10-27 Thread Stefano Garzarella
On Fri, Oct 27, 2023 at 10:01 AM Stefano Garzarella wrote: > > On Fri, Oct 27, 2023 at 12:01:54AM +0900, Shigeru Yoshida wrote: > >KMSAN reported the following uninit-value access issue: > > > >= > &

Re: [PATCH net] virtio/vsock: Fix uninit-value in virtio_transport_recv_pkt()

2023-10-27 Thread Stefano Garzarella
hdr->buf_alloc = cpu_to_le32(0); + hdr->fwd_cnt = cpu_to_le32(0); if (info->msg && len > 0) { payload = skb_put(skb, len); -- 2.41.0 Reviewed-by: Stefano Garzarella Thanks, Stefano __

Re: [PATCH v4] vsock/virtio: initialize the_virtio_vsock before using VQs

2023-10-25 Thread Stefano Garzarella
earlier v2: - split virtio_vsock_vqs_init in vqs_init and vqs_fill and moved the_virtio_vsock initialization after vqs_init net/vmw_vsock/virtio_transport.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) LGTM! Reviewed-b

Re: [PATCH v3] vsock/virtio: initialize the_virtio_vsock before using VQs

2023-10-24 Thread Stefano Garzarella
On Mon, Oct 23, 2023 at 10:22:07PM +0300, Alexandru Matei wrote: Once VQs are filled with empty buffers and we kick the host, it can send connection requests. If the_virtio_vsock is not initialized before, replies are silently dropped and do not reach the host. virtio_transport_send_pkt() can qu

Re: [PATCH v2] vsock/virtio: initialize the_virtio_vsock before using VQs

2023-10-23 Thread Stefano Garzarella
On Mon, Oct 23, 2023 at 06:36:21PM +0300, Alexandru Matei wrote: On 10/23/2023 6:13 PM, Stefano Garzarella wrote: On Mon, Oct 23, 2023 at 05:59:45PM +0300, Alexandru Matei wrote: On 10/23/2023 5:52 PM, Alexandru Matei wrote: On 10/23/2023 5:29 PM, Stefano Garzarella wrote: On Mon, Oct 23

Re: [PATCH v2] vsock/virtio: initialize the_virtio_vsock before using VQs

2023-10-23 Thread Stefano Garzarella
On Mon, Oct 23, 2023 at 05:59:45PM +0300, Alexandru Matei wrote: On 10/23/2023 5:52 PM, Alexandru Matei wrote: On 10/23/2023 5:29 PM, Stefano Garzarella wrote: On Mon, Oct 23, 2023 at 05:08:33PM +0300, Alexandru Matei wrote: Once VQs are filled with empty buffers and we kick the host, it can

Re: [PATCH v2] vsock/virtio: initialize the_virtio_vsock before using VQs

2023-10-23 Thread Stefano Garzarella
On Mon, Oct 23, 2023 at 05:08:33PM +0300, Alexandru Matei wrote: Once VQs are filled with empty buffers and we kick the host, it can send connection requests. If 'the_virtio_vsock' is not initialized before, replies are silently dropped and do not reach the host. Fixes: 0deab087b16a ("vsock/vir

Re: [PATCH] vsock: initialize the_virtio_vsock before using VQs

2023-10-20 Thread Stefano Garzarella
On Fri, Oct 20, 2023 at 12:12:04AM +0300, Alexandru Matei wrote: On 10/19/2023 11:54 AM, Stefano Garzarella wrote: On Wed, Oct 18, 2023 at 09:32:47PM +0300, Alexandru Matei wrote: Once VQs are filled with empty buffers and we kick the host, it can send connection requests. If 'the_virtio_

Re: [RFC v2 PATCH] vdpa_sim: implement .reset_map support

2023-10-19 Thread Stefano Garzarella
On Wed, Oct 18, 2023 at 04:47:48PM -0700, Si-Wei Liu wrote: On 10/18/2023 1:05 AM, Stefano Garzarella wrote: On Tue, Oct 17, 2023 at 10:11:33PM -0700, Si-Wei Liu wrote: RFC only. Not tested on vdpa-sim-blk with user virtual address. Works fine with vdpa-sim-net which uses physical address to

Re: [PATCH] vsock: initialize the_virtio_vsock before using VQs

2023-10-19 Thread Stefano Garzarella
On Wed, Oct 18, 2023 at 09:32:47PM +0300, Alexandru Matei wrote: Once VQs are filled with empty buffers and we kick the host, it can send connection requests. If 'the_virtio_vsock' is not initialized before, replies are silently dropped and do not reach the host. Are replies really dropped or w

Re: [RFC v2 PATCH] vdpa_sim: implement .reset_map support

2023-10-18 Thread Stefano Garzarella
-email-si-wei@oracle.com/ Signed-off-by: Si-Wei Liu --- RFC v2: - initialize iotlb to passthrough mode in device add I tested this version and I didn't see any issue ;-) Tested-by: Stefano Garzarella --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 34 1

Re: [RFC PATCH] vdpa_sim: implement .reset_map support

2023-10-17 Thread Stefano Garzarella
On Fri, Oct 13, 2023 at 10:29:26AM -0700, Si-Wei Liu wrote: Hi Stefano, On 10/13/2023 2:22 AM, Stefano Garzarella wrote: Hi Si-Wei, On Fri, Oct 13, 2023 at 01:23:40AM -0700, Si-Wei Liu wrote: RFC only. Not tested on vdpa-sim-blk with user virtual address. I can test it, but what I should

Re: [RFC PATCH] ALSA: virtio: use copy and fill_silence callbacks

2023-10-17 Thread Stefano Garzarella
On Thu, Oct 12, 2023 at 11:16:54AM -0400, Michael S. Tsirkin wrote: On Thu, Oct 12, 2023 at 05:10:50PM +0200, Matias Ezequiel Vara Larsen wrote: This commit replaces the mmap mechanism with the copy() and fill_silence() callbacks for both capturing and playback for the virtio-sound driver. This

Re: [RFC PATCH] vdpa_sim: implement .reset_map support

2023-10-13 Thread Stefano Garzarella
Hi Si-Wei, On Fri, Oct 13, 2023 at 01:23:40AM -0700, Si-Wei Liu wrote: RFC only. Not tested on vdpa-sim-blk with user virtual address. I can test it, but what I should stress? Works fine with vdpa-sim-net which uses physical address to map. Can you share your tests? so I'll try to do the s

Re: [PATCH net-next v4 00/12] vsock/virtio: continue MSG_ZEROCOPY support

2023-10-11 Thread Stefano Garzarella
On Tue, Oct 10, 2023 at 10:15:12PM +0300, Arseniy Krasnov wrote: Hello, this patchset contains second and third parts of another big patchset for MSG_ZEROCOPY flag support: https://lore.kernel.org/netdev/20230701063947.3422088-1-avkras...@sberdevices.ru/ During review of this series, Stefano

Re: [PATCH net-next v4 12/12] test/vsock: io_uring rx/tx tests

2023-10-11 Thread Stefano Garzarella
v4: * Link with 'msg_zerocopy_common.o'. * Use '#ifndef' around '#define PAGE_SIZE 4096'. tools/testing/vsock/.gitignore | 1 + tools/testing/vsock/Makefile | 7 +- tools/testing/vsock/vsock_uring_test.c | 342 + 3

Re: [PATCH net-next v4 10/12] test/vsock: MSG_ZEROCOPY flag tests

2023-10-11 Thread Stefano Garzarella
| 16 + tools/testing/vsock/vsock_test_zerocopy.c | 358 ++ tools/testing/vsock/vsock_test_zerocopy.h | 15 + 8 files changed, 633 insertions(+), 1 deletion(-) create mode 100644 tools/testing/vsock/msg_zerocopy_common.c create mode 100644 tools/testing/vsock/msg_zerocopy

Re: [PATCH net-next v4 02/12] vsock: read from socket's error queue

2023-10-11 Thread Stefano Garzarella
lude/linux/socket.h | 1 + include/uapi/linux/vm_sockets.h | 17 +++++++++ net/vmw_vsock/af_vsock.c| 6 ++ 3 files changed, 24 insertions(+) Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH net-next v3 10/12] test/vsock: MSG_ZEROCOPY flag tests

2023-10-10 Thread Stefano Garzarella
On Mon, Oct 09, 2023 at 11:24:18PM +0300, Arseniy Krasnov wrote: On 09.10.2023 18:17, Stefano Garzarella wrote: On Sat, Oct 07, 2023 at 08:21:37PM +0300, Arseniy Krasnov wrote: This adds three tests for MSG_ZEROCOPY feature: 1) SOCK_STREAM tx with different buffers. 2) SOCK_SEQPACKET tx with

Re: [PATCH net-next v3 11/12] test/vsock: MSG_ZEROCOPY support for vsock_perf

2023-10-09 Thread Stefano Garzarella
etail in help that zerocopy mode is for sender mode only. tools/testing/vsock/vsock_perf.c | 80 ++++++++ 1 file changed, 71 insertions(+), 9 deletions(-) Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH net-next v3 10/12] test/vsock: MSG_ZEROCOPY flag tests

2023-10-09 Thread Stefano Garzarella
On Sat, Oct 07, 2023 at 08:21:37PM +0300, Arseniy Krasnov wrote: This adds three tests for MSG_ZEROCOPY feature: 1) SOCK_STREAM tx with different buffers. 2) SOCK_SEQPACKET tx with different buffers. 3) SOCK_STREAM test to read empty error queue of the socket. Patch also works as preparation for

Re: [PATCH net-next v3 02/12] vsock: read from socket's error queue

2023-10-09 Thread Stefano Garzarella
On Sat, Oct 07, 2023 at 08:21:29PM +0300, Arseniy Krasnov wrote: 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

Re: [PATCH net-next v3 12/12] test/vsock: io_uring rx/tx tests

2023-10-09 Thread Stefano Garzarella
On Sat, Oct 07, 2023 at 08:21:39PM +0300, Arseniy Krasnov wrote: This adds set of tests which use io_uring for rx/tx. This test suite is implemented as separated util like 'vsock_test' and has the same set of input arguments as 'vsock_test'. These tests only cover cases of data transmission (no c

Re: [PATCH net-next v2 00/12] vsock/virtio: continue MSG_ZEROCOPY support

2023-10-04 Thread Stefano Garzarella
On Wed, Oct 04, 2023 at 07:22:04PM +0300, Arseniy Krasnov wrote: On 04.10.2023 08:25, Arseniy Krasnov wrote: On 03.10.2023 19:26, Stefano Garzarella wrote: Hi Arseniy, On Sun, Oct 01, 2023 at 12:02:56AM +0300, Arseniy Krasnov wrote: Hello, this patchset contains second and third parts

Re: [PATCH net-next v2 12/12] test/vsock: io_uring rx/tx tests

2023-10-04 Thread Stefano Garzarella
On Sun, Oct 01, 2023 at 12:03:08AM +0300, Arseniy Krasnov wrote: This adds set of tests which use io_uring for rx/tx. This test suite is implemented as separated util like 'vsock_test' and has the same set of input arguments as 'vsock_test'. These tests only cover cases of data transmission (no c

Re: [PATCH net-next v2 11/12] test/vsock: MSG_ZEROCOPY support for vsock_perf

2023-10-04 Thread Stefano Garzarella
On Sun, Oct 01, 2023 at 12:03:07AM +0300, Arseniy Krasnov wrote: To use this option pass '--zc' parameter: --zerocopy would be better IMHO ./vsock_perf --zc --sender --port --bytes With this option MSG_ZEROCOPY flag will be passed to the 'send()' call. Signed-off-by: Arseniy Krasnov --

Re: [PATCH net-next v2 10/12] test/vsock: MSG_ZEROCOPY flag tests

2023-10-04 Thread Stefano Garzarella
On Sun, Oct 01, 2023 at 12:03:06AM +0300, Arseniy Krasnov wrote: This adds three tests for MSG_ZEROCOPY feature: 1) SOCK_STREAM tx with different buffers. 2) SOCK_SEQPACKET tx with different buffers. 3) SOCK_STREAM test to read empty error queue of the socket. Signed-off-by: Arseniy Krasnov ---

Re: [PATCH net-next v2 00/12] vsock/virtio: continue MSG_ZEROCOPY support

2023-10-03 Thread Stefano Garzarella
series, Stefano Garzarella suggested to split it for three parts to simplify review and merging: 1) virtio and vhost updates (for fragged skbs) (merged to net-next, see link below) 2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read tx completions) and update for Documentation

Re: [PATCH net-next v2 10/12] test/vsock: MSG_ZEROCOPY flag tests

2023-10-03 Thread Stefano Garzarella
On Sun, Oct 01, 2023 at 12:03:06AM +0300, Arseniy Krasnov wrote: This adds three tests for MSG_ZEROCOPY feature: 1) SOCK_STREAM tx with different buffers. 2) SOCK_SEQPACKET tx with different buffers. 3) SOCK_STREAM test to read empty error queue of the socket. Signed-off-by: Arseniy Krasnov ---

Re: [PATCH net-next v2 09/12] docs: net: description of MSG_ZEROCOPY for AF_VSOCK

2023-10-03 Thread Stefano Garzarella
(-) Reviewed-by: Stefano Garzarella diff --git a/Documentation/networking/msg_zerocopy.rst b/Documentation/networking/msg_zerocopy.rst index b3ea96af9b49..78fb70e748b7 100644 --- a/Documentation/networking/msg_zerocopy.rst +++ b/Documentation/networking/msg_zerocopy.rst @@ -7,7 +7,8 @@ Intro

Re: [PATCH net-next v2 08/12] vsock: enable setting SO_ZEROCOPY

2023-10-03 Thread Stefano Garzarella
etions(-) Reviewed-by: Stefano Garzarella diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index ff44bab05191..a84f242466cf 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1406,8 +1406,16 @@ static int vsock_connect(struct socket *sock,

Re: [PATCH net-next v2 02/12] vsock: read from socket's error queue

2023-10-03 Thread Stefano Garzarella
On Sun, Oct 01, 2023 at 12:02:58AM +0300, Arseniy Krasnov wrote: 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

Re: [PATCH net-next v2 01/12] vsock: set EPOLLERR on non-empty error queue

2023-10-03 Thread Stefano Garzarella
only user of an error queue of the socket. Signed-off-by: Arseniy Krasnov --- Changelog: v1 -> v2: * Update commit message by removing 'fix' word. Reviewed-by: Stefano Garzarella net/vmw_vsock/af_vsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net

Re: [PATCH net-next v1 12/12] test/vsock: io_uring rx/tx tests

2023-09-27 Thread Stefano Garzarella
On Tue, Sep 26, 2023 at 11:00:19PM +0300, Arseniy Krasnov wrote: On 26.09.2023 16:04, Stefano Garzarella wrote: On Fri, Sep 22, 2023 at 08:24:28AM +0300, Arseniy Krasnov wrote: This adds set of tests which use io_uring for rx/tx. This test suite is implemented as separated util like

Re: [PATCH net-next v1 08/12] vsock: enable setting SO_ZEROCOPY

2023-09-27 Thread Stefano Garzarella
On Tue, Sep 26, 2023 at 10:38:06PM +0300, Arseniy Krasnov wrote: On 26.09.2023 15:56, Stefano Garzarella wrote: On Fri, Sep 22, 2023 at 08:24:24AM +0300, Arseniy Krasnov wrote: For AF_VSOCK, zerocopy tx mode depends on transport, so this option must be set in AF_VSOCK implementation where

Re: [PATCH net-next v1 02/12] vsock: read from socket's error queue

2023-09-27 Thread Stefano Garzarella
On Tue, Sep 26, 2023 at 10:36:58PM +0300, Arseniy Krasnov wrote: On 26.09.2023 15:55, Stefano Garzarella wrote: On Fri, Sep 22, 2023 at 08:24:18AM +0300, Arseniy Krasnov wrote: This adds handling of MSG_ERRQUEUE input flag in receive call. This flag is used to read socket's error

Re: [PATCH net-next v1 00/12] vsock/virtio: continue MSG_ZEROCOPY support

2023-09-26 Thread Stefano Garzarella
series, Stefano Garzarella suggested to split it for three parts to simplify review and merging: 1) virtio and vhost updates (for fragged skbs) (merged to net-next, see link below) 2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read tx completions) and update for Documentation

Re: [PATCH net-next v1 12/12] test/vsock: io_uring rx/tx tests

2023-09-26 Thread Stefano Garzarella
On Fri, Sep 22, 2023 at 08:24:28AM +0300, Arseniy Krasnov wrote: This adds set of tests which use io_uring for rx/tx. This test suite is implemented as separated util like 'vsock_test' and has the same set of input arguments as 'vsock_test'. These tests only cover cases of data transmission (no c

Re: [PATCH net-next v1 10/12] test/vsock: MSG_ZEROCOPY flag tests

2023-09-26 Thread Stefano Garzarella
On Fri, Sep 22, 2023 at 08:24:26AM +0300, Arseniy Krasnov wrote: This adds three tests for MSG_ZEROCOPY feature: 1) SOCK_STREAM tx with different buffers. 2) SOCK_SEQPACKET tx with different buffers. 3) SOCK_STREAM test to read empty error queue of the socket. Signed-off-by: Arseniy Krasnov ---

Re: [PATCH net-next v1 08/12] vsock: enable setting SO_ZEROCOPY

2023-09-26 Thread Stefano Garzarella
On Fri, Sep 22, 2023 at 08:24:24AM +0300, Arseniy Krasnov wrote: For AF_VSOCK, zerocopy tx mode depends on transport, so this option must be set in AF_VSOCK implementation where transport is accessible (if transport is not set during setting SO_ZEROCOPY: for example socket is not connected, then

Re: [PATCH net-next v1 02/12] vsock: read from socket's error queue

2023-09-26 Thread Stefano Garzarella
On Fri, Sep 22, 2023 at 08:24:18AM +0300, Arseniy Krasnov wrote: 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

Re: [PATCH net-next v1 01/12] vsock: fix EPOLLERR set on non-empty error queue

2023-09-26 Thread Stefano Garzarella
On Fri, Sep 22, 2023 at 08:24:17AM +0300, Arseniy Krasnov wrote: If socket's error queue is not empty, EPOLLERR must be set. Otherwise, reader of error queue won't detect data in it using EPOLLERR bit. Currently for AF_VSOCK this is reproducible only with MSG_ZEROCOPY, as this feature is the only

[PATCH] vringh: don't use vringh_kiov_advance() in vringh_iov_xfer()

2023-09-25 Thread Stefano Garzarella
. Let's restore the code that was there before commit b8c06ad4d67d ("vringh: implement vringh_kiov_advance()"), avoiding using vringh_kiov_advance(). Fixes: b8c06ad4d67d ("vringh: implement vringh_kiov_advance()") Cc: sta...@vger.kernel.org Reported-by: Jason Wang Signed-o

Re: [PATCH net-next v9 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-09-19 Thread Stefano Garzarella
On Tue, Sep 19, 2023 at 03:19:54PM +0200, Paolo Abeni wrote: On Tue, 2023-09-19 at 09:54 +0200, Stefano Garzarella wrote: On Mon, Sep 18, 2023 at 07:56:00PM +0300, Arseniy Krasnov wrote: > Hi Stefano, > > thanks for review! So when this patchset will be merged to net-next, > I'

Re: [PATCH net-next v9 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-09-19 Thread Stefano Garzarella
On Mon, Sep 18, 2023 at 07:56:00PM +0300, Arseniy Krasnov wrote: Hi Stefano, thanks for review! So when this patchset will be merged to net-next, I'll start sending next part of MSG_ZEROCOPY patchset, e.g. AF_VSOCK + Documentation/ patches. Ack, if it is not a very big series, maybe better to

Re: [PATCH net-next v9 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-09-18 Thread Stefano Garzarella
assed 'struct virtio_vsock_pkt_info*'. * Fix setting 'end of message' bit for SOCK_SEQPACKET (add call for 'msg_data_left()' == 0). * Add 'zcopy' parameter to packet allocation trace event. Thanks for addressing the comments! include/linux/virtio_vsock.h | 9 + .../events/vsock_virtio_transport_common.h| 12 +- net/vmw_vsock/virtio_transport.c | 32 +++ net/vmw_vsock/virtio_transport_common.c | 250 ++ 4 files changed, 241 insertions(+), 62 deletions(-) LGTM! Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

[PATCH net-next 5/5] vsock/test: track bytes in MSG_PEEK test for SOCK_SEQPACKET

2023-09-15 Thread Stefano Garzarella
The test was a bit complicated to read. Added variables to keep track of the bytes read and to be read in each step. Also some comments. The test is unchanged. Signed-off-by: Stefano Garzarella --- tools/testing/vsock/vsock_test.c | 14 +++--- 1 file changed, 11 insertions(+), 3

[PATCH net-next 1/5] vsock/test: add recv_buf() utility function

2023-09-15 Thread Stefano Garzarella
Move the code of recv_byte() out in a new utility function that can be used to receive a generic buffer. This new function can be used when we need to receive a custom buffer and not just a single 'A' byte. Signed-off-by: Stefano Garzarella --- tools/testing/vsock/util.h | 1 + too

[PATCH net-next 4/5] vsock/test: use send_buf() in vsock_test.c

2023-09-15 Thread Stefano Garzarella
We have a very common pattern used in vsock_test that we can now replace with the new send_buf(). This allows us to reuse the code we already had to check the actual return value and wait for all the bytes to be sent with an appropriate timeout. Signed-off-by: Stefano Garzarella --- tools

[PATCH net-next 3/5] vsock/test: add send_buf() utility function

2023-09-15 Thread Stefano Garzarella
Move the code of send_byte() out in a new utility function that can be used to send a generic buffer. This new function can be used when we need to send a custom buffer and not just a single 'A' byte. Signed-off-by: Stefano Garzarella --- tools/testing/vsock/util.h | 2 + tools/tes

[PATCH net-next 2/5] vsock/test: use recv_buf() in vsock_test.c

2023-09-15 Thread Stefano Garzarella
We have a very common pattern used in vsock_test that we can now replace with the new recv_buf(). This allows us to reuse the code we already had to check the actual return value and wait for all bytes to be received with an appropriate timeout. Signed-off-by: Stefano Garzarella --- tools

[PATCH net-next 0/5] vsock/test: add recv_buf()/send_buf() utility functions and some improvements

2023-09-15 Thread Stefano Garzarella
appreciated :-) [1] https://lore.kernel.org/netdev/63xflnwiohdfo6m3vnrrxgv2ulplencpwug5qqacugqh7xxpu3@tsczkuqgwurb/ Stefano Garzarella (5): vsock/test: add recv_buf() utility function vsock/test: use recv_buf() in vsock_test.c vsock/test: add send_buf() utility function vsock/test: use

Re: [PATCH net-next v8 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-09-14 Thread Stefano Garzarella
On Thu, Sep 14, 2023 at 05:05:17PM +0300, Arseniy Krasnov wrote: Hello Stefano, On 14.09.2023 17:07, Stefano Garzarella wrote: Hi Arseniy, On Mon, Sep 11, 2023 at 11:22:30PM +0300, Arseniy Krasnov wrote: Hello, this patchset is first of three parts of another big patchset for MSG_ZEROCOPY

Re: [PATCH net-next v8 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-09-14 Thread Stefano Garzarella
, Stefano Garzarella suggested to split it for three parts to simplify review and merging: 1) virtio and vhost updates (for fragged skbs) <--- this patchset 2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read tx completions) and update for Documentation/. 3) Updates for tests and ut

Re: [PATCH net-next v8 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-09-14 Thread Stefano Garzarella
On Mon, Sep 11, 2023 at 11:22:34PM +0300, Arseniy Krasnov wrote: This adds handling of MSG_ZEROCOPY flag on transmission path: 1) If this flag is set and zerocopy transmission is possible (enabled in socket options and transport allows zerocopy), then non-linear skb will be created and fille

Re: [PATCH net-next v8 2/4] vsock/virtio: support to send non-linear skb

2023-09-14 Thread Stefano Garzarella
; fields. * Rename '*sgs' and 'bufs' to '*out_sgs' and 'out_bufs'. * Initialize '*out_sgs' in 'virtio_vsock_probe()' by always pointing to the corresponding element of 'out_bufs'. LGTM, thanks for addressing that co

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-09-06 Thread Stefano Garzarella
On Sat, Sep 02, 2023 at 04:35:25AM -0400, Michael S. Tsirkin wrote: On Sat, Sep 02, 2023 at 04:56:42AM +, Bobby Eshleman wrote: On Fri, Sep 01, 2023 at 02:45:14PM +0200, Stefano Garzarella wrote: > On Tue, Aug 29, 2023 at 09:29:45PM +, Bobby Eshleman wrote: > > This adds su

Re: [PATCH net-next v7 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-09-04 Thread Stefano Garzarella
On Sun, Sep 03, 2023 at 11:13:23AM +0300, Arseniy Krasnov wrote: On 01.09.2023 15:30, Stefano Garzarella wrote: On Sun, Aug 27, 2023 at 11:54:36AM +0300, Arseniy Krasnov wrote: This adds handling of MSG_ZEROCOPY flag on transmission path: if this flag is set and zerocopy transmission is

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-09-01 Thread Stefano Garzarella
On Tue, Aug 29, 2023 at 09:29:45PM +, Bobby Eshleman wrote: This adds support for datagrams to the virtio-vsock device. virtio-vsock already supports stream and seqpacket types. The existing message types and header fields are extended to support datagrams. Semantic differences between the f

Re: [PATCH net-next v7 2/4] vsock/virtio: support to send non-linear skb

2023-09-01 Thread Stefano Garzarella
On Sun, Aug 27, 2023 at 11:54:34AM +0300, Arseniy Krasnov wrote: For non-linear skb use its pages from fragment array as buffers in virtio tx queue. These pages are already pinned by 'get_user_pages()' during such skb creation. Signed-off-by: Arseniy Krasnov --- Changelog: v2 -> v3: * Comment

Re: [PATCH net-next v7 1/4] vsock/virtio/vhost: read data from non-linear skb

2023-09-01 Thread Stefano Garzarella
agram_iter()'. v5 -> v6: * Commit message update. * Rename 'frag_off' to 'offset' in 'virtio_vsock_skb_cb'. drivers/vhost/vsock.c | 14 +++---- include/linux/virtio_vsock.h| 1 + net/vmw_vsock/virtio_transport_common.c | 32 ++

Re: [PATCH net-next v7 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-09-01 Thread Stefano Garzarella
On Sun, Aug 27, 2023 at 11:54:36AM +0300, Arseniy Krasnov wrote: This adds handling of MSG_ZEROCOPY flag on transmission path: if this flag is set and zerocopy transmission is possible (enabled in socket options and transport allows zerocopy), then non-linear skb will be created and filled with t

Re: [RFC PATCH v2 0/2] vsock: handle writes to shutdowned socket

2023-08-31 Thread Stefano Garzarella
hangelog: v1 -> v2: * 0001 stills the same - SIGPIPE is sent only for SOCK_STREAM as discussed in v1 with Stefano Garzarella . * 0002 - use 'sig_atomic_t' instead of 'bool' for flag variables updated from signal handler. Arseniy Krasnov (2): vsock: send SIGPIPE on write to

Re: [RFC PATCH v2 2/2] test/vsock: shutdowned socket test

2023-08-31 Thread Stefano Garzarella
ock_test.c | 138 +++ 1 file changed, 138 insertions(+) Reviewed-by: Stefano Garzarella diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c index 90718c2fd4ea..148fc9c47c50 100644 --- a/tools/testing/vsock/vsock_test.c +++ b/tools/tes

Re: [RFC PATCH v2 1/2] vsock: send SIGPIPE on write to shutdowned socket

2023-08-31 Thread Stefano Garzarella
Krasnov --- net/vmw_vsock/af_vsock.c | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Stefano Garzarella diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 020cf17ab7e4..013b65241b65 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1921,6 +1921,9

Re: [RFC PATCH v1 1/2] vsock: send SIGPIPE on write to shutdowned socket

2023-08-22 Thread Stefano Garzarella
On Mon, Aug 14, 2023 at 10:46:05PM +0300, Arseniy Krasnov wrote: On 04.08.2023 17:28, Stefano Garzarella wrote: On Fri, Aug 04, 2023 at 03:46:47PM +0300, Arseniy Krasnov wrote: Hi Stefano, On 02.08.2023 10:46, Stefano Garzarella wrote: On Tue, Aug 01, 2023 at 05:17:26PM +0300, Arseniy

Re: [RFC PATCH v1 1/2] vsock: send SIGPIPE on write to shutdowned socket

2023-08-22 Thread Stefano Garzarella
On Mon, Aug 14, 2023 at 10:40:17PM +0300, Arseniy Krasnov wrote: On 04.08.2023 18:02, Stefano Garzarella wrote: On Fri, Aug 04, 2023 at 05:34:20PM +0300, Arseniy Krasnov wrote: On 04.08.2023 17:28, Stefano Garzarella wrote: On Fri, Aug 04, 2023 at 03:46:47PM +0300, Arseniy Krasnov wrote

Re: [RFC PATCH v1 1/2] vsock: send SIGPIPE on write to shutdowned socket

2023-08-04 Thread Stefano Garzarella
On Fri, Aug 04, 2023 at 05:34:20PM +0300, Arseniy Krasnov wrote: On 04.08.2023 17:28, Stefano Garzarella wrote: On Fri, Aug 04, 2023 at 03:46:47PM +0300, Arseniy Krasnov wrote: Hi Stefano, On 02.08.2023 10:46, Stefano Garzarella wrote: On Tue, Aug 01, 2023 at 05:17:26PM +0300, Arseniy

Re: [RFC PATCH v1 1/2] vsock: send SIGPIPE on write to shutdowned socket

2023-08-04 Thread Stefano Garzarella
On Fri, Aug 04, 2023 at 03:46:47PM +0300, Arseniy Krasnov wrote: Hi Stefano, On 02.08.2023 10:46, Stefano Garzarella wrote: On Tue, Aug 01, 2023 at 05:17:26PM +0300, Arseniy Krasnov wrote: POSIX requires to send SIGPIPE on write to SOCK_STREAM socket which was shutdowned with SHUT_WR flag or

Re: [PATCH RFC net-next v5 03/14] af_vsock: support multi-transport datagrams

2023-08-04 Thread Stefano Garzarella
On Thu, Aug 03, 2023 at 06:58:24PM +, Bobby Eshleman wrote: On Thu, Aug 03, 2023 at 02:42:26PM +0200, Stefano Garzarella wrote: On Thu, Aug 03, 2023 at 12:53:22AM +, Bobby Eshleman wrote: > On Wed, Aug 02, 2023 at 10:24:44PM +, Bobby Eshleman wrote: > > On Sun, Jul 23, 2023

Re: [PATCH -next] af_vsock: Remove unused declaration vsock_release_pending()/vsock_init_tap()

2023-08-04 Thread Stefano Garzarella
duction in commit 531b374834c8 ("VSOCK: Add vsockmon tap functions"). Signed-off-by: Yue Haibing Hi Yue Haibing, FWIIW, I think this should be targeted at net-next. Yep, please send to net-next. Looks good also to me: Reviewed-by

Re: [PATCH RFC net-next v5 03/14] af_vsock: support multi-transport datagrams

2023-08-03 Thread Stefano Garzarella
On Thu, Aug 03, 2023 at 12:53:22AM +, Bobby Eshleman wrote: On Wed, Aug 02, 2023 at 10:24:44PM +, Bobby Eshleman wrote: On Sun, Jul 23, 2023 at 12:53:15AM +0300, Arseniy Krasnov wrote: > > > On 19.07.2023 03:50, Bobby Eshleman wrote: > > This patch adds support for multi-transport datagr

[PATCH net] test/vsock: remove vsock_perf executable on `make clean`

2023-08-03 Thread Stefano Garzarella
We forgot to add vsock_perf to the rm command in the `clean` target, so now we have a left over after `make clean` in tools/testing/vsock. Fixes: 8abbffd27ced ("test/vsock: vsock_perf utility") Cc: avkras...@sberdevices.ru Signed-off-by: Stefano Garzarella --- tools/testing/vsock/Ma

Re: [RFC PATCH v1 2/2] test/vsock: shutdowned socket test

2023-08-02 Thread Stefano Garzarella
On Tue, Aug 01, 2023 at 05:17:27PM +0300, Arseniy Krasnov wrote: This adds two tests for 'shutdown()' call. It checks that SIGPIPE is sent when MSG_NOSIGNAL is not set and vice versa. Both flags SHUT_WR and SHUT_RD are tested. Signed-off-by: Arseniy Krasnov --- tools/testing/vsock/vsock_test.c

Re: [RFC PATCH v1 1/2] vsock: send SIGPIPE on write to shutdowned socket

2023-08-02 Thread Stefano Garzarella
On Tue, Aug 01, 2023 at 05:17:26PM +0300, Arseniy Krasnov wrote: POSIX requires to send SIGPIPE on write to SOCK_STREAM socket which was shutdowned with SHUT_WR flag or its peer was shutdowned with SHUT_RD flag. Also we must not send SIGPIPE if MSG_NOSIGNAL flag is set. Signed-off-by: Arseniy Kr

Re: [PATCH RFC net-next v5 10/14] virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-08-01 Thread Stefano Garzarella
On Tue, Aug 01, 2023 at 04:30:22AM +, Bobby Eshleman wrote: On Thu, Jul 27, 2023 at 09:48:21AM +0200, Stefano Garzarella wrote: On Wed, Jul 26, 2023 at 02:38:08PM -0400, Michael S. Tsirkin wrote: > On Wed, Jul 19, 2023 at 12:50:14AM +, Bobby Eshleman wrote: > > This comm

Re: [PATCH net-next] vsock: Remove unused function declarations

2023-07-31 Thread Stefano Garzarella
I'd used "vsock/vmci:" as a prefix in the title. With or without: Reviewed-by: Stefano Garzarella diff --git a/net/vmw_vsock/vmci_transport.h b/net/vmw_vsock/vmci_transport.h index b7b072194282..dbda3ababa14 100644 --- a/net/vmw_vsock/vmci_transport.h +++ b/net/vmw_vsock/vmci_tra

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-27 Thread Stefano Garzarella
On Thu, Jul 27, 2023 at 11:32:00AM +0300, Arseniy Krasnov wrote: On 25.07.2023 15:28, Stefano Garzarella wrote: On Tue, Jul 25, 2023 at 12:16:11PM +0300, Arseniy Krasnov wrote: On 25.07.2023 11:46, Arseniy Krasnov wrote: On 25.07.2023 11:43, Stefano Garzarella wrote: On Fri, Jul 21, 2023 at

Re: [PATCH RFC net-next v5 10/14] virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-07-27 Thread Stefano Garzarella
On Wed, Jul 26, 2023 at 02:38:08PM -0400, Michael S. Tsirkin wrote: On Wed, Jul 19, 2023 at 12:50:14AM +, Bobby Eshleman wrote: This commit adds a feature bit for virtio vsock to support datagrams. Signed-off-by: Jiang Wang Signed-off-by: Bobby Eshleman --- include/uapi/linux/virtio_vsoc

Re: [PATCH net-next v3 4/4] vsock/test: MSG_PEEK test for SOCK_SEQPACKET

2023-07-26 Thread Stefano Garzarella
+--- 1 file changed, 54 insertions(+), 4 deletions(-) Reviewed-by: Stefano Garzarella Thanks, Stefano diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c index 444a3ff0681f..90718c2fd4ea 100644 --- a/tools/testing/vsock/vsock_test.c +++ b/tools/testing/vsock

Re: [RFC PATCH v2 4/4] vsock/test: MSG_PEEK test for SOCK_SEQPACKET

2023-07-25 Thread Stefano Garzarella
On Wed, Jul 19, 2023 at 10:27:08PM +0300, Arseniy Krasnov wrote: This adds MSG_PEEK test for SOCK_SEQPACKET. It works in the same way as SOCK_STREAM test, except it also tests MSG_TRUNC flag. Signed-off-by: Arseniy Krasnov --- tools/testing/vsock/vsock_test.c | 58 +-

Re: [RFC PATCH v2 3/4] vsock/test: rework MSG_PEEK test for SOCK_STREAM

2023-07-25 Thread Stefano Garzarella
++-- 1 file changed, 75 insertions(+), 3 deletions(-) Reviewed-by: Stefano Garzarella diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c index ac1bd3ac1533..444a3ff0681f 100644 --- a/tools/testing/vsock/vsock_test.c +++ b/tools/testing/vsock/vsock_test.c

Re: [RFC PATCH v2 2/4] virtio/vsock: support MSG_PEEK for SOCK_SEQPACKET

2023-07-25 Thread Stefano Garzarella
/virtio_transport_common.c | 63 +++-- 1 file changed, 60 insertions(+), 3 deletions(-) Reviewed-by: Stefano Garzarella diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 2ee40574c339..352d042b130b 100644 --- a/net/vmw_vsock

Re: [RFC PATCH v2 1/4] virtio/vsock: rework MSG_PEEK for SOCK_STREAM

2023-07-25 Thread Stefano Garzarella
- 1 file changed, 19 insertions(+), 22 deletions(-) Reviewed-by: Stefano Garzarella diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index b769fc258931..2ee40574c339 100644 --- a/net/vmw_vsock/virtio_transport_common.c

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Stefano Garzarella
On Tue, Jul 25, 2023 at 09:06:02AM -0400, Michael S. Tsirkin wrote: On Tue, Jul 25, 2023 at 02:53:39PM +0200, Stefano Garzarella wrote: On Tue, Jul 25, 2023 at 07:50:53AM -0400, Michael S. Tsirkin wrote: > On Fri, Jul 21, 2023 at 08:09:03AM +0300, Arseniy Krasnov wrote: > > &

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Stefano Garzarella
On Tue, Jul 25, 2023 at 07:50:53AM -0400, Michael S. Tsirkin wrote: On Fri, Jul 21, 2023 at 08:09:03AM +0300, Arseniy Krasnov wrote: On 21.07.2023 00:42, Arseniy Krasnov wrote: > This adds handling of MSG_ZEROCOPY flag on transmission path: if this > flag is set and zerocopy transmission is po

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Stefano Garzarella
On Tue, Jul 25, 2023 at 08:39:17AM -0400, Michael S. Tsirkin wrote: On Tue, Jul 25, 2023 at 02:28:02PM +0200, Stefano Garzarella wrote: On Tue, Jul 25, 2023 at 12:16:11PM +0300, Arseniy Krasnov wrote: > > > On 25.07.2023 11:46, Arseniy Krasnov wrote: > > > > > > O

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Stefano Garzarella
On Tue, Jul 25, 2023 at 12:16:11PM +0300, Arseniy Krasnov wrote: On 25.07.2023 11:46, Arseniy Krasnov wrote: On 25.07.2023 11:43, Stefano Garzarella wrote: On Fri, Jul 21, 2023 at 08:09:03AM +0300, Arseniy Krasnov wrote: On 21.07.2023 00:42, Arseniy Krasnov wrote: This adds handling of

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Stefano Garzarella
On Fri, Jul 21, 2023 at 08:09:03AM +0300, Arseniy Krasnov wrote: On 21.07.2023 00:42, Arseniy Krasnov wrote: This adds handling of MSG_ZEROCOPY flag on transmission path: if this flag is set and zerocopy transmission is possible (enabled in socket options and transport allows zerocopy), then n

  1   2   3   4   5   6   7   8   9   10   >