Re: [PATCH net-next v2 2/8] ip6_tunnel: add drop reasons to the generic RX path

From: netdev-bot+sashiko

Date: Mon Sep 14 2026 - 00:38:19 EST


Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider:

Critical: 0 · High: 0 · Medium: 0 · Low: 1

- [Low] Commit message call-graph claim is inaccurate.

--

Verified. Report follows.

ip6_tunnel: add drop reasons to the generic RX path

This converts the five drop paths in __ip6_tnl_rcv() from a plain
kfree_skb() to kfree_skb_reason(), splitting the combined sequence number
check into two cases so the option mismatch and the old sequence number
failures can be distinguished, and propagating the reasons already returned
by pskb_may_pull_reason() and skb_vlan_inet_prepare().

The only comment below is about the changelog, so the diff hunks are not
quoted.

[Severity: Low]
Is this description of the call graph accurate?

> __ip6_tnl_rcv() is reached through ip6_tnl_rcv() from both ip6_tunnel
> (ip4ip6, ip6ip6) and ip6_gre (ip6gre, ip6gretap, erspan).

In net/ipv6/ip6_tunnel.c, the exported ip6_tnl_rcv() only has callers in
net/ipv6/ip6_gre.c (the ip6gre_rcv() and ip6erspan_rcv() paths). The
ip6_tunnel-native encapsulations do not go through it; they call
__ip6_tnl_rcv() directly from the static ipxip6_rcv():

net/ipv6/ip6_tunnel.c:ipxip6_rcv() {
...
ret = __ip6_tnl_rcv(t, skb, tpi, tun_dst, dscp_ecn_decapsulate,
log_ecn_error);
...
}

with ip4ip6_rcv()->ipxip6_rcv(), ip6ip6_rcv()->ipxip6_rcv() and
mplsip6_rcv()->ipxip6_rcv().

That also makes mplsip6 a third ip6_tunnel encapsulation that starts
reporting these reasons, which the changelog does not mention.

The conclusion drawn afterwards does still hold, since tpi_v4, tpi_v6 and
tpi_mpls are static descriptors with only .proto set:

net/ipv6/ip6_tunnel.c
static const struct tnl_ptk_info tpi_mpls = {
/* no tunnel info required for mplsip6. */
.proto = htons(ETH_P_MPLS_UC),
};

so no checksum or sequence bit is ever set on the ipxip6 path. Could the
entry point description be adjusted to name ipxip6_rcv() and include
mplsip6?

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260913034937.875068-1-littlesmilingcloud%40gmail.com