Re: [PATCH net-next v4 1/2] net: keep the TCP fixed-ID flags on the header they describe
From: Julius Bairaktaris
Date: Fri Dec 04 2026 - 17:46:20 EST
Willem de Bruijn wrote:
> When !encap and a stale skb->inner_protocol remains from an earlier tunnel
> decapsulation, does skipping xfrm_output_gso() without clearing
> skb->inner_protocol cause xfrm4_tunnel_encap_add() and
> xfrm6_tunnel_encap_add() to skip saving the inner header offsets?
Yes. A tunnel that decapsulates clears skb->encapsulation but leaves
inner_protocol set, and the xfrm tunnel and transport mode outputs take
a set inner_protocol to mean that the inner headers are recorded.
[...]
> qdisc_pkt_len_segs_init() then sees a negative or invalid
> skb_inner_transport_offset(skb) on the offloaded SKB_GSO_ESP packet and
> drops it with SKB_DROP_REASON_SKB_BAD_GSO.
It does: after fraglist GRO inner_transport_header was never set. v5
clears inner_protocol in the crypto offload path of xfrm_output() when
the packet was not encapsulated on entry, so both modes record the
packet's own offsets. The selftest now forwards a decapsulated VXLAN
stream with rx-gro-list on into offloaded tunnel and transport mode
SAs; both cases lose every segment on v4, transport mode also on
net-next, and pass on v5:
https://lore.kernel.org/netdev/cover.1796423662.git.julius@xxxxxxxxxxxxxx/
Julius