Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3373348pxx; Mon, 2 Nov 2020 07:16:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxyn5Dh7CxM1wRyoaqaPv5DGhTqY9NTGaDxgp1cmbQxz9obhCKsxJrDoCnr3Wlfj6jo+oHt X-Received: by 2002:a17:906:560f:: with SMTP id f15mr15289712ejq.553.1604330203000; Mon, 02 Nov 2020 07:16:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604330202; cv=none; d=google.com; s=arc-20160816; b=xKLeQytWCznBUp0eY1JpW+YiEfht7Yg1PPwW3ug6uMPAGpLhX0WHZZfWq555ztn4Fz 06NrOCCPJ+AAJtmdbXhOE0Db+pJq2TgJsw54Cq+FIHgXsdQi8Cln7cre8On/W8/8Wv3j oBGr5lfE1SLGkfjcL2UGFzdXGl2ZxiOHSo/i7mWyBfvsOTwegvtLRhBNsO/p4FEWEDG9 4+uk8hrHC7BsxvpyCxQ1tpsXt5qF4BqEWAA8IEYG47gSlZpy9X+uLZkuppnEG/amDtou fdGP6V7ljrV6ovECWMN0q8bYsHtIayM+kR9HWZdIkvWUAZGVeXzJY7X4IRTQAazEztbI LVXA== 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=LNQerxc/qedC0wC+tF3QpQvj0h2R4xLt0PpUVkepzP0=; b=gYN5Dnpio7Icj+LVN/jvmEQNpSeKgE4tzUwGtpznPVPIrkrnUuxs6m4/XuT7ag2QIH e81BANqJKx2TxjrUC9KhuhKUdd+Z6N95YwBBujpk3xwY1Xew2KCEdxraKXEBwA/tlk1f mZHkrGlRJxZkaKRO95WS5vf6gpsU963Adl+ZinH8JxjfCOvoHg43nC3YseOaZotDkvx6 MJPR3ttfR5WdvF9hFEZ7kFwfPWzdXQCYdTF8eBAx3tquWpE6g6SmW6wTCLQWQ5dOm3mE Opm1AgjLRWvcIVwnhQ28Ij2JLYbWPGEDAzDCXMfEbyDxq9d0LwxBRvHMRHDtPE6/9MeW IyXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hDytvYZ1; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si10994207edw.363.2020.11.02.07.16.19; Mon, 02 Nov 2020 07:16:42 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=hDytvYZ1; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726171AbgKBPOr (ORCPT + 99 others); Mon, 2 Nov 2020 10:14:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbgKBPOq (ORCPT ); Mon, 2 Nov 2020 10:14:46 -0500 Received: from mail-vs1-xe42.google.com (mail-vs1-xe42.google.com [IPv6:2607:f8b0:4864:20::e42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8196C0617A6 for ; Mon, 2 Nov 2020 07:14:46 -0800 (PST) Received: by mail-vs1-xe42.google.com with SMTP id f7so1855550vsh.10 for ; Mon, 02 Nov 2020 07:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LNQerxc/qedC0wC+tF3QpQvj0h2R4xLt0PpUVkepzP0=; b=hDytvYZ1jBaQm/8UzAKKD5kCuGe4Gq6Si8iXJ7s6JrfIz14Yz1odx4/5Wb6frOwLHr ruCvpXYEdm7XzZalJ6nfhmPPxetXBJsSGkv2Hl2FEaAcioU0wW+eJKb6GNfGFf/bU+nu 5Q8wiGVjj+1nafnithF5K9+NUzbptO7hXKr5Uj1u517J8RSU4spZZDpa8l+iwCkpEKll o/AYBiyHHzdRbVMgDkkSF1w8agpTP1lqNjlu2o4CkPoTdVbwIzSzedCF9FO7a/OHYFP3 pOaiPucWZE3PURQUM7TkUn+rCJLKNjuoptb3OQsKeT49/yli1OMcsxpk17KWpq2FWHwv Dm1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LNQerxc/qedC0wC+tF3QpQvj0h2R4xLt0PpUVkepzP0=; b=JfYqEAvzsPHTwv0bT8Dm8XVCvNDggva7jVibEEtsNCYhvSNp7+qW/Rv+4ATMhTc3It ATh182AbgeLcf5/737FmgjtBADSjyxx+m8jkHVYxwQEyZTemdSP0MYqWwwqInTwXfC2P uNItendN5lUrb3ro6WRVDx3HPecld9jQwfInCMATSBtO1l1/LczxKiblk3RYqvc7zFwu gHFTEXnKAeGJbbYUlJracXzvqFCkWIGf/4La6Tv/WzPMIxstzMsXoJm2TleZ9pPeNgNm hGIfr68f3jbBRvtAD/Q2mKwhPgg5qN5Bvads6TWl41hvEB39WRJyi30D9c/YUPyeiTb3 tPzQ== X-Gm-Message-State: AOAM532EO2zVsrc4v2nsDyAvY/RIvm4XpK0WdfnOnJZpk3fkVRrEc4sr ugrJ84demZlZlziY1Sz28sO9M/G3W2E= X-Received: by 2002:a67:2783:: with SMTP id n125mr15449067vsn.47.1604330085281; Mon, 02 Nov 2020 07:14:45 -0800 (PST) Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com. [209.85.222.51]) by smtp.gmail.com with ESMTPSA id u7sm1520254vsj.1.2020.11.02.07.14.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Nov 2020 07:14:41 -0800 (PST) Received: by mail-ua1-f51.google.com with SMTP id b34so4018811uab.8 for ; Mon, 02 Nov 2020 07:14:39 -0800 (PST) X-Received: by 2002:ab0:3721:: with SMTP id s1mr5923580uag.92.1604330078711; Mon, 02 Nov 2020 07:14:38 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Willem de Bruijn Date: Mon, 2 Nov 2020 10:14:02 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next] net: avoid unneeded UDP L4 and fraglist GSO resegmentation To: Alexander Lobakin Cc: "David S. Miller" , Jakub Kicinski , Steffen Klassert , Antoine Tenart , Mauro Carvalho Chehab , Miaohe Lin , Network Development , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 31, 2020 at 11:56 AM Alexander Lobakin wrote: > > 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. To follow up: SCTP sockets can handle such packets. So both local reception and forwarding are fine. This was expressly added to the second revision of the SCTP GSO commit.