Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3470830iob; Tue, 17 May 2022 00:11:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTvYgOgwHzuDBcaZ2DuEfbnEoGHgHqEbRjSbI4y5jmtH73/rRvGSu3BOKDaQpG+q1P1Ee3 X-Received: by 2002:a05:6402:b8f:b0:42a:be5d:7a94 with SMTP id cf15-20020a0564020b8f00b0042abe5d7a94mr5332192edb.150.1652771477062; Tue, 17 May 2022 00:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652771477; cv=none; d=google.com; s=arc-20160816; b=aBN9ZsgclPnn7BYTX7m/POJ2hP3bojy6KFlSMlCjebi/E2wJIfg0TpxNerPUfiVJ4L jg8HQibIKPw4TOQo14c4U+vIniA4RWxWCKnzwLZ0PftoqMlKFk9n9vM3shgof6wlsrQF H+VMWekkTh5vth68nIa4Eoskl3Uu8JYFR20I+uXQzDZtdpVZX4QamgM3oTRfPVeTEDt0 rpua8yz8fOvg+7oxVV8PzjE7RcpcVlpFT3a/u29wpkFbid7ZUItub7334V/OmihdnmxF T6O3F291DDQJb/xghYyUZJRunuHyF7l4NClbhk8efZESVsFHFt2wfKgv8gDgpAnkduEY ZKjQ== 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=tyrw7Fs5af1WocF+1NFu5sorailBB9qMhsdDA/eQUgs=; b=v1uG67ottpu2cSEEhV06fADJliSEuot44zczdv5O4ls3CuV1cRb50VUbicYNv4Xy67 NOS9WBLjrJ2K1Ie0dgcFm7/xQIbAilQZ9BYCRZj/589YgfXni0y0/vIWjnFpm0gCMUou CZrNrM8rIhuQzegBvmEvCN8CRHUH3rQyZDkxO8q7EU787I9tYGS3O4jnpY22a4MuIHlT khvzJBgYtLs+0e47wNYAGbFiCu+Ej67XxcjKOpiby1CBWqq4jpDKCK93s2A8PT1W4nW5 ldeKUzFhudttvQ4i3UUtLhhjClRHwHA/okHPHVyfY9onA72fGljX0I+0/bAbMQ1qwumj MlWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YUYNagvk; 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 n4-20020a5099c4000000b00425f09fdda3si12452602edb.357.2022.05.17.00.10.51; Tue, 17 May 2022 00:11:17 -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=@redhat.com header.s=mimecast20190719 header.b=YUYNagvk; 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 S239915AbiEQGcS (ORCPT + 99 others); Tue, 17 May 2022 02:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229976AbiEQGcQ (ORCPT ); Tue, 17 May 2022 02:32:16 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4FE01CEE for ; Mon, 16 May 2022 23:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652769134; 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: in-reply-to:in-reply-to:references:references; bh=tyrw7Fs5af1WocF+1NFu5sorailBB9qMhsdDA/eQUgs=; b=YUYNagvkuYIXft2zKJ5teBun/WeHFyeZn959jLqOiNgho0o7QZx4cFIFLCqvQlK+nh0McO ZfD6Xsb5snIn+u9eVXOb9upXUK9rU2AQFZGuPRuk+C4mTjADlpUrdlHPEbZoyMeBC29AMD f1MeFLbIJ+qyCdwk2dTs6EaalmahOZA= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-413-f91azWUHNFyctSTJ_kEDmQ-1; Tue, 17 May 2022 02:32:13 -0400 X-MC-Unique: f91azWUHNFyctSTJ_kEDmQ-1 Received: by mail-lj1-f199.google.com with SMTP id l26-20020a2e99da000000b0024f02d881cdso4056782ljj.6 for ; Mon, 16 May 2022 23:32:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tyrw7Fs5af1WocF+1NFu5sorailBB9qMhsdDA/eQUgs=; b=OnT1lv3K6bDGucENcP2Ye/82o8PgyepZMieZCdPlmqjMzNSc+mpUanIBBMHYtwNS+h SezufakPKuOda9+TX+rh795eXIWr/e3gZ4r51DjDG/H4jLAr742bhCGyjDZWXGZQ6VwY /YFDh/tECDHYEzXeUa1p+0fdtbp8vcxGAwIAuVtpRi2ZiQmZxLjOfJMj6cy74ezebmho omRip6UgzO5yQINejffCCgnMussHo5Kq8qsyXFldN17Wm112mXYI0L8SKim4PyosO4o5 03UFj2ASC3rBzLzx3hgEpU6CRFeaa+1jB+lz0Duy/e21A7m4Hq1/o8alTrdv8T0pIacM Z6fQ== X-Gm-Message-State: AOAM5338coj3BOsZlH5s0jqAHVATxyrMG3SRCy6JZN+PWT3s+qUQJkv0 vjhGOjBLfdjw13uydE8UxcUCNfnnByojhZhb7UyDdy/dcGE7zzraXvz5fxKq2GBCIVahs4knOQZ l+h+aFkCUCuSNwU8Vy9rruV/ZhIkV9pHrbyuw94z7 X-Received: by 2002:a05:6512:33d0:b0:473:a25e:f9fb with SMTP id d16-20020a05651233d000b00473a25ef9fbmr15703955lfg.98.1652769131562; Mon, 16 May 2022 23:32:11 -0700 (PDT) X-Received: by 2002:a05:6512:33d0:b0:473:a25e:f9fb with SMTP id d16-20020a05651233d000b00473a25ef9fbmr15703935lfg.98.1652769131310; Mon, 16 May 2022 23:32:11 -0700 (PDT) MIME-Version: 1.0 References: <20220512112347.18717-1-andrew@daynix.com> In-Reply-To: <20220512112347.18717-1-andrew@daynix.com> From: Jason Wang Date: Tue, 17 May 2022 14:32:00 +0800 Message-ID: Subject: Re: [RFC PATCH v2 0/5] TUN/VirtioNet USO features support. To: Andrew Melnychenko Cc: davem , Eric Dumazet , Jakub Kicinski , Paolo Abeni , mst , netdev , linux-kernel , virtualization , Yan Vugenfirer , Yuri Benditovich Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,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 Thu, May 12, 2022 at 7:33 PM 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 to transmission of large UDP packets. > > 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. > 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. > > Test it WIP Qemu https://github.com/daynix/qemu/tree/Dev_USOv2 > > New types for VirtioNet already on mailing: > https://lists.oasis-open.org/archives/virtio-comment/202110/msg00010.html > > Also, there is a known issue with transmitting packages between two guests. Could you explain this more? It looks like a bug. (Or any pointer to the discussion) Thanks > Without hacks with skb's GSO - packages are still segmented on the host's postrouting. > > 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. > > 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 | 4 ++++ > 6 files changed, 45 insertions(+), 7 deletions(-) > > -- > 2.35.1 >