Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp785992ioo; Thu, 26 May 2022 15:04:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv0B4KRP/hY/FIbBDNcQDmzvGWPTabhYHCUoR6qKEm5bjPJREj6LYl8ELx3wSiE/ghjTqy X-Received: by 2002:a17:90b:388c:b0:1df:cb4b:3e72 with SMTP id mu12-20020a17090b388c00b001dfcb4b3e72mr4919459pjb.130.1653602640618; Thu, 26 May 2022 15:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653602640; cv=none; d=google.com; s=arc-20160816; b=i2luSfNfCW6mm/iz0/pyioWIEKiYbR9RiN4pGOQRrdrQoY1GQPTBWwX7ddgoz93gq5 77VxN4UHi4iY+qHlETv1/3D7/mStG/EWkzmvjXTI087i0AZwqr5wyYgPw20YMUq9C9k9 kqM1L9mXr1jYXj3wDg94UbEDe6lzvFkogygUavXIfiKKU3wRpndXMegNosxQnXsO33WB iJPpSWAR8Iy7ODF+0X2RgcgTHH+vZGqIALMsI7K3YgPA1zhqbPJ9EB4sxmC+6nUnlkiU chZQD3G+QvvSm/KwrzI9RZqrqpTthp6JfaSgznKjxSEVyys1/haaCiSMseFF3UMruE6Q dxPA== 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=CLSM/8kDcZbA7YFN+80uNCo9mIc7oVDwUzACPp0MJzI=; b=wXCExTRjqrCQ5yx1AdC/RAZ1L6AMECF7ldUb8mXNcbbvm6UWhXSZs9bHitsXXR1GP2 zz45nV1yXF3cPvuxuYEo7p4pUzdkQhoeNk2kSD2TT734KPxwBV+0YDMp0Yi0bhbkO8J1 +o85OEPs3AUHmXU3AHlkhMEp7/DvOCf6aMKZ2zm03ZYnBrmr9PE6hRBmI9uuh5SmtAaR I11Our500NmYbx711PUqZJGOeiA5Pz7tp7ZRw+V4AmfvzbprjKmmXwcC8nUhoRDk+dnZ nseAvYDJmsDo651A9J2ykRK2/ZrxohUPq7iIP7l9Vb4deUn2aD416DF4cxuTJr5Ps3aw L0cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@daynix-com.20210112.gappssmtp.com header.s=20210112 header.b="Jba9/oQ7"; 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 k10-20020a65434a000000b003faf1d213dcsi3873654pgq.687.2022.05.26.15.03.47; Thu, 26 May 2022 15:04:00 -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="Jba9/oQ7"; 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 S1347176AbiEZMTD (ORCPT + 99 others); Thu, 26 May 2022 08:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232884AbiEZMS6 (ORCPT ); Thu, 26 May 2022 08:18:58 -0400 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5971D6801 for ; Thu, 26 May 2022 05:18:57 -0700 (PDT) Received: by mail-oi1-x22d.google.com with SMTP id s188so1905225oie.4 for ; Thu, 26 May 2022 05:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CLSM/8kDcZbA7YFN+80uNCo9mIc7oVDwUzACPp0MJzI=; b=Jba9/oQ7EhCHTPj4e0T8+acAsjK8wPnCpG4E6PD7PWPG2bxQif45eY0QFnYuUayP+S U/h1UhF6NgQOcPS1uxcFKj1iZuY3VGP3NI+VS/ev6tYJn4rhbkbTw/IN8JLZnsymcx1Q uf6gVIJirlDFBCaW2j/E0dbSlEVG6lpzYvSQrJvLPW0YAUV8tUUD4o88ILfCK7Awa3Jb nOULVPFGhjNVsVGhEKhEqXmXcFj4J7zhTsgJAWRuPEwv1Y96HYDu7XH/lA/piToAGQ+T XT7NYVwZB5+e82qAevvHL78OCwHp7JbysHEF/UdHldojNWVjw0zzUbsGTXNhhPCQgVyh /SAg== 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=CLSM/8kDcZbA7YFN+80uNCo9mIc7oVDwUzACPp0MJzI=; b=oHwEtR+O/j5KxtzyTxrBps3/UeQqoFnKOrPgq06WTNoAcppiyRZt0YekeQDRU2rqOV Jei/urWOwOuvmkQ+k5HWupxCTXlEOXICvc26xYoJEF3wJNOX/KrKjT5rvW5U+NzcjIRn dWq03Ng/1r+3Ldouu7x//of1UCXOmzd9hoB/ZnUHfUdNt5jdXA9muYCjS2V7ot5rLOu8 8XK9N8q5xdtygr94h2bq/sfjF1Vs9+fsa89b88HU4dvFzPosnMbQtVdmlHYezAAjbuXA v8YfLHdjjOU7VrQNqbV9TbFWyhBWgdfoYrJRofXWUQOzjlg9Iaf4s2TiprojMQ6SB4KB 53Zw== X-Gm-Message-State: AOAM530i0d9p3gzofk2j331aJ4jMsOjtNEe8eHtWa82vOiesq+3dVyZ5 Z56UZT50b0mPf50GhcH5n+6n2Y98BYIGoxHbs23n6+80Udc= X-Received: by 2002:aca:c182:0:b0:2ef:8fd4:7523 with SMTP id r124-20020acac182000000b002ef8fd47523mr987974oif.148.1653567537021; Thu, 26 May 2022 05:18:57 -0700 (PDT) MIME-Version: 1.0 References: <20220512112347.18717-1-andrew@daynix.com> In-Reply-To: From: Andrew Melnichenko Date: Thu, 26 May 2022 15:18:46 +0300 Message-ID: Subject: Re: [RFC PATCH v2 0/5] TUN/VirtioNet USO features support. To: Jason Wang 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=-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=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 I'll check it, thank you! On Thu, May 26, 2022 at 9:56 AM Jason Wang wrote: > > On Tue, May 24, 2022 at 7:07 PM Andrew Melnichenko wrote: > > > > Hi all, > > > > The issue is that host segments packets between guests on the same host. > > Tests show that it happens because SKB_GSO_DODGY skb offload in > > virtio_net_hdr_from_skb(). > > To do segmentation you need to remove SKB_GSO_DODGY or add SKB_GSO_PARTIAL > > The solution with DODGY/PARTIAL offload looks like a dirty hack, so > > for now, I've lived it as it is for further investigation. > > Ok, I managed to find the previous discussion. It looks to me the > reason is that __udp_gso_segment will segment dodgy packets > unconditionally. > > I wonder if the attached patch works? (compile test only). > > Thanks > > > > > > > On Tue, May 17, 2022 at 9:32 AM Jason Wang wrote: > > > > > > 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 > > > > > > > > >