Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7915908rwl; Tue, 10 Jan 2023 07:00:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXt2na9pkv0ApGJJxJjoRu9rMYS/AGGFhAgJpjBJyflpgc1PjpsMJGI6deMLZVns1YCOeMeq X-Received: by 2002:a17:907:a4c7:b0:84d:2078:1fd6 with SMTP id vq7-20020a170907a4c700b0084d20781fd6mr13694311ejc.34.1673362838995; Tue, 10 Jan 2023 07:00:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673362838; cv=none; d=google.com; s=arc-20160816; b=M0dTdqc/V+uPIUumHK6lYeMVAWH4V3oKmdZjZCvzWy6rcWg9YZef57HjZXotQedWkt YQRqmcHTMpN55RDFEq4y7vBu9R/bjabL4jgO0OX13VLYmtBS8EWSPnFCOIqijdHfFMcL HaL/nyuXKI3dzwRX+V/rbIRRYXfQ1P7mkPw+Ef6aRftFW/Fv0MIz2XtG8/VkE2QQiuUC NZRAjwQYxlqObcFcWDGg0gu7EGWtVcf3uskBkVuKJM5ibxhniGXB91PBQv5jHt2VQ8Cp Kk6+AK3QlTrz/8rslXvcp+v9V53C7lB7x4GdUJhKJjuQ0Df5ASBTlqVK+tcd3Inj9HpQ ePQw== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=HEPL9QhdiHtl81dbBjJ+8ZxqD3DaFE7xqIq6L14Xhs8=; b=ffKKP8XpUeSlJlNVBUj9zw60RuaXccjow7vGlY6UgBjw7eP6DNcrLWhKdukPhokDNg O0R74C0+GfDojYtaEtQ7b1J7JTNoIWSjBCK4yir3uiMX/bi8PoWjKEDDBx8XNjmPVPFp hj612ujynfnEpYm0CfDFdg4EfaSfGVJssDjW8DftBXWaeNnKXvCMiHo1AIZy2LSFcNj5 rVdrAbo+VqFUi1QmJ0GcL7CPz1Q4hxRGi8pe4v8bviIcVkzbLzx0FBs2beBcJ+OVtxNi KcPCd17rCh8mRyQfcCu7ZMFxyP4mJy2u5/dbp+eCdJq2Jn4DsOgJm7I9tcCwBz7cq8W4 LX6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QgnCGkEs; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xd12-20020a170907078c00b0083bb359db7dsi12053742ejb.115.2023.01.10.07.00.26; Tue, 10 Jan 2023 07:00:38 -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=@redhat.com header.s=mimecast20190719 header.b=QgnCGkEs; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235755AbjAJOqg (ORCPT + 53 others); Tue, 10 Jan 2023 09:46:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233483AbjAJOq0 (ORCPT ); Tue, 10 Jan 2023 09:46:26 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD041CB2B for ; Tue, 10 Jan 2023 06:45:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673361939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HEPL9QhdiHtl81dbBjJ+8ZxqD3DaFE7xqIq6L14Xhs8=; b=QgnCGkEs5ucCYd8LW5qI115aXXUfNNh4On5Vml4R2f+QFAKU0LDVeNvt4ZLMi/JBBe0kbm XZhLeS0bdU7CnXd8+DkTWWnhSXnZ7emvyjDDfeI4uNl85vT0rqY/HPlAmFUaEpW3y6nTJS lI4U7z5SAJCyT3T9Y3EkyPv6VHIUdDg= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-389-71yyHcUlOUmuPvDDWigC-Q-1; Tue, 10 Jan 2023 09:45:37 -0500 X-MC-Unique: 71yyHcUlOUmuPvDDWigC-Q-1 Received: by mail-qk1-f200.google.com with SMTP id ay34-20020a05620a17a200b00704bd9922c4so8847250qkb.12 for ; Tue, 10 Jan 2023 06:45:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HEPL9QhdiHtl81dbBjJ+8ZxqD3DaFE7xqIq6L14Xhs8=; b=RopnJMs5TbLKs7ZCrLXT4qrShfP7ILo+cWtKiw21mTFvcr7V6ViO/bp8jrirX10BYL Qrx5Tdwevi7J5MnK7+jzyVxih8tECuYbez2uNihgt9YKCz2VGuhRkvwqSJVhjAYOU7vN PbiamRZMKPQ08uSdRA4TVehwnp8IFXLGYFciHLZt61lN19wcYBoslbvlTa1Ik11VaczQ T5unnP9LHZWJepoeZA/vKgAFM7XXmkLMdax0ZLITgnigB5HD8quwIrOmZR/4beq1l5oR IUUBGpFTEtkahwOr58fExzlAf+BPak0hdTH7J/AKi4mySCLj8nFbUbymQq7eHOcXj/eI /ZMA== X-Gm-Message-State: AFqh2krUIMnITEbxj9E9FP/seadKbEC7xC6G5bOsWXuoc5VKiCGtoa34 UkP5ygFUW8blIYXV4iuzeA666gduFprlf1U81MJCK2pNziUpm/Rx9pinhnWtnKrku+Lb+XlTcGv DA+oKm67c0bq3LTRlU6lzBl7f X-Received: by 2002:ac8:6ec2:0:b0:3ad:8c10:593b with SMTP id f2-20020ac86ec2000000b003ad8c10593bmr9867759qtv.24.1673361937200; Tue, 10 Jan 2023 06:45:37 -0800 (PST) X-Received: by 2002:ac8:6ec2:0:b0:3ad:8c10:593b with SMTP id f2-20020ac86ec2000000b003ad8c10593bmr9867721qtv.24.1673361936919; Tue, 10 Jan 2023 06:45:36 -0800 (PST) Received: from gerbillo.redhat.com (146-241-120-128.dyn.eolo.it. [146.241.120.128]) by smtp.gmail.com with ESMTPSA id z13-20020ac875cd000000b003aef9d97465sm1259788qtq.43.2023.01.10.06.45.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 06:45:36 -0800 (PST) Message-ID: <5042e5c6e57a3f99895616c891512e482bf6ed28.camel@redhat.com> Subject: Re: [PATCH net-next v9] virtio/vsock: replace virtio_vsock_pkt with sk_buff From: Paolo Abeni To: Bobby Eshleman Cc: Bobby Eshleman , Cong Wang , Stefano Garzarella , Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 10 Jan 2023 15:45:32 +0100 In-Reply-To: <91593e9c8a475a26a465369f6caff86ac5d662e3.camel@redhat.com> References: <20230107002937.899605-1-bobby.eshleman@bytedance.com> <91593e9c8a475a26a465369f6caff86ac5d662e3.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 On Tue, 2023-01-10 at 09:36 +0100, Paolo Abeni wrote: > On Sat, 2023-01-07 at 00:29 +0000, 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 > > Reviewed-by: Stefano Garzarella > > Acked-by: Paolo Abeni > > --- > > > > Tested using vsock_test g2h and h2g. I'm not sure if it is standard > > practice here to carry Acks and Reviews forward to future versions, but > > I'm doing that here to hopefully make life easier for maintainers. > > Please let me know if it is not standard practice. > > As Jakub noted, there is no clear rule for tag passing across different > patch revisions. > > Here, given the complexity of the patch and the not trivial list of > changes, I would have preferred you would have dropped my tag. > > > Changes in v9: > > - check length in rx header > > - guard alloactor from small requests > > - squashed fix for v8 bug reported by syzbot: > > syzbot+30b72abaa17c07fe39dd@syzkaller.appspotmail.com > > It's not clear to me what/where is the fix exactly, could you please > clarify? Reading the syzkaller report, it looks like iov_length() in vhost_vsock_alloc_pkt() can not be trusted to carry a reasonable value. As such, don't you additionally need to ensure/check that iov_length() is greater or equal to sizeof(virtio_vsock_hdr) ? Thanks. Paolo