Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3591378pxb; Mon, 9 Nov 2020 15:40:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVSWZD15XeDSZ4j3q4LTiTjDFsM9L+MWXCBeyFik1N878aaq0Lore35PLYcsASEbQjIISu X-Received: by 2002:aa7:c617:: with SMTP id h23mr17653144edq.154.1604965242371; Mon, 09 Nov 2020 15:40:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604965242; cv=none; d=google.com; s=arc-20160816; b=iOGyljASfDcT9GwlFEgUhV+FXZuiC6MVVL4pcGrKuv3/tjjr1qjPo6fLLlmH3PTq5G uoNHamzqJSjQAr09IvjtMkztJxElOlDkZpRZjRrd4whLaWd6l4qoeo7sTrcl7BKPgjaF f79OlNuHGEzBnkP5py5EYg9yMzZXrVWjKuAuR18aBx5VOA9L72oqCPPEgnalc7fOz98H zMsi0tTFytHSyCmESksD48TLpQ+ZdGJxwKFbXvUpPJ3lTpm0BNFVJAzFh1H1BUMocuSf zlMe+fHUQ8ww8Gv+hs9kXqf5vKGIpJGh7x6fdvy7Aj0QVAR/u1zgNSgnoziui15dPhdo pwCA== 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=0SNM8tghSknOpfRF/9rHNz25ic5+FUsysSSzdtpnF2c=; b=arHXZwRLJAETFYC3ZLdNPnHH23JcmeEtnOpzrF2A8hrnau7uVTXKcJLQblFPnOxrJH iGAUc3HW3feCpmjjS2xrG/iN3MvyBxFBoxwLdzE7oQa3RpGKApPsRvQD97xcJ6tSnEdU 84NWGo+PwZI/uj60PLiGTyy/7LUMZuzpQcK/IShEdThhrZPkA4dm5VtMlipOufmd61S9 BTmRSu4cI/p85K8bs8icq7mexZYv+LBPOiVsnduZBgm0UX0I59ZV67yDE6Lc6+s5XOhu dhOD8qZvKm7izZZPlfoIez5W2gbPU4qfuulCOx59jorDVeX+RRpUGmCsXZSS0PiAuDcW zDRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=QI6Fnwka; 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 op9si6869646ejb.447.2020.11.09.15.40.19; Mon, 09 Nov 2020 15:40: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=@pm.me header.s=protonmail header.b=QI6Fnwka; 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 S1730134AbgKIXim (ORCPT + 99 others); Mon, 9 Nov 2020 18:38:42 -0500 Received: from mail-40136.protonmail.ch ([185.70.40.136]:19491 "EHLO mail-40136.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729451AbgKIXim (ORCPT ); Mon, 9 Nov 2020 18:38:42 -0500 Date: Mon, 09 Nov 2020 23:38:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1604965119; bh=0SNM8tghSknOpfRF/9rHNz25ic5+FUsysSSzdtpnF2c=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=QI6Fnwka8dzq1s5nSorKgKDFymjras+RRdLc8DPF9wkeHJWRxYoRcrDVP4SIxgttZ KnUjCXnTS50tJv6l4dI+rwzi0vyKmS0uYnsnhG06MZwFSqkQR6NBoWVYcegC9wkWrX BqJQUxvx/ylZZlhWSplhJkq8Y/X3KDoVDqi9WuLKWqcki5zATOi9HrJbC+0wArA50Y v5NQV9jkfeYQf+wrbeNk07UgQ8m0KH2ZxsKf3SURWYvvvjn5NDMSxUZsWCj+xV1flM v+0rsbIJ5AOnObT++u24biSp3cP2AHXrsOjGbAVYH2KYhzoDsnIIluoq+gMVEMSi5O 8ABmtdSy+gT7A== To: Jakub Kicinski From: Alexander Lobakin Cc: Alexander Lobakin , "David S. Miller" , Eric Dumazet , Miaohe Lin , Martin Varghese , Pravin B Shelar , Willem de Bruijn , Guillaume Nault , Al Viro , Florian Westphal , Steffen Klassert , Paolo Abeni , Yadu Kishore , Vladimir Oltean , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: Re: [PATCH net-next] net: skb_vlan_untag(): don't reset transport offset if set by GRO layer Message-ID: In-Reply-To: <20201109152913.289c3cac@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> References: <20201109152913.289c3cac@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> 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: Jakub Kicinski Date: Mon, 9 Nov 2020 15:29:13 -0800 > On Thu, 05 Nov 2020 21:29:01 +0000 Alexander Lobakin wrote: >> Similar to commit fda55eca5a33f >> ("net: introduce skb_transport_header_was_set()"), avoid resetting >> transport offsets that were already set by GRO layer. This not only >> mirrors the behavior of __netif_receive_skb_core(), but also makes >> sense when it comes to UDP GSO fraglists forwarding: transport offset >> of such skbs is set only once by GRO receive callback and remains >> untouched and correct up to the xmitting driver in 1:1 case, but >> becomes junk after untagging in ingress VLAN case and breaks UDP >> GSO offload. This does not happen after this change, and all types >> of forwarding of UDP GSO fraglists work as expected. >> >> Signed-off-by: Alexander Lobakin >> --- >> net/core/skbuff.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/net/core/skbuff.c b/net/core/skbuff.c >> index c5e6c0b83a92..39c13b9cf79d 100644 >> --- a/net/core/skbuff.c >> +++ b/net/core/skbuff.c >> @@ -5441,9 +5441,11 @@ struct sk_buff *skb_vlan_untag(struct sk_buff *sk= b) >> =09=09goto err_free; >> >> =09skb_reset_network_header(skb); >> -=09skb_reset_transport_header(skb); >> =09skb_reset_mac_len(skb); >> >> +=09if (!skb_transport_header_was_set(skb)) >> +=09=09skb_reset_transport_header(skb); >> + > > Patch looks fine, thanks, but I don't understand why you decided to > move the reset? It's not like it's not in order of headers, either. > Let's keep the series of resets identical to __netif_receive_skb_core(), > shall we? Pure cosmetics, but yeah, let's keep. Will submit v2 in just a minute. >> =09return skb; >> >> err_free: Thanks, Al