Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3586614pxb; Mon, 9 Nov 2020 15:31:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBEOnoP9BY6b4Jgu4PGlCiDWs2tM0rc3wPsAyhuAqX4QWNDu36McQUYD/pHtRvQHDvuy8p X-Received: by 2002:aa7:de01:: with SMTP id h1mr17915155edv.269.1604964683011; Mon, 09 Nov 2020 15:31:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604964683; cv=none; d=google.com; s=arc-20160816; b=cAHUYXwVOjZJnvoAQY5iwoIpHogTwAo93/6JHC3rWeXGbeuLTesdIe8FzJ880LeRvF yg+bCghbvVcq7VPdBC/CMJ536WFiO2xSzv/yNkyXnmGM7PvhFgPPvHV8YQVQ6wY44p/7 N8ej/kdjcn4KqApwAleJB/KKKcUsAjdYu9PQlEq/BCFITf95VvXOFKkRP7p9JCWV49Tz qNxgeqDNuDbM0HDRQnQR77XMf1w/FGI2GrIiCbkrVowl8IXL8r3QFxoMnbiSTr0CqU+K 4y3ZtltfhSuIJ3FUZdoaZjPAd4F3XI2zA5c2ZKTvvHXov3Ev45XwsShMa1Kc2MQPR7nA Xj2Q== 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:cc:to:from:date :dkim-signature; bh=PTib9ET1J9p5KSpvVk/YK8Y5MXDNLDSChV+ereEWAyo=; b=PmOWfWOz6Z08zoZDIcUpRqjvuJ+h/3AABq3RxZn1PJn7W/Q5qW6X9uy+Rb3ei8duxD tt1bGwxMYSqi56UYPz51drrKt8qHWAVMyFh9tWbbSEQhuoP+viXtIdB01+SOykdoIvZW 99whR20ko6X4CxwJK0TFlV/gYecq+y/R2nh9Uz9o1X7hfKGFsL/Bbw28rc6NIC9S5QGT +c9+Rr++LSdAaAXMDu2oieSTm6q075XhvBcF50roVrrkjBHg1r6SXMN7ny+zKGtteU5D EWrrFI6xp3oEeS7xY2cJ4Z0SMF6kKtKVpO32Ubvl24w94WlTAKDIqcT83VMHLWKnHfXg E2cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CDYdm9dE; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si8095611edi.348.2020.11.09.15.31.00; Mon, 09 Nov 2020 15:31:22 -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=@kernel.org header.s=default header.b=CDYdm9dE; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730450AbgKIX3Q (ORCPT + 99 others); Mon, 9 Nov 2020 18:29:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:40748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729243AbgKIX3Q (ORCPT ); Mon, 9 Nov 2020 18:29:16 -0500 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 67801206B2; Mon, 9 Nov 2020 23:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604964555; bh=QLmsZu4I3VD2I6lWY3q3EZ+YXZZd264CGkdr7Y6bsvU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CDYdm9dEcW3pFo+imXDGh8eHy1+F0F5Cyw+IysJ9ZVkT4Me3cLfHTNwr3WfcS1sZq gafwWkNTc9GjKnJJc9M5vxT3babe81/ZKlDAjAmSCadQuaIh+t51hYVpsMPZbPn6SX KW/febL5oU1u66ENzi5M7SLIdBneg+TGmrwN8si8= Date: Mon, 9 Nov 2020 15:29:13 -0800 From: Jakub Kicinski To: Alexander Lobakin Cc: "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 Subject: Re: [PATCH net-next] net: skb_vlan_untag(): don't reset transport offset if set by GRO layer Message-ID: <20201109152913.289c3cac@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 *skb) > goto err_free; > > skb_reset_network_header(skb); > - skb_reset_transport_header(skb); > skb_reset_mac_len(skb); > > + if (!skb_transport_header_was_set(skb)) > + skb_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? > return skb; > > err_free: