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 02/12] amt: send the Relay Advertisement over IPv6
Date: Thu, 26 Nov 2026 19:16:54 +0000 [thread overview]
Message-ID: <179572061450.3135.6022071464185625512@kernel.org> (raw)
In-Reply-To: <20261125191450.2497936-3-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 IPv6 control-message helper does not count send failures that
happen after the packet is handed to the IPv6 stack.
--
amt: send the Relay Advertisement over IPv6
This patch adds the IPv6 form of the AMT Relay Advertisement
(struct amt_header_advertisement_v6) and a new amt_send_ctrl_v6() helper.
The helper routes with ip6_dst_lookup_flow() and sends with
udp_tunnel6_xmit_skb(). amt_discovery_handler() now answers a Discovery on
an IPv6 device with this form, sourced from the Discovery's destination
address.
> diff --git a/drivers/net/amt.c b/drivers/net/amt.c
> index 3f3205d2df3e8..52ccaca08b5ec 100644
> --- a/drivers/net/amt.c
> +++ b/drivers/net/amt.c
[ ... ]
> +/* Send an AMT control message over the IPv6 outer transport from @saddr.
> + * udp_tunnel6_xmit_skb() adds the UDP and IPv6 headers, including the UDP
> + * checksum that IPv6 requires. Returns 0 once the message is handed to the
> + * IPv6 stack.
> + */
> +static int amt_send_ctrl_v6(struct amt_dev *amt, const struct in6_addr *saddr,
> + const struct in6_addr *daddr,
> + __be16 sport, __be16 dport,
> + const void *msg, unsigned int len)
> +{
[ ... ]
> + skb_reserve(skb, hlen);
> + skb_put_data(skb, msg, len);
> + skb->priority = TC_PRIO_CONTROL;
> + udp_tunnel6_xmit_skb(dst, sk, skb, NULL, saddr, daddr, AMT_TOS,
> + ip6_dst_hoplimit(dst), 0, sport, dport, false, 0);
> + err = 0;
[Severity: Low]
If the packet is dropped after it is handed to the IPv6 stack, should that
drop show up in amt->dev tx_errors the way it does for the IPv4 control
messages?
udp_tunnel6_xmit_skb() returns void, and ip6tunnel_xmit() only looks at the
ip6_local_out() result when a netdev is passed:
include/net/ip6_tunnel.h:ip6tunnel_xmit() {
...
err = ip6_local_out(skb_dst_dev_net(skb), sk, skb);
if (dev) {
if (unlikely(net_xmit_eval(err)))
pkt_len = -1;
iptunnel_xmit_stats(dev, pkt_len);
}
...
}
Since dev is NULL here, a drop by netfilter, neighbour resolution or the
qdisc is never counted. The IPv4 senders, including
amt_send_advertisement(), do count it:
err = ip_local_out(amt->net, sk, skb);
if (unlikely(net_xmit_eval(err)))
DEV_STATS_INC(amt->dev, tx_errors);
Route lookup and allocation failures in amt_send_ctrl_v6() still increment
tx_errors. So the IPv4 and IPv6 paths differ only for drops after the
handoff.
The commit message says:
Like the IPv4 control messages, it marks the
skb TC_PRIO_CONTROL, uses AMT_TOS as the traffic class and passes no
netdev, so control traffic stays out of the amt device's tunnel stats.
Passing NULL also hides these post-handoff errors, and the message doesn't
mention that.
At the end of the series the same udp_tunnel6_xmit_skb(..., NULL, ...);
err = 0; sequence is still present. That means every later IPv6 control
sender that uses this helper has the same gap.
> +out:
> + rcu_read_unlock();
> + return err;
> +}
[ ... ]
--
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:16 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 [this message]
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
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=179572061450.3135.6022071464185625512@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