[PATCH net-next 0/4] vxlan: generalize and refine drop reasons
From: Anton Danilov
Date: Mon Oct 05 2026 - 16:14:41 EST
This series makes two vxlan drop reasons generic, so that other tunnels
can report the same conditions with them, and makes the reasons vxlan
reports for two other failures more precise.
Patch 1 renames VXLAN_INVALID_HDR and VXLAN_VNI_NOT_FOUND to
TUNNEL_INVALID_HDR and TUNNEL_NOT_FOUND. Their values stay the same;
the names vxlan drops are reported with change.
Patch 2 makes __iptunnel_pull_header() and iptunnel_pull_header() return
a drop reason. Until now they returned -ENOMEM for any failure, so a
packet too short to pull looked like an allocation failure. The three
callers in ip_gre and ip6_gre that tested the result with "< 0" test for
a non-zero value instead. Patch 3 has vxlan report the reason these
functions now return: PKT_TOO_SMALL instead of NOMEM for an inner frame
shorter than an Ethernet header.
Patch 4 has vxlan report a route that goes out of the vxlan device
itself as RECURSION_LIMIT instead of IP_OUTNOROUTES, and adds this case
to the description of RECURSION_LIMIT.
These were patches 1-3 and 14 of v5 of "tunnels: add core and gre drop
reasons", split out as Ido suggested. The conversion of ip_tunnel,
ip6_tunnel and GRE, the rest of that series, will follow once these
are in.
Changes since v5 of "tunnels: add core and gre drop reasons":
- split out of that series (Ido)
- the messages of patches 1, 2 and 4 no longer refer to the rest of it
- the message of patch 2 says that vxlan keeps reporting NOMEM until
patch 3
- patch 4 adds the tunnel case to the description of RECURSION_LIMIT,
which v5 did in its patch 9
- v5: https://lore.kernel.org/netdev/20260930183910.3151873-1-littlesmilingcloud@xxxxxxxxx/
Anton Danilov (4):
vxlan: rename the drop reasons for use by other tunnels
ip_tunnel: make __iptunnel_pull_header() return a drop reason
vxlan: report the drop reason of __iptunnel_pull_header()
vxlan: report a circular route as SKB_DROP_REASON_RECURSION_LIMIT
drivers/net/vxlan/vxlan_core.c | 26 ++++++++++++++++----------
include/net/dropreason-core.h | 25 ++++++++++++++++---------
include/net/ip_tunnels.h | 10 ++++++----
net/ipv4/ip_gre.c | 4 ++--
net/ipv4/ip_tunnel_core.c | 22 +++++++++++++++-------
net/ipv6/ip6_gre.c | 2 +-
6 files changed, 56 insertions(+), 33 deletions(-)
--
2.47.3