Thread (26 messages) 26 messages, 3 authors, 28d ago

Re: [PATCH net-next v5 07/14] ip_gre: add drop reasons to the RX path

flat view

From: netdev-bot+sashiko@kernel.org
Date: 2026-10-04 21:00:49
Also in: lkml

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] Both concerns are resolved by the next patch in the series, so
  neither is a real problem.

--

ip_gre: add drop reasons to the RX path

This patch converts erspan_rcv(), __ipgre_rcv() and ipgre_rcv() in
net/ipv4/ip_gre.c so they return enum skb_drop_reason instead of the
PACKET_* codes. When no tunnel matches, the packet is now reported as
SKB_DROP_REASON_TUNNEL_NOT_FOUND, and the kernel-doc for that reason is
extended to cover GRE.
quoted hunk ↗ jump to hunk
diff --git a/include/net/dropreason-core.h b/include/net/dropreason-core.h
index 0d963f18a21e1..6f5273e16548a 100644
--- a/include/net/dropreason-core.h
+++ b/include/net/dropreason-core.h
@@ -550,7 +550,8 @@ enum skb_drop_reason {
 	SKB_DROP_REASON_TUNNEL_INVALID_HDR,
 	/**
 	 * @SKB_DROP_REASON_TUNNEL_NOT_FOUND: no tunnel device found for the
-	 * packet, e.g. no VXLAN device for its VNI
+	 * packet, e.g. no VXLAN device for its VNI or no GRE tunnel for its
+	 * endpoints and key
[Severity: Low]
At this revision, only the IPv4 GRE receive path reports this reason. Is
the new description a bit broader than what this patch covers?

In net/ipv6/ip6_gre.c, ip6gre_rcv() and ip6erspan_rcv() still return
PACKET_REJECT when the tunnel lookup fails:

net/ipv6/ip6_gre.c:ip6gre_rcv() {
    ...
	return PACKET_REJECT;
}

So gre_rcv() in ip6_gre still drops an IPv6 GRE or ERSPAN packet with no
matching tunnel as SKB_DROP_REASON_NOT_SPECIFIED. The same "no GRE tunnel"
event is therefore reported differently for IPv4 and IPv6 at this point.

The next patch in the series, "ip6_gre: add drop reasons to the RX path",
converts ip6gre_rcv() and ip6erspan_rcv() to return
SKB_DROP_REASON_TUNNEL_NOT_FOUND, so the mismatch only exists between
these two adjacent patches and is gone at the end of the series.

Would it make sense to move the kernel-doc update into the ip6_gre patch,
or to say in this commit message that IPv6 GRE is converted next?
 	 */
 	SKB_DROP_REASON_TUNNEL_NOT_FOUND,
 	/** @SKB_DROP_REASON_MAC_INVALID_SOURCE: source mac is invalid */
[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260930183910.3151873-1-littlesmilingcloud%40gmail.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help