Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp9054635rwb; Thu, 24 Nov 2022 07:31:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf7A+9kvjl61p689mGTQeykyMseyuFsVeOJhV9dop91C0e3wWeIEnI72HwesbAq3Si7Sn1Lr X-Received: by 2002:a05:6402:910:b0:468:74:9668 with SMTP id g16-20020a056402091000b0046800749668mr12811904edz.394.1669303915098; Thu, 24 Nov 2022 07:31:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669303915; cv=none; d=google.com; s=arc-20160816; b=OHa2d8BJeJh1Cnswvi9GD0M9U0QrRH2AqXSLvz+4OOEhUlK4tGpxxSyVvpwLOYvF6t 97PP/HlYsUGVhCWImR0nUSYhqujkXi2oSDOq0J6YlVItnyXE265qfIgIs7ps6ts8jy4t WadRenYd9EKvUwE0Uc5KKh299Z34u6jAJFxye5dpCohIGHNvZGl3JoSDLg4f/P6P0qHA 2/DJBzAEt4PMy1DEFSqOAnSfaJ3doTrcvKi6MZZjBrTI0bbCWBmDQdzyjicHnl6IRfUi yrXgpKJWofShEpz9Y/huk6v0N31VHpT9tgKZ+iHyYH4Mz3Ij4A2jEdhGHptnjsjYd2oa mo7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=XPUoBYfcFjyl7FwxKw5AFCfnK5DVVfvD4huQjq4ERM0=; b=Di9pYa4LBR/qqVAOsrxwMzVxmIUPM1KfS/JMT4dgfy9hSt7YEtd3uKuC9cI89dsDAC 9dzJ0m7HjOmM0zBB9VpXhuQSVqtaqYiz9GZ0Dc276Ej6RIlHJxCez5s6NvG02EuqUVfv JR9TNVUeB0FDpyEdLdiSD1Zh/kDU9HwkbWS6SMQidP12fpVCmVu+JJc4CoRNxofmSbk0 4QJM5mBzcpL6AYyHQk9Hvsq+vp2qZYLYNSfbAupg1nhjzilsFMivctPq5KkEKHhqvITZ o2KrfnNfE2/XPR0mqmxbYhmxb3AAADu08oJPKzgNyTMg/X3sosDFPHBLAbQgwNx5EuoN m4UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AkPWvGH7; 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 e5-20020a17090658c500b00783645da4e5si795874ejs.582.2022.11.24.07.31.32; Thu, 24 Nov 2022 07:31:55 -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=AkPWvGH7; 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 S229936AbiKXPNz (ORCPT + 87 others); Thu, 24 Nov 2022 10:13:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiKXPNy (ORCPT ); Thu, 24 Nov 2022 10:13:54 -0500 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 302A315AAB4; Thu, 24 Nov 2022 07:13:53 -0800 (PST) Received: by mail-lf1-x132.google.com with SMTP id bp15so2933603lfb.13; Thu, 24 Nov 2022 07:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=XPUoBYfcFjyl7FwxKw5AFCfnK5DVVfvD4huQjq4ERM0=; b=AkPWvGH7j6VUvs4P98n6tnaY9J6JAvXPdd/8I4dDqfahyZkB9/YF9YbpwSTldp2f3X jP6cM8a7DgYWkMkvFtxggc6GWfTNC4vjntqRqniI6jqUqUqENSM/mvV5VCGA25hKBIsu AFQVcKd4OGc5b9LF6tF+BLmlbMhvqku4+CLbq4eJg8SJcXZ9olxRuk1PwX5UectHJU6h hMuzXIJIXfjKwB91kTU6RVFs7gcA5CmrgQvbXdN1mi4g3ri55lsaoKb0479D2z+fSdDJ ne4NwNnw/tBB0jh+CbdKrYYRDVZgIWRnBgOxL23yIyGAOMZurS5GWwZ9F9NYyYHPLgdx Rpow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XPUoBYfcFjyl7FwxKw5AFCfnK5DVVfvD4huQjq4ERM0=; b=5uJC2YQNPyR8TFBcuQZBAR8T6/qU8BL9dQaoSP6enIpcApyGZA76xzYJuzpw3v6SWW fzOPHemahlrPPWEmYvToFIMfonCTH7AHSnZeos10rdQqqzBdC0/IZyWc7eN3oH6Siza/ +l0UlyeR2UWIW3kVHRNKwHLQwQNVg2HhHOfkYIqFWkfpHW4f2w2NrVcUA9PJz2eHBQiu LCn/XG7GiI+NvJ+6iZmnxAoSwpjXPimJPpi8cqyZa7kOqh+mhNR8+aSlmzS3gvGxHtxw VqscaRcxMX5LrE+Qyraow8T9hIZN51s3fM50w9jTFEESr0AzMz9d3zyuAtPgk1dP5CWN RVxQ== X-Gm-Message-State: ANoB5pnjSw63WHTbWrm8ytmGWmynIyNcklnCRBCNHbElBAK5s79qvX5M ZTdH1nbr+El3VXW42lTlP/RdIAcTxq5lU9X6 X-Received: by 2002:ac2:5331:0:b0:4ab:35a8:2fa0 with SMTP id f17-20020ac25331000000b004ab35a82fa0mr8789857lfh.233.1669302831294; Thu, 24 Nov 2022 07:13:51 -0800 (PST) Received: from [192.168.0.103] ([77.220.140.242]) by smtp.gmail.com with ESMTPSA id u25-20020ac25199000000b00494a8fecacesm145435lfi.192.2022.11.24.07.13.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Nov 2022 07:13:50 -0800 (PST) Message-ID: <03d74a68-91a3-04dd-613b-33e232937cbc@gmail.com> Date: Thu, 24 Nov 2022 18:13:49 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v4] virtio/vsock: replace virtio_vsock_pkt with sk_buff Content-Language: en-US To: Stefano Garzarella , Bobby Eshleman Cc: Bobby Eshleman , Cong Wang , Jiang Wang , Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, AVKrasnov@sberdevices.ru References: <20221124060750.48223-1-bobby.eshleman@bytedance.com> <20221124150005.vchk6ieoacrcu2gb@sgarzare-redhat> From: Arseniy Krasnov In-Reply-To: <20221124150005.vchk6ieoacrcu2gb@sgarzare-redhat> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,NICE_REPLY_A,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 Hello Stefano On 24.11.2022 18:00, Stefano Garzarella wrote: > This is a net-next material, please remember to use net-next tag: > https://www.kernel.org/doc/html/v6.0/process/maintainer-netdev.html#netdev-faq > > On Wed, Nov 23, 2022 at 10:07:49PM -0800, Bobby Eshleman wrote: >> This commit changes virtio/vsock to use sk_buff instead of >> virtio_vsock_pkt. Beyond better conforming to other net code, using >> sk_buff allows vsock to use sk_buff-dependent features in the future >> (such as sockmap) and improves throughput. >> >> This patch introduces the following performance changes: >> >> Tool/Config: uperf w/ 64 threads, SOCK_STREAM >> Test Runs: 5, mean of results >> Before: commit 95ec6bce2a0b ("Merge branch 'net-ipa-more-endpoints'") >> >> Test: 64KB, g2h >> Before: 21.63 Gb/s >> After: 25.59 Gb/s (+18%) >> >> Test: 16B, g2h >> Before: 11.86 Mb/s >> After: 17.41 Mb/s (+46%) >> >> Test: 64KB, h2g >> Before: 2.15 Gb/s >> After: 3.6 Gb/s (+67%) >> >> Test: 16B, h2g >> Before: 14.38 Mb/s >> After: 18.43 Mb/s (+28%) >> >> Signed-off-by: Bobby Eshleman >> --- > > The patch LGTM. I run several tests (iperf3, vsock_test, > vsock_diag_test, vhost-user-vsock, tcpdump) and IMO we are okay. > > I found the following problems that I would like to report: > > - vhost-user-vsock [1] is failing, but it is not an issue of this patch, >   but a spec violation in the rust-vmm/vm-virtio/virtio-vsock crate as I >   reported here [2]. We will fix it there, this patch is fine, indeed >   trying a guest with the new layout (1 descriptor for both header and >   data) with vhost-vsock in Linux 6.0, everything works perfectly. > > - the new "SOCK_SEQPACKET msg bounds" [3] reworked by Arseniy fails >   intermittently with this patch. > >   Using the tests currently in the kernel tree everything is fine, so >   I don't understand if it's a problem in the new test or in this >   patch. I've looked at the code again and don't seem to see any >   criticisms. > >   @Arseniy @Bobby can you take a look? Seems i've found this problem here: https://lkml.org/lkml/2022/11/24/708 Being fixed - all tests passes Thank You! > >   I'll try to take a closer look too, and before I give my R-b I'd like >   to make sure it's a problem in the test and not in this patch. > >   This is what I have (some times, not always) with both host and guest >   with this patch and the series of [3] applied: > >   host$ ./vsock_test --control-host=192.168.133.3 --control-port=12345 \ >                      --mode=client --peer-cid=4 >   Control socket connected to 192.168.133.3:12345. >   0 - SOCK_STREAM connection reset...ok >   1 - SOCK_STREAM bind only...ok >   2 - SOCK_STREAM client close...ok >   3 - SOCK_STREAM server close...ok >   4 - SOCK_STREAM multiple connections...ok >   5 - SOCK_STREAM MSG_PEEK...ok >   6 - SOCK_SEQPACKET msg bounds...ok >   7 - SOCK_SEQPACKET MSG_TRUNC flag...recv: Connection reset by peer > >   guest$ ./vsock_test --control-port=12345 --mode=server --peer-cid=2 >   Control socket listening on 0.0.0.0:12345 >   Control socket connection accepted... >   0 - SOCK_STREAM connection reset...ok >   1 - SOCK_STREAM bind only...ok >   2 - SOCK_STREAM client close...ok >   3 - SOCK_STREAM server close...ok >   4 - SOCK_STREAM multiple connections...ok >   5 - SOCK_STREAM MSG_PEEK...ok >   6 - SOCK_SEQPACKET msg bounds...Message bounds broken > > Thanks, > Stefano > > [1] https://github.com/rust-vmm/vhost-device/tree/main/crates/vsock > [2] https://github.com/rust-vmm/vm-virtio/issues/204 > [3] https://lore.kernel.org/lkml/c991dffd-1dbc-e1d1-b682-a3c71f6ce51c@sberdevices.ru/ >