virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net-next v4 1/3] vsock: support sockmap
       [not found] ` <20230327-vsock-sockmap-v4-1-c62b7cd92a85@bytedance.com>
@ 2023-03-28  8:20   ` Stefano Garzarella
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Garzarella @ 2023-03-28  8:20 UTC (permalink / raw)
  To: Bobby Eshleman
  Cc: kvm, Michael S. Tsirkin, Alexei Starovoitov, virtualization,
	Song Liu, Eric Dumazet, Stanislav Fomichev, linux-kselftest,
	Shuah Khan, Mykola Lysenko, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Yonghong Song, Paolo Abeni, KP Singh,
	Stefan Hajnoczi, Jakub Kicinski, Hao Luo, netdev, linux-kernel,
	Jiri Olsa, bpf, Martin KaFai Lau, David S. Miller

On Mon, Mar 27, 2023 at 07:11:51PM +0000, Bobby Eshleman wrote:
>This patch adds sockmap support for vsock sockets. It is intended to be
>usable by all transports, but only the virtio and loopback transports
>are implemented.
>
>SOCK_STREAM, SOCK_DGRAM, and SOCK_SEQPACKET are all supported.
>
>Signed-off-by: Bobby Eshleman <bobby.eshleman@bytedance.com>
>Acked-by: Michael S. Tsirkin <mst@redhat.com>
>---
> drivers/vhost/vsock.c                   |   1 +
> include/linux/virtio_vsock.h            |   1 +
> include/net/af_vsock.h                  |  17 ++++
> net/vmw_vsock/Makefile                  |   1 +
> net/vmw_vsock/af_vsock.c                |  64 ++++++++++--
> net/vmw_vsock/virtio_transport.c        |   2 +
> net/vmw_vsock/virtio_transport_common.c |  25 +++++
> net/vmw_vsock/vsock_bpf.c               | 174 ++++++++++++++++++++++++++++++++
> net/vmw_vsock/vsock_loopback.c          |   2 +
> 9 files changed, 281 insertions(+), 6 deletions(-)

LGTM!

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

Thanks,
Stefano

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH net-next v4 0/3] Add support for sockmap to vsock.
       [not found] <20230327-vsock-sockmap-v4-0-c62b7cd92a85@bytedance.com>
       [not found] ` <20230327-vsock-sockmap-v4-1-c62b7cd92a85@bytedance.com>
@ 2023-04-01  1:06 ` John Fastabend
  2023-04-03 11:10   ` Stefano Garzarella
  1 sibling, 1 reply; 3+ messages in thread
From: John Fastabend @ 2023-04-01  1:06 UTC (permalink / raw)
  To: Bobby Eshleman, Stefan Hajnoczi, Stefano Garzarella,
	Michael S. Tsirkin, Jason Wang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Andrii Nakryiko, Mykola Lysenko,
	Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Shuah Khan
  Cc: Bobby Eshleman, kvm, netdev, linux-kernel, virtualization,
	linux-kselftest, bpf

Bobby Eshleman wrote:
> We're testing usage of vsock as a way to redirect guest-local UDS
> requests to the host and this patch series greatly improves the
> performance of such a setup.
> 
> Compared to copying packets via userspace, this improves throughput by
> 121% in basic testing.
> 
> Tested as follows.
> 
> Setup: guest unix dgram sender -> guest vsock redirector -> host vsock
>        server
> Threads: 1
> Payload: 64k
> No sockmap:
> - 76.3 MB/s
> - The guest vsock redirector was
>   "socat VSOCK-CONNECT:2:1234 UNIX-RECV:/path/to/sock"
> Using sockmap (this patch):
> - 168.8 MB/s (+121%)
> - The guest redirector was a simple sockmap echo server,
>   redirecting unix ingress to vsock 2:1234 egress.
> - Same sender and server programs
> 
> *Note: these numbers are from RFC v1
> 
> Only the virtio transport has been tested. The loopback transport was
> used in writing bpf/selftests, but not thoroughly tested otherwise.
> 
> This series requires the skb patch.

Appears reasonable to me although I didn't review internals of all
the af_vsock stuff. I see it got merged great.

One nit, I have a series coming shortly to pull the tests out of
the sockmap_listen and into a sockmap_vsock because I don't think they
belong in _listen but that is just a refactor.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v4 0/3] Add support for sockmap to vsock.
  2023-04-01  1:06 ` [PATCH net-next v4 0/3] Add support for sockmap to vsock John Fastabend
@ 2023-04-03 11:10   ` Stefano Garzarella
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Garzarella @ 2023-04-03 11:10 UTC (permalink / raw)
  To: John Fastabend
  Cc: Bobby Eshleman, kvm, Michael S. Tsirkin, Alexei Starovoitov,
	virtualization, Song Liu, Eric Dumazet, Stanislav Fomichev,
	linux-kselftest, Shuah Khan, Mykola Lysenko, Daniel Borkmann,
	Andrii Nakryiko, Yonghong Song, Paolo Abeni, KP Singh,
	Stefan Hajnoczi, Jakub Kicinski, Hao Luo, netdev, linux-kernel,
	Jiri Olsa, bpf, Martin KaFai Lau, David S. Miller

On Fri, Mar 31, 2023 at 06:06:10PM -0700, John Fastabend wrote:
>Bobby Eshleman wrote:
>> We're testing usage of vsock as a way to redirect guest-local UDS
>> requests to the host and this patch series greatly improves the
>> performance of such a setup.
>>
>> Compared to copying packets via userspace, this improves throughput by
>> 121% in basic testing.
>>
>> Tested as follows.
>>
>> Setup: guest unix dgram sender -> guest vsock redirector -> host vsock
>>        server
>> Threads: 1
>> Payload: 64k
>> No sockmap:
>> - 76.3 MB/s
>> - The guest vsock redirector was
>>   "socat VSOCK-CONNECT:2:1234 UNIX-RECV:/path/to/sock"
>> Using sockmap (this patch):
>> - 168.8 MB/s (+121%)
>> - The guest redirector was a simple sockmap echo server,
>>   redirecting unix ingress to vsock 2:1234 egress.
>> - Same sender and server programs
>>
>> *Note: these numbers are from RFC v1
>>
>> Only the virtio transport has been tested. The loopback transport was
>> used in writing bpf/selftests, but not thoroughly tested otherwise.
>>
>> This series requires the skb patch.
>
>Appears reasonable to me although I didn't review internals of all
>the af_vsock stuff. I see it got merged great.

Thanks for checking!

>
>One nit, I have a series coming shortly to pull the tests out of
>the sockmap_listen and into a sockmap_vsock because I don't think they
>belong in _listen but that is just a refactor.
>

LGTM!

Thanks,
Stefano

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-03 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230327-vsock-sockmap-v4-0-c62b7cd92a85@bytedance.com>
     [not found] ` <20230327-vsock-sockmap-v4-1-c62b7cd92a85@bytedance.com>
2023-03-28  8:20   ` [PATCH net-next v4 1/3] vsock: support sockmap Stefano Garzarella
2023-04-01  1:06 ` [PATCH net-next v4 0/3] Add support for sockmap to vsock John Fastabend
2023-04-03 11:10   ` Stefano Garzarella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).