Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1516333rwb; Thu, 19 Jan 2023 11:40:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXuVeX4gKM8rBY4cCftWea6oTExnxbMhQXxoyCrhjPu/Ukli6E5bo8hmgJ1v4vtlGWmtt+Di X-Received: by 2002:a05:6a20:8402:b0:b0:30d8:d53 with SMTP id c2-20020a056a20840200b000b030d80d53mr14190548pzd.19.1674157246528; Thu, 19 Jan 2023 11:40:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674157246; cv=none; d=google.com; s=arc-20160816; b=aemELuKC/OlAzAdJG9RqWRnmZUZeG2wfFQriyM3gEJaT0d2PyeKPR0ASdoMVdM/msb TQnojNcmjQhn2w1AXYxb43ON5+tei2qtkTha5EsQCL/ZrjXBXB9qxRCrK8rKniQSS7WA ee0DfZJsusAkisLOOf5pXTXZ6rmC0zWW62w2i4IKcraY2VP3lSn9X+PwPtEYwqmuxSg9 81xKq6ldCX+tEi5IFnW8Z8Cje+aUJZbexdx2FCmBYWtu4CoGO7QA3ugSqaqeGFOOt0qd ZTRicAE33dgLfR/q2cRBmiBffsbqj/A5kY9b+xwIWE01U1JY9Nu0xAnwvgQjHgSQVwt3 bqqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Rmw0FrJMdZRJWNjxjWooFZkXRzw3BBeJgu/Q5Wf70sI=; b=ZnvaE4+OPX4SF/2xFeBS5gne1moB+ggJmQVCM+JsIhsxI8cx4o03TYvR7ECBQwXoS8 EWYYTn0c+qbhYLHN7/dmEyWg1JYj4uUyBpQPCKMg3bKWrgD9CobBi8V5bdCCvayz912n MBW/u2NTZxiW1iPa3V/fdqljTLJBxUWOtwsLjqPgr961kRqOCC8WTBqyICg+epQIH7+n gBQT8Py0P54FEz+69j/GfokKC6qDTqirFMSnZzPAEHWSRrMzp2MXBhGxWHfD8Z1hYBhn e2+S0e8esAvXu7CIJGWYCR928wx+4s+lLQMIA2FY7noy0zmc1x5f48gbuF4X2PHSDYcd e0wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Gq++Xgp2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 131-20020a630089000000b0047865b303a5si1912831pga.762.2023.01.19.11.40.40; Thu, 19 Jan 2023 11:40:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Gq++Xgp2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231303AbjASTL6 (ORCPT + 46 others); Thu, 19 Jan 2023 14:11:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231280AbjASTLb (ORCPT ); Thu, 19 Jan 2023 14:11:31 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F36334A23F; Thu, 19 Jan 2023 11:10:51 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id s13-20020a17090a6e4d00b0022900843652so6806121pjm.1; Thu, 19 Jan 2023 11:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Rmw0FrJMdZRJWNjxjWooFZkXRzw3BBeJgu/Q5Wf70sI=; b=Gq++Xgp2SEWZZiWi1UhYomHWADBM278cMA4J9Dqp7KNyhArkb+R1Pdv0Y3ZEb/cDbh X10EcXwl8UYcaSIH4ac2q7Q6I2VZfHRdb0bEDxLxDAG6kFN6/WF6l2TcI3ZYvh3QSq8u hgRjPMwumNddA1MAoNOJZWngltzIzNtWUSf2I8KVDsNt2lnw6/tbljsjps0ynI/UMYzZ goMh5ppRmpaJ64GDGYjEZKRojhBhe2HbVTr/0v8IuKECdvm9Z3fa+I8L8OJUUCpjikeA 87XW9jPe9FEJhgTwchSJUnTQCLGgzlPl6TGDL0w/JeB1fogcxrOu8fjWbMC55qsaWrT5 sLog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Rmw0FrJMdZRJWNjxjWooFZkXRzw3BBeJgu/Q5Wf70sI=; b=NdlDwKdXaXtqWOG/sleD1FU+qKWqSJAIdQOqI6FjaD6ynFYi1NAnz36AnqH7Z0enWg LPHRADnYmXp/gIzgUFk1b1H4DcofIs39zn7S43cjhrG+Zimmkp/GLGxd7uuwAh5J+Gj6 K6mMV+NRBoU9lpI1tCHIKZ/DYnW0ertpvEoJvLWMwZJlfiIlhc4fwYN6Q3Pk+FEyfQLN TsNesI5+suzq68m0ghmx04cxrSsxHzz6GJlEt1v9LdWT1jzf9IKXyJcI9Ya7mGtVAT42 RtDNkOg2K9k3ucRYeiqUGitrg/CtvLiuLzkpgOFY9vROqAqSLFG91XNy2MUOL0akpBBb aflQ== X-Gm-Message-State: AFqh2kpC5h99VFRjCtAIwPN1lQ9XmO50ANfpKIRQJyYSdOEAFfPK+dcK Ljhm9NeeaEt/lxf6DtKMNSw= X-Received: by 2002:a17:903:25cf:b0:192:f500:e831 with SMTP id jc15-20020a17090325cf00b00192f500e831mr11413620plb.8.1674155373969; Thu, 19 Jan 2023 11:09:33 -0800 (PST) Received: from localhost (c-73-164-155-12.hsd1.wa.comcast.net. [73.164.155.12]) by smtp.gmail.com with ESMTPSA id s14-20020a170902ea0e00b001926bff074fsm25392583plg.276.2023.01.19.11.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 11:09:33 -0800 (PST) Date: Wed, 18 Jan 2023 15:10:16 +0000 From: Bobby Eshleman To: Stefano Garzarella Cc: Bobby Eshleman , Cong Wang , kvm@vger.kernel.org, "Michael S. Tsirkin" , Alexei Starovoitov , virtualization@lists.linux-foundation.org, Song Liu , Eric Dumazet , Stanislav Fomichev , linux-kselftest@vger.kernel.org, Shuah Khan , Mykola Lysenko , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Yonghong Song , Paolo Abeni , KP Singh , Stefan Hajnoczi , Jakub Kicinski , Hao Luo , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Olsa , bpf@vger.kernel.org, Martin KaFai Lau , "David S. Miller" Subject: Re: [PATCH RFC 0/3] vsock: add support for sockmap Message-ID: References: <20230118-support-vsock-sockmap-connectible-v1-0-d47e6294827b@bytedance.com> <20230119104902.jxst4eblcuyjvums@sgarzare-redhat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230119104902.jxst4eblcuyjvums@sgarzare-redhat> X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > To: Stefano Garzarella > > To: "Michael S. Tsirkin" > > To: Jason Wang > > To: "David S. Miller" > > To: Eric Dumazet > > To: Jakub Kicinski > > To: Paolo Abeni > > To: Andrii Nakryiko > > To: Mykola Lysenko > > To: Alexei Starovoitov > > To: Daniel Borkmann > > To: Martin KaFai Lau > > To: Song Liu > > To: Yonghong Song > > To: John Fastabend > > To: KP Singh > > To: Stanislav Fomichev > > To: Hao Luo > > To: Jiri Olsa > > To: Shuah Khan > > 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 (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 > > > > _______________________________________________ > Virtualization mailing list > Virtualization@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/virtualization