Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1822158rwl; Fri, 31 Mar 2023 18:09:32 -0700 (PDT) X-Google-Smtp-Source: AKy350ZFvuQYbBrZp8jDQrszUP2Qys2V/sujnFzIP+2p45dW/qjcZgNLZXMuwfVhof/C4mhfyQMP X-Received: by 2002:a17:902:da88:b0:19d:2a3:f019 with SMTP id j8-20020a170902da8800b0019d02a3f019mr8459059plx.1.1680311372290; Fri, 31 Mar 2023 18:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680311372; cv=none; d=google.com; s=arc-20160816; b=RdDNFkjTEVNuCkTyVHtY5a6ajl0905aVLjqCEnwkJ/KK3YmmSvbgnh/APKJX95CLSX N1N0i7jXO+pPAFzBpNhCceLDoLyNZ7n1/Sxr4ut43WcEUy05WWzoEz66bLbdWvWzchkY p/FIhFI7Hle/0diS8OnIaDfxoJE2G0a6kkQn4vxQF9PKmEhXj/V3qiqMUEqhqB46CYdD r5rNxuwBUzCQVLVOpeagyVAAN07BKDSojRMus4QBUBpZLqC32AhTJEQdoPNC8TlwYiKT DaRXDkjGBDGkMIXUO7goVj9Bd5surFBqIlVSCKfOiGhUHNZIP5uS0mU7dy8vh/n5tTGH 1gXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:subject :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=lptAq23Bhxck5w4z/rG8RS6tmRRir3me5yWghBfZL5w=; b=LxzKyqubP35GVXToB+VLL9n/MaGv/wipzFmrLuzS/gpQKjnnyGI6qP76UQf4U+6JSy P6YH5joq8QYvWykWRfdMgamvLn2dvQ81wWZgWHo+YDviVnY3LP+ZGBgP/ValYj94A4sL EIFAS/+VAJPoDR8XRiRFO5dBNIKuZKvVG2UJLwo3qiCTCZelHLL+Dpfwv3A2EJV/3YTb WmMBUpAYlRpPmbvQ85MoGC9ozwnBXmJeDZZf3rtJGJl4v1DDIa/uOftlayIRvBEENoe0 6Ohf7Tt6tDhjcPQRham8ex+g42rP0m566cNMqP1Ms0eWr4a0MF/WAZNkRiWZ0e5A6Xge 3cLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RciMOpzW; 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 u4-20020a170902bf4400b001a1edb957absi3462051pls.123.2023.03.31.18.09.19; Fri, 31 Mar 2023 18:09:32 -0700 (PDT) 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=RciMOpzW; 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 S233371AbjDABGT (ORCPT + 99 others); Fri, 31 Mar 2023 21:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233286AbjDABGR (ORCPT ); Fri, 31 Mar 2023 21:06:17 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 612711D861; Fri, 31 Mar 2023 18:06:12 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id o11so22981375ple.1; Fri, 31 Mar 2023 18:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680311172; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=lptAq23Bhxck5w4z/rG8RS6tmRRir3me5yWghBfZL5w=; b=RciMOpzWuO92XZZ491w3Y2DRYMTk1B/OuOYYEgSqs4w2yJ0FKDEx4PyPOdLPXVASLH HeNugxvV6lVKFtQbAgjusSVnN9Qa3BspUavTeWaWlaIeltduRQTJSlUHWifbYgZmKH3c 1ajobv052ByD1ZxgrIGtq1u2IKSDh1m7NdRJVyBf1RS+Ruf1FQ9wFDfES6V9whcJkHrz kZXHZypSh4qPhO6ZOH9F3jdQjxnrIc5h1CQas2SI7zzvi6FwmjJ87DDlt09VxHlmKZXT TQ5TZsq3YlPOqJ01h6OlRLwQ5bduGep0FyhfMuRNKh9+q3jDIOFIZUfrx3mzt2PnP7VJ 5Ifg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680311172; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=lptAq23Bhxck5w4z/rG8RS6tmRRir3me5yWghBfZL5w=; b=66Kfz8TJk1gS6wOEGBMVeetRDpKMuzMUabbEpy6qUDe9J6OCemfoGi5UKdcXoYhCQ0 2mVqd6kLREwAK18QSREAuD9Av+xnbD9O9596PcmEgnnwgigNu5t8jLDmwpEZPbGkkAGL 8G4Ch2GGfIoSwTwo+TEO3raLEs0eLXrbttE2oCrUr0+w3LUTFzqsbBoFjQVRxA9kN4gw EEf1LbOjyOPviGTeVj5tseVyTRjAPyNBHE4kLw2Z9+ucLNPVjHigcE3f9d+2X62VrMlC 2Jx0pJiNfPlUPtLwDXjcGyhkfyDR4wOuq+y2G8ThXDL1Sp3phmcisWSH2liBM7gUJyUj QKbg== X-Gm-Message-State: AAQBX9cZZTPALNrjmdCbeBHjAMrGoIGwzwypOQSjS+Pt/QmRU85k+eXV xQvzK2VfCEy/ieXqwj8OYps= X-Received: by 2002:a17:902:fa04:b0:1a2:85f0:e747 with SMTP id la4-20020a170902fa0400b001a285f0e747mr8814999plb.41.1680311171897; Fri, 31 Mar 2023 18:06:11 -0700 (PDT) Received: from localhost ([98.97.116.12]) by smtp.gmail.com with ESMTPSA id w16-20020a63c110000000b0050f6add54fcsm2204421pgf.44.2023.03.31.18.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 18:06:11 -0700 (PDT) Date: Fri, 31 Mar 2023 18:06:10 -0700 From: John Fastabend 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: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, Bobby Eshleman Message-ID: <6427838247d16_c503a2087e@john.notmuch> In-Reply-To: <20230327-vsock-sockmap-v4-0-c62b7cd92a85@bytedance.com> References: <20230327-vsock-sockmap-v4-0-c62b7cd92a85@bytedance.com> Subject: RE: [PATCH net-next v4 0/3] Add support for sockmap to vsock. Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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.