Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp17028rwn; Wed, 7 Sep 2022 19:00:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR5M+lMNqnwZLk23tAUXU9EHRv0f6fV2AEn1C/r5FcqZOXNtkKCnoneBLF/pdYndKwZI1OD3 X-Received: by 2002:a63:3509:0:b0:42b:15a6:8267 with SMTP id c9-20020a633509000000b0042b15a68267mr5860093pga.570.1662602444313; Wed, 07 Sep 2022 19:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662602444; cv=none; d=google.com; s=arc-20160816; b=dP9FLtUFy5hPlmz+laQAm9u7EsjMyEkwW+QU1kQLav63pJ/Z8l2d2DORBHbFuq+UBS l5A1AHGGSFpIVTJen5abCKz0aAsgpM8RQov6zOrXHxsAbz7BTi6ERtOyF9ppnGW3fH6v OAhygjJ2XtFJ8HAKRYs4LBTuJ+VUI50CJX+lkfmOf4SbftcK5kbSvOiuN4OJLVUpxHHN ABIULaX2M+QpWGebvFaAnQAN2E5jsHvTAg/rmEm2S34/DsCgG9YWgo+1UhIWjJCAvtJ3 e/M1nw1Nw8WKtXkba+sBQoWRtTR7rI4VdtqY/+qfxFMV7ThALVBacJ0c26jaZyTWmgav ljbw== 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=xXXZ/KKiQGEAAr6xpMtzcwsdpQl8Tzr0zwjmgH4+sqA=; b=SQqen9SthnS37nZONd8pG3FZ6q2gHjZZ5tem3YWW7II77MClDWgn76RM9qqU2SPrMt tMoQmaOUuRDIHrFDHrORX9mcdBHlPBR8dh8J8TGAh5NDLOKvd4AJLb6teLUV1he9zXTO ezLVN077w9wvPbO1jhavWn+WaSc1jinrc9zfIsm4FbsUnewFlqLkK/FSX+YcObVc01oB yzJJxPpc/zRomwwJszWbAK4iTg/6M9XZLaMVqhnW8wN5N3AGoJpIAmwupeOlC5Vq0I0l 458fSCruRV10IKZDU+4pj3qI8yCdbQ4JtyuemXpRSdinkpwj/2kh0grvZqipYGOWO11O Ls9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S5OUTbCw; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s20-20020a17090ae69400b00200b224d11bsi859950pjy.82.2022.09.07.19.00.32; Wed, 07 Sep 2022 19:00:44 -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=@kernel.org header.s=k20201202 header.b=S5OUTbCw; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229924AbiIHAoV (ORCPT + 99 others); Wed, 7 Sep 2022 20:44:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbiIHAoT (ORCPT ); Wed, 7 Sep 2022 20:44:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE77CBFC57; Wed, 7 Sep 2022 17:44:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 48D7261B18; Thu, 8 Sep 2022 00:44:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D131C433D6; Thu, 8 Sep 2022 00:44:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662597857; bh=g5nR0cX0QPYzLJn1sJLMWOJPxVQFmzSG3JCsEpMQcqA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=S5OUTbCwVAhMJxMa7IGDJMDUmzz8roBfoBf3nVOAiw210yURvlh3PIKH6NhXlRpo4 7xhR1uY9gn8axS/y26G9VJKiaRaHhmNvkZF4jm/vTkxSvu8gqXH/n+Yy8lOvXjGpPQ 60c6Svd0wV9asXyFsVrQnkkUTS7fsvxvyXIR6NeUmcmVif0KXfQNYxsKGzpqKUaTor Zmpiy2Z6lD/S6DtExbJrBj8Zgl6nyQWY9LwLOIVRvbHDeKKKcXCnimMWtWHCZ4LZbj HT5lEWVtdVf82PWm5gGg/ReODFsX3x2SAfFK2cHxBAkvSF3OfghCMVZKdX/b2J/Gaz QyZnOz599W87A== Message-ID: Date: Wed, 7 Sep 2022 18:44:16 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v3 0/6] TUN/VirtioNet USO features support. Content-Language: en-US To: Andrew Melnychenko , edumazet@google.com, netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, jasowang@redhat.com, mst@redhat.com, pabeni@redhat.com, yoshfuji@linux-ipv6.org Cc: yan@daynix.com, yuri.benditovich@daynix.com References: <20220907125048.396126-1-andrew@daynix.com> From: David Ahern In-Reply-To: <20220907125048.396126-1-andrew@daynix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 9/7/22 6:50 AM, Andrew Melnychenko wrote: > Added new offloads for TUN devices TUN_F_USO4 and TUN_F_USO6. > Technically they enable NETIF_F_GSO_UDP_L4 > (and only if USO4 & USO6 are set simultaneously). > It allows the transmission of large UDP packets. Please spell out USO at least once in the cover letter to make sure the acronym is clear. > > Different features USO4 and USO6 are required for qemu where Windows guests can > enable disable USO receives for IPv4 and IPv6 separately. > On the other side, Linux can't really differentiate USO4 and USO6, for now. Why is that and what is needed for Linux to differentiate between the 2 protocols? > For now, to enable USO for TUN it requires enabling USO4 and USO6 together. > In the future, there would be a mechanism to control UDP_L4 GSO separately. > > New types for virtio-net already in virtio-net specification: > https://github.com/oasis-tcs/virtio-spec/issues/120 > > Test it WIP Qemu https://github.com/daynix/qemu/tree/USOv3 > > Andrew (5): > uapi/linux/if_tun.h: Added new offload types for USO4/6. > driver/net/tun: Added features for USO. > uapi/linux/virtio_net.h: Added USO types. > linux/virtio_net.h: Support USO offload in vnet header. > drivers/net/virtio_net.c: Added USO support. > > Andrew Melnychenko (1): > udp: allow header check for dodgy GSO_UDP_L4 packets. > > drivers/net/tap.c | 10 ++++++++-- > drivers/net/tun.c | 8 +++++++- > drivers/net/virtio_net.c | 19 +++++++++++++++---- > include/linux/virtio_net.h | 9 +++++++++ > include/uapi/linux/if_tun.h | 2 ++ > include/uapi/linux/virtio_net.h | 5 +++++ > net/ipv4/udp_offload.c | 2 +- > 7 files changed, 47 insertions(+), 8 deletions(-) >