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 08/13] amt: send the AMT gateway control plane over IPv6
Date: Sat, 10 Oct 2026 12:41:31 +0000 [thread overview]
Message-ID: <179163609160.434549.7351587240997160050@kernel.org> (raw)
In-Reply-To: <20261009122426.551178-9-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] Commit-message concern for "amt: send the AMT gateway control
plane over IPv6": none of the new IPv6 gateway sender code can run at…
- [Low] At this commit the new IPv6 gateway senders use discovery_ipv6
and remote_ipv6, but the receive side is still IPv4-only.
--
amt: send the AMT gateway control plane over IPv6
This commit adds amt_send_discovery_v6() and amt_send_request_v6(). They
send the gateway Relay Discovery and Request over an IPv6 outer header
through amt_send_ctrl_v6(). It also changes amt_send_membership_update() to
size its headroom for the outer family and send through amt_udp_xmit(), and
adds discovery_ipv6, remote_ipv6 and the remote_ipv6_lock seqlock to struct
amt_dev.
> Send the Discovery and the Request of a gateway with an IPv6 local
> address from amt_send_discovery_v6() and amt_send_request_v6(). Both
> messages are a few bytes with no payload, so they are built on the stack
> and sent with amt_send_ctrl_v6(), the helper that already sends the
> relay's IPv6 Advertisement, rather than with a copy of the IPv4 skb
> construction. The Membership Update carries the gateway's IGMP or MLD
> report, so amt_send_membership_update() keeps building on that skb: it
> sizes the headroom for the outer family and sends through
> amt_udp_xmit(), like the relay's Membership Query and Multicast Data,
> which avoids an IPv6 copy of the function.
[Severity: Low]
This isn't a bug, but could the commit message say that none of the new
IPv6 sender code can run yet?
At this commit nothing writes local_ipv6, so amt_v6() is always false:
drivers/net/amt.c:amt_v6() {
return IS_ENABLED(CONFIG_IPV6) && !ipv6_addr_any(&amt->local_ipv6);
}
Nothing writes discovery_ipv6 or remote_ipv6 here either. Later patches
fill them in: "amt: receive the AMT gateway control plane over IPv6" and
"amt: add netlink attributes for an IPv6 outer transport".
Earlier patches in the series include a line like "No functional change:
amt_v6() is still false for every device". The first patch also says
"Nothing sets local_ipv6 until the netlink attribute added at the end of
this series". Would a similar line fit here?
The message also leaves out that the IPv4 path of
amt_send_membership_update() now goes through amt_udp_xmit(). As far as I
can tell the behaviour is the same:
- With data=false, amt_udp_xmit() builds the same flowi4 as the removed
code and calls udp_tunnel_xmit_skb() with the same arguments.
- amt_ip_hlen() still reserves sizeof(struct iphdr).
- amt_dev_xmit() frees the skb on a true return, whether the route lookup
fails before or after the skb_push().
Could this be described as a refactor with no IPv4 behaviour change?
> diff --git a/drivers/net/amt.c b/drivers/net/amt.c
> index 969ecfe81d7ad..148d1fb369154 100644
> --- a/drivers/net/amt.c
> +++ b/drivers/net/amt.c
> @@ -715,6 +715,50 @@ static int amt_send_ctrl_v6(struct amt_dev *amt, const struct in6_addr *saddr,
> return err;
> }
>
> +/* The learned IPv6 relay address is written in process context and read
> + * on transmit and receive. A struct in6_addr is not read in one access, so
> + * readers take a snapshot under the seqlock.
> + */
[Severity: Low]
Is the "read on transmit and receive" part accurate at this commit?
The only readers added here are amt_send_request_v6() and the IPv6 branch
of amt_send_membership_update(). In gateway mode, amt_rcv() still checks
the outer source against the IPv4 addresses only:
drivers/net/amt.c:amt_rcv() {
...
if (saddr != amt->discovery_ip) {
...
if (saddr != remote_ip) {
...
}
amt_advertisement_handler() also learns only the IPv4 relay address:
WRITE_ONCE(amt->remote_ip, amta->ip4);
So nothing writes remote_ipv6 yet, and nothing on the receive side reads
it.
The next patch, "amt: receive the AMT gateway control plane over IPv6",
adds amt_from_relay() and amt_set_remote_ipv6(). After that patch the
comment is accurate.
amt_v6() stays false until the netlink patch, which comes after the
receive patch. So this can't be hit in any bisectable state. The comment
just describes code that arrives one commit later. Would it be clearer to
add the receive part of the comment in the next patch?
> +static struct in6_addr amt_get_remote_ipv6(const struct amt_dev *amt)
> +{
> + struct in6_addr addr;
> + unsigned int seq;
[ ... ]
> +/* IPv6-outer variant of amt_send_request(); @v6 is the inner family. */
> +static void amt_send_request_v6(struct amt_dev *amt, bool v6)
> +{
> + const struct in6_addr remote = amt_get_remote_ipv6(amt);
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261009122426.551178-1-omar%40blockcast.net
next prev parent reply other threads:[~2026-10-10 12:41 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 12:24 [PATCH net-next 00/13] amt: add an IPv6 outer transport Omar Ramadan
2026-10-09 12:24 ` [PATCH net-next 01/13] amt: create an AF_INET6 encapsulation socket for an IPv6 outer address Omar Ramadan
2026-10-09 12:24 ` [PATCH net-next 02/13] amt: send the Relay Advertisement over IPv6 Omar Ramadan
2026-10-10 12:41 ` netdev-bot+sashiko
2026-10-09 12:24 ` [PATCH net-next 03/13] amt: key relay tunnels on a union amt_addr endpoint Omar Ramadan
2026-10-10 12:41 ` netdev-bot+sashiko
2026-10-09 12:24 ` [PATCH net-next 04/13] amt: send the Membership Query over IPv6 Omar Ramadan
2026-10-10 12:41 ` netdev-bot+sashiko
2026-10-09 12:24 ` [PATCH net-next 05/13] amt: match the Membership Update tunnel by outer family Omar Ramadan
2026-10-10 12:41 ` netdev-bot+sashiko
2026-10-09 12:24 ` [PATCH net-next 06/13] amt: forward multicast data over IPv6 Omar Ramadan
2026-10-10 12:41 ` netdev-bot+sashiko
2026-10-09 12:24 ` [PATCH net-next 07/13] amt: size the encapsulation headroom by the outer IP version Omar Ramadan
2026-10-09 12:24 ` [PATCH net-next 08/13] amt: send the AMT gateway control plane over IPv6 Omar Ramadan
2026-10-10 12:41 ` netdev-bot+sashiko [this message]
2026-10-09 12:24 ` [PATCH net-next 09/13] amt: receive " Omar Ramadan
2026-10-10 12:41 ` netdev-bot+sashiko
2026-10-09 12:24 ` [PATCH net-next 10/13] amt: add netlink attributes for an IPv6 outer transport Omar Ramadan
2026-10-10 12:41 ` netdev-bot+sashiko
2026-10-09 12:24 ` [PATCH net-next 11/13] MAINTAINERS: amt: cover the amt headers and selftests Omar Ramadan
2026-10-09 12:24 ` [PATCH net-next 12/13] selftests: net: add amt_v6.sh for an IPv6 outer transport Omar Ramadan
2026-10-10 12:41 ` netdev-bot+sashiko
2026-10-09 12:24 ` [PATCH net-next 13/13] selftests: net: add amt_gw_v6.sh for the IPv6 netlink attributes Omar Ramadan
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=179163609160.434549.7351587240997160050@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®