Article View: linux.kernel.netdev
Article #23213Re: [PATCH net-next v2 02/12] amt: send the Relay Advertisement over IPv6
From: netdev-bot+sashiko
Date: Thu, 26 Nov 2026 19:16
Date: Thu, 26 Nov 2026 19:16
102 lines
11133 bytes
11133 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] 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
Technical Details
Message-ID:
<179572061450.3135.6022071464185625512@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372290-linux-kernel-netdev=dewy.ruReferences:
<20261125191450.2497936-3-omar@blockcast.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372290-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v2 02/12] amt: send the Relay Advertisement over IPv6 Date: Thu, 26 Nov 2026 19:16:54 +0000 Organization: Usenet Network Message-ID: <179572061450.3135.6022071464185625512@kernel.org> References: <20261125191450.2497936-3-omar@blockcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="542305"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:dADoDYIgznFSAx+dafrQcU+qqJ4= sha256:pgzeMmHLQ7bONQQu2Rc6DeIe02p0KreXYCECEsTFvsw= sha1:8c7tvTjqSS1QJdAfS+ojKuh5aJc= sha256:Uja/GinVN3mTwaYUk0euad9aARMn35v4nNGaKwmRK5o= 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 686A2125EF5; Thu, 26 Nov 2026 22:17:19 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 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, URIBL_BLOCKED=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 nqjhQhM2isok; Thu, 26 Nov 2026 22:17:11 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372290-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 5E90E125EF6; Thu, 26 Nov 2026 22:17:02 +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 A86502ECA9; Thu, 26 Nov 2026 19:16:58 +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=1795720617; b=tnDpvJ33BfOYjOwxr2nJzYraSFIkCmDssCqh380wJo8eNa1vH7JsNd3hP9lCZVt8uscR ogjF3igrKooSFOPGVsZUdOXNEFoVRvasbcUqnFxwxGj/GPadwL1/Xu8hB/og9v5+RiEWE 8BB5F2k70PKUtlZvmj1vs4kfT+QJ+4NZYXMoGf5XqnbmWUjzI0Xh2syzBb9KNudR45DWN hh5flFMre7bz7zoAtef0XzRgpciYacyHed77IZEto/brDEiuTdLQmWvGmTiwI/JLigCsB DlJ/PnfgygNodzKYqhkC8VC9ge/vYL4Yth1qjzNis13ORXCeKT+tEuvBByQ62K9YkTg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795720617; 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=9u7fRQ27JKwPMHMRI8HVbLu3Ly/w1IeOYPfKtu1UK/o=; b=qhOG1TRxtWvvmefe2r4YpamMZw3vsb9YM4Z9rpp/lWhXnvSixu1zey6E/rhEv2+xArSH xhhAWaR7qaZU1tmEOJquwnXXV2xjDhNCCmzPXJpKV6NSNjRQojqG73sqIk9Wv5F7R8N2c 1rtnaXq0YVLyh57CyMA00RetgbJKSs+WwmMZji00PdHE2SzChNXP5nCzwPJBFq7vdoUd+ 6iXbkB2mSVJpQPvA6gumrDDO3iunqluaDlYLGGP53SJjT+7DTSGCH8jf1Vzts73V1W9mz H1t8gEI89Cpw81XvMoJw5aLcTvp/2xnK5vv2fjfX6GsrLyhNn4EM/T99gWFXLaFVoSA== 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=olxQeprM; 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 27AB3606A33C; Thu, 26 Nov 2026 19:16:57 +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=olxQeprM 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=1795720616; b=l7yctpNMBBTZj6wkjT49pJNzj+iAKcdEHN9hnalnaSut5ni+UhGFH7nrg73g76QLm2Tn v47u49phJC7MFLrTbz+mvEB4/mpSHgxUc2sypdjA6rOntZQSx1JfDIV16WyqQ4ySnVlEV xb78rD+uHPTbq6kdOMRoE8yaNMhKY5JXRPQFIRKvpCQ47/NF01i4FihLLZ275zPJ3LiXj 0Rfjk5OBXds+kMCwhEO0j0e0Aocy9r0SDGVFZh0metVmUL8eTMTKg+qokCpl10RddF16y J1AS7e3U75f7C6Mp5hMF1XYc7dQOwp4I8ztLiqwqEYy9P1V3Ko5w3nFsgklZx+5P7RQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795720616; 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=9u7fRQ27JKwPMHMRI8HVbLu3Ly/w1IeOYPfKtu1UK/o=; b=ux7Iaa0I+vXk66oaM4O2IEs1B6/sGmWiBjFxnQcJbDLrdwKOUIoTkve0OD/Dn5JJgdt6 lGH55niRgiviAdUoFWyF7KZh3O6ucdEHw/M3M0K+6g5QRQWiMvGncmw68pZVnr7qOgwsz QnEbiIRAk6Vh/LhWcvOdqKKwk/xJ0FrSnUmg25zpEYsY4LPEUmT32+Mv8iiX350fUn1Ql 0woaHYOf0A374BB70N1JLjJTwv9Yo8+eirACtPxVcr7SwtS/3XJVE/TqE1Q7iI2F6vxHN 8fZeKWSnrzczfmjupsrakCfDZKpyGfETLWdr6jtrvPB6VLCUpJYHfVEbljw5xONk4EA== 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=olxQeprM; 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 47D07606A329; Thu, 26 Nov 2026 19:16:56 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 066481F000C0; Thu, 26 Nov 2026 19:16:54 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795720615; bh=9u7fRQ27JKwPMHMRI8HVbLu3Ly/w1IeOYPfKtu1UK/o=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=olxQeprMulgqGjf255Cn9iNfWmrYFIJkPpm2Qi6+uFTL0Gkz/ExN8w1mhcIE7cXaS J8OD+0K4CzDwIquWpZThRF3IgqxlBv8TzY/ifp9nHPUwM0rxiJpe37CpIQ0YGCYBSF Fk8QzQfBB3JKTjgve0aIe3ZDX3rlstXy+O50HK2B9283L40kenewalAAbnDHkRJ/UN 5aVAWnjcUFpBCLuViqP1OpRtX4N/hhgumtBihAld09buGbwJWfTSkGFch6hf1FAQtL b2aoX3m+6awUjqMmhUq2WlSrc8P2ykbuipMYGTEe7wLXaJUnHYUMvGEmvep4oyYulV 66E2832Rb/0mw== 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 X-In-Reply-To: <20261125191450.2497936-3-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