From: netdev-bot+sashiko@kernel.org
To: littlesmilingcloud@gmail.com
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
dsahern@kernel.org, idosch@nvidia.com, andrew+netdev@lunn.ch,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v5 02/14] ip_tunnel: make __iptunnel_pull_header() return a drop reason
Date: Sun, 04 Oct 2026 21:00:45 +0000 [thread overview]
Message-ID: <179114764588.434549.11011384832570880257@kernel.org> (raw)
In-Reply-To: <20260930183910.3151873-3-littlesmilingcloud@gmail.com>
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] At this commit, vxlan_rcv() in drivers/net/vxlan/vxlan_core.c
still ignores the drop reason that __iptunnel_pull_header() now…
--
ip_tunnel: make __iptunnel_pull_header() return a drop reason
__iptunnel_pull_header() and iptunnel_pull_header() used to return -ENOMEM.
They now return an enum skb_drop_reason: the reason from
pskb_may_pull_reason() when a pull fails, SKB_DROP_REASON_NOMEM when
skb_unclone() fails, and SKB_NOT_DROPPED_YET on success. The three callers
in ip_gre and ip6_gre that tested the result with "< 0" now test for a
non-zero value.
> diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
> index bab42b9e277f7..6c2855adff289 100644
> --- a/net/ipv4/ip_tunnel_core.c
> +++ b/net/ipv4/ip_tunnel_core.c
[ ... ]
> if (!raw_proto && inner_proto == htons(ETH_P_TEB)) {
> struct ethhdr *eh;
>
> - if (unlikely(!pskb_may_pull(skb, ETH_HLEN)))
> - return -ENOMEM;
> + reason = pskb_may_pull_reason(skb, ETH_HLEN);
> + if (unlikely(reason))
> + return reason;
^^^^
[Severity: Low]
After this change, a truncated inner Ethernet header returns
SKB_DROP_REASON_PKT_TOO_SMALL here. Should vxlan_rcv() be updated in this
patch as well? At this commit it still throws away the returned reason:
drivers/net/vxlan/vxlan_core.c:vxlan_rcv() {
...
if (__iptunnel_pull_header(skb, VXLAN_HLEN, protocol, raw_proto,
!net_eq(vxlan->net, dev_net(vxlan->dev)))) {
reason = SKB_DROP_REASON_NOMEM;
goto drop;
}
...
}
This means a non-GPE VXLAN packet (protocol ETH_P_TEB, raw_proto false)
with an inner frame shorter than ETH_HLEN is still reported as NOMEM. The
commit message uses exactly this case as its example.
Only the drop reason seen through skb:kfree_skb and drop_monitor is
affected. The packet is dropped either way.
The next patch in the series, "vxlan: report the drop reason of
__iptunnel_pull_header()", changes this to
reason = __iptunnel_pull_header(...), so the problem only exists partway
through the series.
Would it make sense to fold that change into this patch? Alternatively,
the commit message could say that vxlan is converted separately.
>
> eh = (struct ethhdr *)skb->data;
> if (likely(eth_proto_is_802_3(eh->h_proto)))
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260930183910.3151873-1-littlesmilingcloud%40gmail.com
next prev parent reply other threads:[~2026-10-04 21:00 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 [this message]
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
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=179114764588.434549.11011384832570880257@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--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®