๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26140

Re: [PATCH net-next v6 04/12] amt: send the Membership Query over IPv6

#26140
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 04:33
92 lines
10999 bytes
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
Technical Details
Message-ID: <179627239740.3146.11347377511518606801@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376282-linux-kernel-netdev=dewy.ru
References: <20261202043200.286260-5-omar@blockcast.net>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376282-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v6 04/12] amt: send the Membership Query over IPv6
Date: Thu, 03 Dec 2026 04:33:17 +0000
Organization: Usenet Network
Message-ID: <179627239740.3146.11347377511518606801@kernel.org>
References: <20261202043200.286260-5-omar@blockcast.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2142522"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:lgE3dN92y4TzRmB3RRGKcsdGI3k= sha256:t5c42AgaUAypNR2N9YJkAd+WVi7GFaJrfQOk1qFptvw=
	sha1:LVRSqSazV1WNmV1ZUQYxj+sWAro= sha256:F4r78PrPRpdC5GPhOqfl58DMTsrj7GtKOjJgrErr7Vk=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 3F495117818; Thu,  3 Dec 2026 07:33:46 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id zTIsute5s2SB;
	Thu,  3 Dec 2026 07:33:38 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376282-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id E340D11780A; Thu,  3 Dec 2026 07:33:28 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 2273527725; Thu,  3 Dec 2026 04:33:21 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796272399;
	b=V30LMoOApjLxykjAjvpY5XX5h72dDxvzKddYhCIcApvfBCUvp1Ue7y/eGBiHJJJV8woZ
	 awgbFq5qZsi7/5Ix1OgvEMY0lvka76DZoG7N+uhPKU6H+yJehKpIy0v3Q012ltLa07y+Z
	 0twNb6mYq9OaTwDYTSStaDmjpE/oLoA7yKFSKvaKnEqbHIRig+jYd0ufgS61fB8LZk6LE
	 L44nxzKHqSVKqSU/S+t35GZObx7xqkJmGVMVN4xE68CxEuBb998kiplqqFtRs0NiFgfDL
	 9eHWHm/npcH8dM1fOd7or/BOII8HKG6yaEeqQIBuOut+yykhJCZn6N3I2ru4eQ57adw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796272399;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=wBd5XV692QrIaucyNkr374vVKSMY4QotocoNJOftSmc=;
	b=nm9TGYh+b1yP6+LDigQZBAHpoWTibf0Yxrp7P/gtOoJGOCqMO6/fRhUzOm0yuAMhmPnB
	 OHn/9jMuuqBcr9J1m0Kgiepow63YYnGsu6LOiX2wN/9EiEQSjq6IQ5yXx/YXB/kyBjn/M
	 KGKhaYygK0dxZYohmAyQ1r9fbCvck4g56aDj9Qk7ojq1m6yQtiCukZF0RlyRc/pCa8cVY
	 0aVVLdi0QRcl2sb1dTUIJEy1VryNtkx1X9Iqj0FDibRtxCt6NBJIgYF9A/lfrOrKEWV/c
	 zvj+Mu5+HikgsHOwn4f21p6j9vqrceo5vm1PGcMwclf7KkI+Vdx9EyBdaBOaeG+/QpA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Crm7diFW;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id D1472606A690;
	Thu,  3 Dec 2026 04:33:19 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Crm7diFW
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796272399;
	b=qhtwbSRir66oFDozlfmEeXCoDueHfzlv4vYFQlOHtgNue/goVaFqFGKgfJYgcQr2f5Oy
	 TjhXoo92ZWQPREKn7V0G+ayU2VzHKc7MbZTrtDOGerQfDxOG3kbiRhoGq00sh3v0gzJmt
	 XrDpcIulrjpZlWlRWLlsnS11sqF8/s8uh7FKMOIgFRtEn6FilQsDGJFeN5PtAW98HLwce
	 evZ7o7bQdi5pGyOUQoYRLsEqe9PwYTb15n3NymA2uyrogFSLfWWL027i91GK3MZCAoshc
	 d6deCUbhi4E1A5n3KOj7a2HY0Bmy417g18ci6y6jTOzGkI9WGylbvwY0QswdihxE/hA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796272399;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=wBd5XV692QrIaucyNkr374vVKSMY4QotocoNJOftSmc=;
	b=sVnZxt9YX6c82s+AMst3R9iSOchRk2ki47aP4y5z18zbEjBS5EvsgUH+ELF0OevjvNr6
	 vUZaiCqunbCBfzt9txMqa77NIh6IW9Hf1p0XU9xKFnOhmj7K8tYAPpn9UBh6eF3mXSdIx
	 p6GWKNeqynxTIUeXr3tU3QNHjVVURbsG+e0TERHjOKMjO/IQgM15fDL5Fx3LQCC395rHr
	 U7iICEyLhcFwwgpgyIsWx69jHji/4Q0ReSlmJoc34DHvlx+wilHcMq9M/EyVy2JlaZmdf
	 cfV6WEHGrKmHg+fhpkDpqBJMvO2Jx2sl5HXyEr/tzLlIJ84YH85F3TVXbmVLwlkHvwQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Crm7diFW;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id F33CF606A33F;
	Thu,  3 Dec 2026 04:33:18 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC2E61F000C1;
	Thu,  3 Dec 2026 04:33:17 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796272398;
	bh=wBd5XV692QrIaucyNkr374vVKSMY4QotocoNJOftSmc=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=Crm7diFW4MMm6b+xbdmwCLnwMpsSRs9XO0uBX2CbwBDGF5vaNNd+kvc3L+965DckZ
	 wz55TCqLdQsmYfszrAlI7w8r0R2FbzCdGlGFWedkVrr49tewO2cRaRrQR+O5oilWXh
	 aZEN/8EFolorVHUOme/wWgTE8yxVqc9Qn1O5gGHAXnx9JUpbc9N5ddKh67WmEEdHTf
	 8nImaO3xGT/x9eUS0w6LdoMjYfZT33tR0+ReZsFrOrQhYl/r1a2Wv0h/1NhV5L2MyH
	 YHbmLPjUoidZyqfex9b27XoD1OYyr0YmfIBTGULMyOwlxZV/LSEomSOv1NxJVRRxtP
	 +bZZAqv7YKNlw==
X-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
X-In-Reply-To: <20261202043200.286260-5-omar@blockcast.net>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list