Re: [PATCH net-next v4 00/10] tunnels: add core and gre drop reasons
From: Anton Danilov
Date: Fri Sep 25 2026 - 19:13:25 EST
On Wed, Sep 23, 2026 at 05:19:23PM +0300, Ido Schimmel wrote:
> On Wed, Sep 23, 2026 at 01:14:57AM +0300, Anton Danilov wrote:
> > This series covers the generic paths shared by ipip, sit, gre and their
> > IPv6 counterparts, plus the GRE specific code, in both directions.
> > A later series will do the same for geneve, bareudp, fou and the
> > remaining IP in IP drivers.
>
> Please only annotate drivers that you are familiar with, using and can
> test. Otherwise it's a burden on the reviewer and potentially useless
> code churn that will make it harder to backport future fixes.
Understood. I will drop that sentence from the cover letter.
> GRE_CSUM looks fine as I'm not aware of other tunnels that have a
> dedicated checksum, but GRE_INVALID_HDR and GRE_TUNNEL_NOT_FOUND should
> be renamed to something more generic (e.g., TUNNEL_INVALID_HDR and
> TUNNEL_NOT_FOUND) so that they could be reused across drivers and
> replace the existing VXLAN ones. Note that you don't need the drop
> reason to encode the tunnel name in order to know which tunnel driver
> dropped the packet.
OK. In v5 a new patch will rename VXLAN_INVALID_HDR and
VXLAN_VNI_NOT_FOUND to TUNNEL_INVALID_HDR and TUNNEL_NOT_FOUND, the way
VXLAN_NO_REMOTE became NO_TX_TARGET, and the GRE patches will use the
new names. To keep the naming consistent, I will also rename the TNL_*
reasons this series adds to TUNNEL_*.
> > Patch 4 adds __iptunnel_pull_header_reason(), because
> > __iptunnel_pull_header() reports a packet too short to pull as -ENOMEM,
> > the same as an allocation failure, and ip6_gre calls it for every GRE
> > packet, before the tunnel lookup.
>
> The series is inconsistent about this and returns different reasons
> (HDR_TRUNC / PKT_TOO_SMALL) for the same condition. I suggest that you
> convert pskb_may_pull() to pskb_may_pull_reason() and return its reason
> instead of HDR_TRUNC.
Will do. The WCCP check in gre_parse_header() uses skb_header_pointer(),
which only fails on a short packet, so it will return PKT_TOO_SMALL.
Thanks for the review!