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,
willemb@google.com, dsahern@kernel.org, idosch@nvidia.com
Subject: Re: [PATCH net-next v6 04/12] amt: send the Membership Query over IPv6
Date: Thu, 03 Dec 2026 04:33:17 +0000 [thread overview]
Message-ID: <179627239740.3146.11347377511518606801@kernel.org> (raw)
In-Reply-To: <20261202043200.286260-5-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] amt_udp_xmit() in drivers/net/amt.c takes a `dscp_t dscp`
argument, but only the IPv4 branch uses it (`fl4.flowi4_dscp = dscp;`,…
--
amt: send the Membership Query over IPv6
This commit moves the route lookup and transmit step of
amt_send_membership_query() into a new helper, amt_udp_xmit(). The helper
sends over IPv4 or IPv6 depending on the device's outer family.
amt_send_igmp_gq() and amt_send_mld_gq() now take the gateway endpoint as a
union amt_addr.
> diff --git a/drivers/net/amt.c b/drivers/net/amt.c
> index bfdce6897f7cd..1f4914a635f48 100644
> --- a/drivers/net/amt.c
> +++ b/drivers/net/amt.c
[ ... ]
> @@ -1232,6 +1237,63 @@ static void amt_req_work(struct work_struct *work)
> msecs_to_jiffies(100));
> }
>
> +/* Route and send an AMT message to @daddr over the device's family. Over
> + * IPv6 @dst may hold the route already looked up; it is consumed.
> + */
> +static int amt_udp_xmit(struct amt_dev *amt, struct sock *sk,
> + struct sk_buff *skb, const union amt_addr *daddr,
> + __be16 sport, __be16 dport, dscp_t dscp)
> +{
> + struct rtable *rt;
> + struct flowi4 fl4;
> +
> + if (amt_v6(amt)) {
> + struct dst_entry *dst;
> +
> + dst = amt_route6(amt, sk, &amt->local_ipv6, &daddr->ip6,
> + sport, dport);
[ ... ]
> + memset(&fl4, 0, sizeof(struct flowi4));
> + fl4.flowi4_oif = amt->stream_dev->ifindex;
> + fl4.daddr = daddr->ip4;
> + fl4.saddr = amt->local_ip;
> + fl4.flowi4_dscp = dscp;
[Severity: Low]
Is it intended that amt_udp_xmit() ignores its dscp argument over IPv6?
Only the IPv4 branch uses dscp. The IPv6 branch calls amt_route6() without
it, and amt_route6() always routes on AMT_TOS:
drivers/net/amt.c:amt_route6() {
...
/* Route on AMT_TOS too, for a policy rule that matches the DSCP. */
fl6.flowlabel = ip6_make_flowinfo(AMT_TOS, 0);
...
}
In this commit the only caller is amt_send_membership_query(). It passes
inet_dsfield_to_dscp(AMT_TOS), so both families route the same way for now.
The commit message says the Multicast Data and Membership Update will go
through this helper later. Later in the series, amt_send_multicast_data()
calls:
amt_udp_xmit(..., tunnel->source_port, 0, dst)
Over IPv4, Multicast Data is routed with DSCP 0, as it was before the
series. Over IPv6, the dst comes from amt_route6() with AMT_TOS, and the 0
is ignored.
A DSCP-keyed policy rule (ip rule ... dsfield) would then match IPv6
Multicast Data but not IPv4 Multicast Data, even though both carry AMT_TOS
on the wire.
Could the IPv6 path pass dscp through to amt_route6(), or could the
parameter be dropped so that both families route the same way?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202043200.286260-1-omar%40blockcast.net
next prev parent reply other threads:[~2026-12-03 4:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 4:31 [PATCH net-next v6 00/12] amt: add an IPv6 outer transport Omar Ramadan
2026-12-02 4:31 ` [PATCH net-next v6 01/12] amt: create an AF_INET6 encapsulation socket for an IPv6 outer address Omar Ramadan
2026-12-02 4:31 ` [PATCH net-next v6 02/12] amt: send the Relay Advertisement over IPv6 Omar Ramadan
2026-12-02 4:31 ` [PATCH net-next v6 03/12] amt: key relay tunnels on a union amt_addr endpoint Omar Ramadan
2026-12-03 4:33 ` netdev-bot+sashiko
2026-12-02 4:31 ` [PATCH net-next v6 04/12] amt: send the Membership Query over IPv6 Omar Ramadan
2026-12-03 4:33 ` netdev-bot+sashiko [this message]
2026-12-02 4:31 ` [PATCH net-next v6 05/12] amt: forward multicast data " Omar Ramadan
2026-12-03 4:33 ` netdev-bot+sashiko
2026-12-02 4:31 ` [PATCH net-next v6 06/12] amt: size the encapsulation headroom by the outer IP version Omar Ramadan
2026-12-02 4:31 ` [PATCH net-next v6 07/12] amt: send the AMT gateway control plane over IPv6 Omar Ramadan
2026-12-03 4:33 ` netdev-bot+sashiko
2026-12-02 4:31 ` [PATCH net-next v6 08/12] amt: receive " Omar Ramadan
2026-12-03 4:33 ` netdev-bot+sashiko
2026-12-02 4:31 ` [PATCH net-next v6 09/12] amt: add netlink attributes for an IPv6 outer transport Omar Ramadan
2026-12-02 4:31 ` [PATCH net-next v6 10/12] MAINTAINERS: amt: cover the amt headers and selftests Omar Ramadan
2026-12-02 4:31 ` [PATCH net-next v6 11/12] selftests: net: add amt_v6.sh for an IPv6 outer transport Omar Ramadan
2026-12-03 4:33 ` netdev-bot+sashiko
2026-12-02 4:32 ` [PATCH net-next v6 12/12] 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=179627239740.3146.11347377511518606801@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=ap420073@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--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 \
--cc=willemb@google.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