From: Ido Schimmel <idosch@nvidia.com>
To: Anton Danilov <littlesmilingcloud@gmail.com>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, David Ahern <dsahern@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v5 09/14] ip_tunnel: add drop reasons to the transmit path
Date: Sun, 4 Oct 2026 19:15:46 +0300 [thread overview]
Message-ID: <20261004161546.GA346537@shredder> (raw)
In-Reply-To: <20261004160820.GB334650@shredder>
On Sun, Oct 04, 2026 at 07:08:20PM +0300, Ido Schimmel wrote:
> On Wed, Sep 30, 2026 at 09:39:05PM +0300, Anton Danilov wrote:
> > @@ -636,6 +641,12 @@ enum skb_drop_reason {
> > SKB_DROP_REASON_TUNNEL_OLD_SEQ,
> > /** @SKB_DROP_REASON_GRE_CSUM: GRE checksum error */
> > SKB_DROP_REASON_GRE_CSUM,
> > + /**
> > + * @SKB_DROP_REASON_TUNNEL_ENCAP: failed to build the encapsulation
> > + * header of a tunnel, e.g. an unknown or unregistered encapsulation
> > + * type.
> > + */
> > + SKB_DROP_REASON_TUNNEL_ENCAP,
> > /**
> > * @SKB_DROP_REASON_MAX: the maximum of core drop reasons, which
> > * shouldn't be used as a real 'reason' - only for tracing code gen
>
> [...]
>
> > @@ -620,8 +623,10 @@ void ip_md_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
> > if (!tunnel_hlen)
> > tunnel_hlen = ip_encap_hlen(&tun_info->encap);
> >
> > - if (ip_tunnel_encap(skb, &tun_info->encap, &proto, &fl4) < 0)
> > + if (ip_tunnel_encap(skb, &tun_info->encap, &proto, &fl4) < 0) {
> > + reason = SKB_DROP_REASON_TUNNEL_ENCAP;
>
> This will also cover the -ENOMEM from the callbacks, where
> SKB_DROP_REASON_NOMEM is more appropriate. Better to change
> ip_tunnel_encap() to return the appropriate drop reason like you did
> with gre_parse_header().
And change ip6_tnl_encap() in a similar fashion.
>
> > goto tx_error;
> > + }
> >
> > use_cache = ip_tunnel_dst_cache_usable(skb, tun_info);
> > if (use_cache)
next prev parent reply other threads:[~2026-10-04 16:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 18:38 [PATCH net-next v5 00/14] tunnels: add core and gre drop reasons Anton Danilov
2026-09-30 18:38 ` [PATCH net-next v5 01/14] vxlan: rename the drop reasons for use by other tunnels Anton Danilov
2026-09-30 18:38 ` [PATCH net-next v5 02/14] ip_tunnel: make __iptunnel_pull_header() return a drop reason Anton Danilov
2026-10-04 21:00 ` netdev-bot+sashiko
2026-09-30 18:38 ` [PATCH net-next v5 03/14] vxlan: report the drop reason of __iptunnel_pull_header() Anton Danilov
2026-09-30 18:39 ` [PATCH net-next v5 04/14] ip_tunnel: add drop reasons to the generic RX path Anton Danilov
2026-10-04 16:06 ` Ido Schimmel
2026-09-30 18:39 ` [PATCH net-next v5 05/14] ip6_tunnel: add drop reasons to the receive path Anton Danilov
2026-10-04 16:47 ` Ido Schimmel
2026-10-04 21:00 ` netdev-bot+sashiko
2026-09-30 18:39 ` [PATCH net-next v5 06/14] gre: make gre_parse_header() report a drop reason Anton Danilov
2026-09-30 18:39 ` [PATCH net-next v5 07/14] ip_gre: add drop reasons to the RX path Anton Danilov
2026-10-04 21:00 ` netdev-bot+sashiko
2026-09-30 18:39 ` [PATCH net-next v5 08/14] ip6_gre: " Anton Danilov
2026-09-30 18:39 ` [PATCH net-next v5 09/14] ip_tunnel: add drop reasons to the transmit path Anton Danilov
2026-10-04 16:08 ` Ido Schimmel
2026-10-04 16:15 ` Ido Schimmel [this message]
2026-09-30 18:39 ` [PATCH net-next v5 10/14] ip_gre: " Anton Danilov
2026-09-30 18:39 ` [PATCH net-next v5 11/14] ip6_gre: make prepare_ip6gre_xmit_other() void Anton Danilov
2026-09-30 18:39 ` [PATCH net-next v5 12/14] ip6_tunnel: make ip6_tnl_xmit() return a drop reason Anton Danilov
2026-10-04 21:00 ` netdev-bot+sashiko
2026-09-30 18:39 ` [PATCH net-next v5 13/14] ip6_gre: add drop reasons to the transmit path Anton Danilov
2026-10-04 21:00 ` netdev-bot+sashiko
2026-09-30 18:39 ` [PATCH net-next v5 14/14] vxlan: report a circular route as SKB_DROP_REASON_RECURSION_LIMIT Anton Danilov
2026-10-04 16:50 ` [PATCH net-next v5 00/14] tunnels: add core and gre drop reasons Ido Schimmel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261004161546.GA346537@shredder \
--to=idosch@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=littlesmilingcloud@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®