Netdev List
 help / color / mirror / Atom feed
From: Bobby Eshleman <bobbyeshleman@gmail.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: Bobby Eshleman <bobby.eshleman@bytedance.com>,
	Cong Wang <cong.wang@bytedance.com>,
	kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	virtualization@lists.linux-foundation.org,
	Song Liu <song@kernel.org>, Eric Dumazet <edumazet@google.com>,
	Stanislav Fomichev <sdf@google.com>,
	linux-kselftest@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
	Mykola Lysenko <mykolal@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	John Fastabend <john.fastabend@gmail.com>,
	Andrii Nakryiko <andrii@kernel.org>, Yonghong Song <yhs@fb.com>,
	Paolo Abeni <pabeni@redhat.com>, KP Singh <kpsingh@kernel.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Jakub Kicinski <kuba@kernel.org>, Hao Luo <haoluo@google.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jiri Olsa <jolsa@kernel.org>,
	bpf@vger.kernel.org, Martin KaFai Lau <martin.lau@linux.dev>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH RFC 0/3] vsock: add support for sockmap
Date: Wed, 18 Jan 2023 15:10:16 +0000	[thread overview]
Message-ID: <Y8gL2PjGZltS1Zqg@bullseye> (raw)
In-Reply-To: <20230119104902.jxst4eblcuyjvums@sgarzare-redhat>

On Thu, Jan 19, 2023 at 11:49:02AM +0100, Stefano Garzarella wrote:
> Hi Bobby,
> 
> On Wed, Jan 18, 2023 at 12:27:39PM -0800, Bobby Eshleman wrote:
> > Add support for sockmap to vsock.
> > 
> > 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 221% in
> > basic testing.
> 
> Cool, nice series!
> 
> > 
> > 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 (+221%)
> 
> Assuming the absolute value is correct, there is a typo here, it would be
> +121% right?
> 

Lol, yes.

> > - The guest redirector was a simple sockmap echo server,
> >  redirecting unix ingress to vsock 2:1234 egress.
> > - Same sender and server programs
> > 
> > Only the virtio transport has been tested.
> 
> I think is fine for now.
> 
> > The loopback transport was used in
> > writing bpf/selftests, but not thoroughly tested otherwise.
> 
> I did a quick review mainly for vsock stuff.
> Hoping others can take a better look at net/vmw_vsock/vsock_bpf.c, since I'm
> not very familiar with that subsystem.
> 
> FYI I will be off the next two weeks (till Feb 7) with limited internet
> access.
> 

Roger that.

Thanks,
Bobby

> Thanks,
> Stefano
> 
> > 
> > This series requires the skb patch.
> > 
> > To: Stefan Hajnoczi <stefanha@redhat.com>
> > To: Stefano Garzarella <sgarzare@redhat.com>
> > To: "Michael S. Tsirkin" <mst@redhat.com>
> > To: Jason Wang <jasowang@redhat.com>
> > To: "David S. Miller" <davem@davemloft.net>
> > To: Eric Dumazet <edumazet@google.com>
> > To: Jakub Kicinski <kuba@kernel.org>
> > To: Paolo Abeni <pabeni@redhat.com>
> > To: Andrii Nakryiko <andrii@kernel.org>
> > To: Mykola Lysenko <mykolal@fb.com>
> > To: Alexei Starovoitov <ast@kernel.org>
> > To: Daniel Borkmann <daniel@iogearbox.net>
> > To: Martin KaFai Lau <martin.lau@linux.dev>
> > To: Song Liu <song@kernel.org>
> > To: Yonghong Song <yhs@fb.com>
> > To: John Fastabend <john.fastabend@gmail.com>
> > To: KP Singh <kpsingh@kernel.org>
> > To: Stanislav Fomichev <sdf@google.com>
> > To: Hao Luo <haoluo@google.com>
> > To: Jiri Olsa <jolsa@kernel.org>
> > To: Shuah Khan <shuah@kernel.org>
> > Cc: linux-kernel@vger.kernel.org
> > Cc: kvm@vger.kernel.org
> > Cc: virtualization@lists.linux-foundation.org
> > Cc: netdev@vger.kernel.org
> > Cc: bpf@vger.kernel.org
> > Cc: linux-kselftest@vger.kernel.org
> > Signed-off-by: Bobby Eshleman <bobby.eshleman@bytedance.com>
> > 
> > ---
> > Bobby Eshleman (3):
> >      vsock: support sockmap
> >      selftests/bpf: add vsock to vmtest.sh
> >      selftests/bpf: Add a test case for vsock sockmap
> > 
> > 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                           |  59 ++++++-
> > net/vmw_vsock/virtio_transport.c                   |   2 +
> > net/vmw_vsock/virtio_transport_common.c            |  22 +++
> > net/vmw_vsock/vsock_bpf.c                          | 180 +++++++++++++++++++++
> > net/vmw_vsock/vsock_loopback.c                     |   2 +
> > tools/testing/selftests/bpf/config.x86_64          |   4 +
> > .../selftests/bpf/prog_tests/sockmap_listen.c      | 163 +++++++++++++++++++
> > tools/testing/selftests/bpf/vmtest.sh              |   1 +
> > 12 files changed, 447 insertions(+), 6 deletions(-)
> > ---
> > base-commit: f12f4326c6a75a74e908714be6d2f0e2f0fd0d76
> > change-id: 20230118-support-vsock-sockmap-connectible-2e1297d2111a
> > 
> > Best regards,
> > -- 
> > Bobby Eshleman <bobby.eshleman@bytedance.com>
> > 
> 
> _______________________________________________
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/virtualization

      reply	other threads:[~2023-01-19 19:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 20:27 [PATCH RFC 0/3] vsock: add support for sockmap Bobby Eshleman
2023-01-18 20:27 ` [PATCH RFC 1/3] vsock: support sockmap Bobby Eshleman
2023-01-19 10:39   ` Stefano Garzarella
2023-01-18 15:08     ` Bobby Eshleman
2023-01-20  8:55       ` Stefano Garzarella
2023-01-21 19:22   ` Cong Wang
2023-01-19  3:47     ` Bobby Eshleman
2023-01-18 20:27 ` [PATCH RFC 2/3] selftests/bpf: add vsock to vmtest.sh Bobby Eshleman
2023-01-19 10:44   ` Stefano Garzarella
2023-01-18 20:27 ` [PATCH RFC 3/3] selftests/bpf: Add a test case for vsock sockmap Bobby Eshleman
2023-01-19 10:48   ` Stefano Garzarella
2023-01-18 15:14     ` Bobby Eshleman
2023-01-19 10:49 ` [PATCH RFC 0/3] vsock: add support for sockmap Stefano Garzarella
2023-01-18 15:10   ` Bobby Eshleman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y8gL2PjGZltS1Zqg@bullseye \
    --to=bobbyeshleman@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bobby.eshleman@bytedance.com \
    --cc=bpf@vger.kernel.org \
    --cc=cong.wang@bytedance.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mst@redhat.com \
    --cc=mykolal@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@google.com \
    --cc=sgarzare@redhat.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox