From: netdev-bot+sashiko@kernel.org
To: omar@blockcast.net
Cc: ap420073@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
shuah@kernel.org, horms@kernel.org, netdev@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 06/12] amt: size the encapsulation headroom by the outer IP version
Date: Thu, 26 Nov 2026 19:17:00 +0000 [thread overview]
Message-ID: <179572062093.3135.571620247087203844@kernel.org> (raw)
In-Reply-To: <20261125191450.2497936-7-omar@blockcast.net>
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] The commit message names the wrong drop site for the packets it
is meant to protect.
--
amt: size the encapsulation headroom by the outer IP version
This adds AMT_RELAY_HLEN6 and AMT_GW_HLEN6 and a new helper, amt_hlen(),
that picks the IPv4 or IPv6 headroom size for the device's outer family.
amt_hlen() is then used to size needed_headroom, mtu, max_mtu and
min_mtu in amt_newlink(), and the new MTU on NETDEV_CHANGEMTU in
amt_device_event().
> The amt device reserves AMT_RELAY_HLEN or AMT_GW_HLEN of headroom and
> subtracts the same amount from the stream device's MTU. Both assume a
> 20-byte IPv4 outer header. An IPv6 outer header is 40 bytes, so on an
> IPv6 device an inner packet in the last 20 bytes below the MTU would
> not fit the stream device once encapsulated, and ip6_fragment() drops
> it: nothing sets ignore_df on the tunnel skb.
[Severity: Low]
Is this description accurate for this tree? The previous patch in the
series, "amt: forward multicast data over IPv6", added a tunnel MTU check
to the relay's bulk transmit path. The check runs before encapsulation:
drivers/net/amt.c:amt_send_multicast_data() {
...
tmtu = amt_tmtu(dst);
if (amt_tmtu_exceeded(oskb, tmtu)) {
dst_release(dst);
...
DEV_STATS_INC(amt->dev, tx_dropped);
return;
}
...
}
amt_tmtu() returns:
return dst_mtu(dst) - sizeof(struct ipv6hdr) - sizeof(struct udphdr) -
sizeof(struct amt_header_mcast_data);
That is dst_mtu - 50.
An inner packet that does not fit is dropped here, before
skb_copy_expand() and amt_udp_xmit() are called, so it never reaches
ip6_fragment(). The drop is counted in tx_dropped, and *ptb is lowered
so amt_dev_xmit() sends a Packet Too Big if the payload is IPv6. An IPv4
multicast payload is dropped without notice, because icmp_send() does
not answer multicast.
The size of the window also seems different from what the message
says. sizeof(struct amt_relay_headers) is 12, so the old relay MTU is
stream_mtu - 40 and the tunnel MTU is stream_mtu - 50. The affected
packets fall in a 10-byte window, not the last 20 bytes.
The other relay sends (Advertisement, Membership Query) are small
control messages. The gateway's Membership Update only carries IGMP/MLD
reports.
The code change itself looks right. Only the stated reason seems off.
Could the commit message say that the relay's own tunnel MTU check in
amt_send_multicast_data() drops these packets, and that IPv4 multicast
payloads are dropped without notice?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125191450.2497936-1-omar%40blockcast.net
next prev parent reply other threads:[~2026-11-26 19:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 19:14 [PATCH net-next v2 00/12] amt: add an IPv6 outer transport Omar Ramadan
2026-11-25 19:14 ` [PATCH net-next v2 01/12] amt: create an AF_INET6 encapsulation socket for an IPv6 outer address Omar Ramadan
2026-11-25 19:14 ` [PATCH net-next v2 02/12] amt: send the Relay Advertisement over IPv6 Omar Ramadan
2026-11-26 19:16 ` netdev-bot+sashiko
2026-11-25 19:14 ` [PATCH net-next v2 03/12] amt: key relay tunnels on a union amt_addr endpoint Omar Ramadan
2026-11-26 19:16 ` netdev-bot+sashiko
2026-11-25 19:14 ` [PATCH net-next v2 04/12] amt: send the Membership Query over IPv6 Omar Ramadan
2026-11-26 19:16 ` netdev-bot+sashiko
2026-11-25 19:14 ` [PATCH net-next v2 05/12] amt: forward multicast data " Omar Ramadan
2026-11-26 19:16 ` netdev-bot+sashiko
2026-11-25 19:14 ` [PATCH net-next v2 06/12] amt: size the encapsulation headroom by the outer IP version Omar Ramadan
2026-11-26 19:17 ` netdev-bot+sashiko [this message]
2026-11-25 19:14 ` [PATCH net-next v2 07/12] amt: send the AMT gateway control plane over IPv6 Omar Ramadan
2026-11-25 19:14 ` [PATCH net-next v2 08/12] amt: receive " Omar Ramadan
2026-11-26 19:17 ` netdev-bot+sashiko
2026-11-25 19:14 ` [PATCH net-next v2 09/12] amt: add netlink attributes for an IPv6 outer transport Omar Ramadan
2026-11-25 19:14 ` [PATCH net-next v2 10/12] MAINTAINERS: amt: cover the amt headers and selftests Omar Ramadan
2026-11-25 19:14 ` [PATCH net-next v2 11/12] selftests: net: add amt_v6.sh for an IPv6 outer transport Omar Ramadan
2026-11-26 19:17 ` netdev-bot+sashiko
2026-11-25 19:14 ` [PATCH net-next v2 12/12] selftests: net: add amt_gw_v6.sh for the IPv6 netlink attributes Omar Ramadan
2026-11-26 19:17 ` netdev-bot+sashiko
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=179572062093.3135.571620247087203844@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=ap420073@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=omar@blockcast.net \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/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®