Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp2127335pxx; Sat, 31 Oct 2020 08:58:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7xvDAUutpMoFflhafeVHWZk6JA3gFEcGuAzEaDeXGMr1egN9tigNhKIyqh7qJzeJOjmaK X-Received: by 2002:a05:6402:a51:: with SMTP id bt17mr6803008edb.328.1604159894234; Sat, 31 Oct 2020 08:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604159894; cv=none; d=google.com; s=arc-20160816; b=QyKbBZFNWgROjObfBRMHuKNlyoVrjpt6Q5yNV+0C/yNxJyzRR0SVrlwzJep5ZDpWdD DmAP1gojwSF5KKOU0HacXFfctKXrtu0bhIvASZFEAncGnH0nrM5fTCMN0fUPtWh2y4Ao OJbw9CGTgWtWXSWsk3CzU9YJ2+vDCUgjWMKdb+jykAyVJrqTEfpOo/OtMwPJyiwWjXa0 Kdl5XmZB5N9C4g4ZdyxWmRrN2sbS/4BsBBFdmXiXTGILbnmXspji/enoDCBgFl8rvY6s YLWTMvFNKxWE2Rw9P+doPDVL9OWq8LgG4GZY/uf5i3QdzYhRETD+Er4d2b0obwXBS/us tJPA== 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 :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=12fH+MeF0HceZLVXkgrERm9I6DnHG1NfwqXVEuScvwI=; b=iJ3SWGNhTqw/Xcj7DGuFhOoNqu6Udw7FhDpy0PLG3p73fU3yUJ8bLdp63z1ltHP7GQ PixuNWHRQIEps+eQ6oq26VpA01lsfZd5ddOkkpDdRwR2/RyTbEUWVcj6HxfOoj6ZPPwv ZUqBKI2xQoA3IjnXi0OalKnFwSNrR7GP+CtJFatGsIjTSOcLo4B0waGVtXFLVR0qLnSp nfIJEAi9CqLqKs5UcJROSZQr5mmGwbllNdGsrFUGWAD6Js44loMR5ibepDAUg9b/+87x CLh5u8nbkG/wp7VdBv+jOAajByRWU7sCaHSegFbv20ApS4NVAhCWKIdD9xYi/dNVr8CG D/Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=Hfw5o6yB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l63si8894175ede.607.2020.10.31.08.57.50; Sat, 31 Oct 2020 08:58:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=Hfw5o6yB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728073AbgJaPz5 (ORCPT + 99 others); Sat, 31 Oct 2020 11:55:57 -0400 Received: from mail2.protonmail.ch ([185.70.40.22]:38070 "EHLO mail2.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728018AbgJaPz5 (ORCPT ); Sat, 31 Oct 2020 11:55:57 -0400 X-Greylist: delayed 76961 seconds by postgrey-1.27 at vger.kernel.org; Sat, 31 Oct 2020 11:55:55 EDT Date: Sat, 31 Oct 2020 15:55:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1604159753; bh=12fH+MeF0HceZLVXkgrERm9I6DnHG1NfwqXVEuScvwI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=Hfw5o6yB6/1bQ2Riaccp1H094XbNfrucusEXD3rou1fevI/NR4yy9g6KxDY/Xk07k +BA6eQtaqMDEUgq6lPomJnhpxLNC24FbugFHCDcHw8NsCY9TB+hANtz0hsk/Pf9G2Q GOa07HhMYMXfBI9v6Ts3ZgiheLEBogtwuClcxetanMatvJERHXORWRbUyvNANb5VQV 9CT/7zPw5IXjmisX5MjgvrEMu43bXZ4KIk1B0jZrCTywpooDQ0qDQNYTTv7L2u4wfD 2paYZbTMMf/shTP4iNFRHYWykOL2CY0vEXhJC/fIRVxC+ZbaiV/+cqeEH/s6BMynGB faioLimbCOH/Q== To: Willem de Bruijn From: Alexander Lobakin Cc: Alexander Lobakin , "David S. Miller" , Jakub Kicinski , Steffen Klassert , Antoine Tenart , Mauro Carvalho Chehab , Miaohe Lin , Network Development , linux-kernel Reply-To: Alexander Lobakin Subject: Re: [PATCH net-next] net: avoid unneeded UDP L4 and fraglist GSO resegmentation Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Willem de Bruijn Date: Sat, 31 Oct 2020 11:26:24 -0400 >>>> I think it is fine to reenable this again, now that UDP sockets will >>>> segment unexpected UDP GSO packets that may have looped. We previously >>>> added general software support in commit 83aa025f535f ("udp: add gso >>>> support to virtual devices"). Then reduced its scope to egress only in >>>> 8eea1ca82be9 ("gso: limit udp gso to egress-only virtual devices") to >>>> handle that edge case. >> >> Regarding bonding and teaming: I think they should also use >> NETIF_F_GSO_SOFTWARE mask, not NETIF_F_ALL_TSO, as SCTP also has >> a software fallback. This way we could also remove a separate >> advertising of NETIF_F_GSO_UDP_L4, as it will be included in the first. >> >> So, if this one: >> 1. Add NETIF_F_GSO_UDP_L4 and NETIF_F_GSO_FRAGLIST to >> NETIF_F_GSO_SOFTWARE; >> 2. Change bonding and teaming features mask from NETIF_F_ALL_TSO | >> NETIF_F_GSO_UDP_L4 to NETIF_F_GSO_SOFTWARE; >> 3. Check that every virtual netdev has NETIF_F_GSO_SOFTWARE _or_ >> NETIF_F_GSO_MASK in its advertising. >> >> is fine for everyone, I'll publish more appropriate and polished v2 soon= . > > I think we can revert 8eea1ca82be9. Except for the part where it > defines the feature in NETIF_F_GSO_ENCAP_ALL instead of > NETIF_F_GSO_SOFTWARE. That appears to have been a peculiar choice. I > can't recall exactly why I chose that. Most likely because that was > (at the time) the only macro that covered all the devices I wanted to > capture. > > As for SCTP: that has the same concern that prompted that commit for > UDP: is it safe to forward those packets to the ingress path today? Oh well. I just looked up into net/sctp/offload.c and see no GRO receiving callbacks, only GSO ones. On the other hand, NETIF_F_GSO_SOFTWARE includes GSO_SCTP and is used in almost every virtual netdev driver, including macvlan and veth mentioned earlier, so that seems to be fine. > I had missed that there may be non-mainline drivers that do ;) > Great to see these features getting offload support. It will be mainlined sooner or later depending on my workload :) UDP fraglists *really* boosted the things up for me, so I don't quite understand why not a single mainline driver has a support for them. Al