All of
 help / color / mirror / Atom feed
From: Alexander Lobakin <>
To: "David S. Miller" <>,
	Jakub Kicinski <>
Cc: 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 <>,
	Alexander Lobakin <>,,
Subject: [PATCH v2 net-next] net: skb_vlan_untag(): don't reset transport offset if set by GRO layer
Date: Mon, 09 Nov 2020 23:47:23 +0000	[thread overview]
Message-ID: <> (raw)

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.

Since v1 [1]:
 - keep the code 1:1 with __netif_receive_skb_core() (Jakub).


Signed-off-by: Alexander Lobakin <>
 net/core/skbuff.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 1ba8f0163744..aa3d2828b7a2 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -5430,7 +5430,8 @@ struct sk_buff *skb_vlan_untag(struct sk_buff *skb)
 		goto err_free;
-	skb_reset_transport_header(skb);
+	if (!skb_transport_header_was_set(skb))
+		skb_reset_transport_header(skb);
 	return skb;

             reply	other threads:[~2020-11-09 23:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 23:47 Alexander Lobakin [this message]
2020-11-10  4:05 ` Jakub Kicinski
2020-11-10  4:20 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v2 net-next] net: skb_vlan_untag(): don'\''t reset transport offset if set by GRO layer' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.