Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1123099rwn; Thu, 8 Sep 2022 13:56:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ajy+gwbmmDvDirweXyggcGtxktx/EhfoVMZ/xK2VFer4cmYVBgXPrAAZnmmGjwJIgO4vY X-Received: by 2002:ac2:4d0b:0:b0:497:a7fb:229 with SMTP id r11-20020ac24d0b000000b00497a7fb0229mr2954583lfi.174.1662670566058; Thu, 08 Sep 2022 13:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662670566; cv=none; d=google.com; s=arc-20160816; b=nkOQHt/+7S5XZGBSe6RhuTh5+v3f87JkhFpeyw7d8GvRQbOHq5oplSU6VS4OWp8rKn 0shkW0OmC0864cbY/PRZqViYm/cBoCAQi94jeyDPVCBONJv6PSecjNooUQXLyhShQK6R xPmM4xVH32Gd0NeKDfhk8EUXKZZolcsHJox4P9LAt8+u0IbdLzekGvNPoBqIIFHNXIzz qqu4TBh4lIlDz1Xi/DGExmVShBbGhuKwNcHpvA64O2PZHv7AcSDyLOTb8t/HKWjP8UxU kFMpALP+Xr4Q/yJ3PRI7NksIGirTfkDyY5WlaCkbt3fOzlFFThN4v60z/j9jv/cboHfu sQww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RX8VIBrkIrN+uaJDyGYK1oayYALRo341SLY9FJGeLKg=; b=qI/nfTm4Vne/ayeNDGAS7X6kMPgoH2cAok10Tzyj9BkZlkRpFVDPbpLmdlX+4ouNli KbCAoVjkBDIUZvQ3NGAkcNArGG17YTPOawilwRhsZXlCFnJKqaSr5geINHkz0UbL/Y4C 71y5zzbJt8VLArmTki66yUYGpAMUrwWkHIh///npGG/DD0dRMeTnNJl1uQ6lnR5eONRs WItL1mFWhkIFpUTYWFAHOwD6FIv1jtIzOtiplsJMdSfCy+1Sl5Ute5ZSQvMXLZ77Jr0D 5rmrCRDqSUCmir5TDr7yTCkQaeiEkzoxQPxRb1ZDxMqANcBn+0DFIQrV/d/Iot9n00re LFqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@daynix-com.20210112.gappssmtp.com header.s=20210112 header.b=BOSQ+7TV; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v6-20020a2e7a06000000b0025fd7fc9313si8267605ljc.205.2022.09.08.13.55.35; Thu, 08 Sep 2022 13:56:06 -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=@daynix-com.20210112.gappssmtp.com header.s=20210112 header.b=BOSQ+7TV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbiIHUWs (ORCPT + 99 others); Thu, 8 Sep 2022 16:22:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbiIHUWo (ORCPT ); Thu, 8 Sep 2022 16:22:44 -0400 Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66B30109019 for ; Thu, 8 Sep 2022 13:22:43 -0700 (PDT) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-127dca21a7dso20178487fac.12 for ; Thu, 08 Sep 2022 13:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=RX8VIBrkIrN+uaJDyGYK1oayYALRo341SLY9FJGeLKg=; b=BOSQ+7TVFALXbxC/myMu5Chncu9V3l4sSSxY4m0Bx02D2bgLEFpAbb5BltskTSr+5F F70VCqtvBpr3Q4AFCBsDmpLukbkEYUhpmykaTpNj12w37og7JsupiMmJKnsVhnBNAbdJ hAhMAUzA1kQlQmqsKZ/GOKRml0/zJTsu2tPGYflD2YKqBQuBWqCz2Ipf8dbhnqCxz/Z3 rCsguQKWgB3xbFyTgY/FoqIJ69KBVkn0ktWbgK+gfzDaVhmOc84RzmawuiGIbSZPF06g /Qb0TXYcSI7c8gutf7cwJsaoPMP5cQ3oy2G3bklXfmkKos4jtJhiBNaRVkg+RACOz7Bz tM1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=RX8VIBrkIrN+uaJDyGYK1oayYALRo341SLY9FJGeLKg=; b=7+ej7SpIk41EWWPE9kr2fZ01rQJyXsRHCiOuM29oTkQGKqyYjujEJJVZw1b2uflLSc viE8bTWqhzIpUIfFT+IQlSbAYu5cn6pmBg1Ou/nETh8TvzfXyZ7HAabAF54lHBHAshLT De1ShRYIr4518h4950Ut4iMss/wVk8x7G9iVgkU+3Qzu9UA4B8mwf8Uxcf51XMyQWOF5 YEQ+lpLCHF794nll365EjpZdeX8qPVDyWBfp9uXf9fSn6kdYBXCemnTCelsmQxyMTQE2 cdDqRRVciWQiSWCATmY9bpZxy/oLu/6Nfk6RnKUxdmtX7KDqbryPVeSp+UTF4HI0hgtP Y44A== X-Gm-Message-State: ACgBeo1jHcSO4qHWqcrNQBwQnmZcx9ef3dQiF1QwsUyRWoC8TRCIcIs3 FGWylH4q1TCveO/BAVv+QjBvjXN9D1puZVmtDxu4Sg== X-Received: by 2002:a05:6808:2382:b0:344:90f9:b79 with SMTP id bp2-20020a056808238200b0034490f90b79mr2264444oib.137.1662668561813; Thu, 08 Sep 2022 13:22:41 -0700 (PDT) MIME-Version: 1.0 References: <20220907125048.396126-1-andrew@daynix.com> In-Reply-To: From: Andrew Melnichenko Date: Thu, 8 Sep 2022 23:09:24 +0300 Message-ID: Subject: Re: [PATCH v3 0/6] TUN/VirtioNet USO features support. To: David Ahern Cc: 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, yan@daynix.com, yuri.benditovich@daynix.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Hi all, On Thu, Sep 8, 2022 at 3:44 AM David Ahern wrote: > > 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. USO - UDP Segmentation Offload. Ability to split UDP packets into several segments. Allows sending/receiving big UDP packets. At some point, it looks like UFO(fragmentation), but each segment contains a UDP header. > > > > > 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? Well, this feature requires for Windows VM guest interaction. Windows may have a separate configuration for USO4/USO6. Currently, we support Windows guests with enabled USO4 and USO6 simultaneously. To implement this on Linux host, will require at least one additional netdev feature and changes in Linux network stack. Discussion about that will be in the future after some research. > > > 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(-) > > >