Article View: linux.kernel.netdev
Article #26558Re: [PATCH net-next v5 2/2] selftests: net: pmtu: Add IPv6 multipath tests
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 19:01
Date: Thu, 03 Dec 2026 19:01
181 lines
15691 bytes
15691 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] ipv6: early return in __ip6_rt_update_pmtu() skips multipath
nexthops
- [Low] In tools/testing/selftests/net/pmtu.sh, setup_multipath() now
writes `net.ipv4.ping_group_range="0 2147483647"` in ns_a for every…
--
selftests: net: pmtu: Add IPv6 multipath tests
This commit extends the IPv4 multipath PMTU selftests in pmtu.sh to IPv6.
It adds pmtu_ipv6_mp_exceptions and pmtu_ipv6_mp_asym_exceptions, and the
asymmetric test uses IPv6 flow labels to send one ping through each
router. It also enables ICMP datagram sockets for ping in ns_a, so that
rawv6_err() does not process the same Packet Too Big twice.
> diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
> index a5d602a453c9b..9403e87ee608f 100755
> --- a/tools/testing/selftests/net/pmtu.sh
> +++ b/tools/testing/selftests/net/pmtu.sh
[ ... ]
> @@ -1003,49 +1014,119 @@ setup_ovs_bridge() {
[ ... ]
> setup_multipath() {
> + family="$1"
> +
[ ... ]
> # Set up routers with routes to dummies
> - run_cmd ${ns_r1} ip route add ${host4_a_addr} via ${prefix4}.${a_r1}.1
> - run_cmd ${ns_r2} ip route add ${host4_a_addr} via ${prefix4}.${a_r2}.1
> - run_cmd ${ns_r1} ip route add ${host4_b_addr} via ${prefix4}.${b_r1}.1
> - run_cmd ${ns_r2} ip route add ${host4_b_addr} via ${prefix4}.${b_r2}.1
> + run_cmd ${ns_r1} ip route add ${host_a_addr} via ${nh_r1_a}
> + run_cmd ${ns_r2} ip route add ${host_a_addr} via ${nh_r2_a}
> + run_cmd ${ns_r1} ip route add ${host_b_addr} via ${nh_r1_b}
> + run_cmd ${ns_r2} ip route add ${host_b_addr} via ${nh_r2_b}
> +
> + # Let ping use ICMPv6 datagram sockets to avoid handling a PTB twice.
> + ${ns_a} sysctl -q -w net.ipv4.ping_group_range="0 2147483647"
> +}
> +
> +setup_multipath4() {
> + setup_multipath 4
> +}
[Severity: Low]
Is it intended that this sysctl runs for both families? The comment above
it only mentions ICMPv6.
net.ipv4.ping_group_range is the only range that net/ipv4/ping.c checks,
for both AF_INET and AF_INET6 ping sockets. setup_multipath4() also goes
through setup_multipath(). That means pmtu_ipv4_mp_exceptions and
pmtu_ipv4_mp_asym_exceptions now use ICMP datagram sockets as well.
Before this patch, the netns default range of "1 0" denied datagram
sockets, so ping fell back to SOCK_RAW. IPv4 Fragmentation Needed handling
now goes through ping_err() instead of raw_err(). Both call
ipv4_sk_update_pmtu(), so IPv4 coverage should stay about the same.
The commit message describes the change as IPv6 only:
Use ICMP datagram sockets for ping. With a raw socket, rawv6_err() can
process the same Packet Too Big a second time.
Could the sysctl be set only when family is 6? Alternatively, the comment
and commit message could say that the IPv4 multipath tests also move from
raw to datagram ping sockets.
[ ... ]
> @@ -2456,29 +2572,48 @@ test_pmtu_ipv4_mp_asym_exceptions() {
> mtu "${ns_r2}" veth_R2-B 1300
> mtu "${ns_b}" veth_B-R2 1300
>
> - flow_r1="$(mp_flow_via ${host4_b_addr} veth_A-R1)" || {
> + flow_r1="$(mp_flow_via ${family} ${dst} veth_A-R1)" || {
> err " no flow through veth_A-R1 found"; return 1; }
> - flow_r2="$(mp_flow_via ${host4_b_addr} veth_A-R2)" || {
> + flow_r2="$(mp_flow_via ${family} ${dst} veth_A-R2)" || {
> err " no flow through veth_A-R2 found"; return 1; }
> + if [ ${family} -eq 4 ]; then
> + ping_r1="${ping} -I ${flow_r1}"
> + ping_r2="${ping} -I ${flow_r2}"
> + else
> + ping_r1="${ping} -I ${host6_a_addr} -F ${flow_r1}"
> + ping_r2="${ping} -I ${host6_a_addr} -F ${flow_r2}"
> + fi
>
> - # A Fragmentation Needed from R1 is cached on the path via R1, not on
> - # the path via R2, whose link can't carry 1400
> - run_cmd ${ns_a} ping -I ${flow_r1} -q -M want -i 0.1 -c 1 -s 1800 "${host4_b_addr}"
> + # The error from R1 is cached on the path via R1, not on the path via
> + # R2, whose link can't carry 1400
> + run_cmd ${ns_a} ${ping_r1} -q -M want -i 0.1 -c 1 -s 1800 "${dst}"
>
> - pmtu_a_R1="$(route_get_dst_pmtu_from_exception "${ns_a}" "${host4_b_addr}" oif veth_A-R1)"
> - pmtu_a_R2="$(route_get_dst_pmtu_from_exception "${ns_a}" "${host4_b_addr}" oif veth_A-R2)"
> + pmtu_a_R1="$(route_get_dst_pmtu_from_exception "${ns_a}" "${dst}" oif veth_A-R1)"
> + pmtu_a_R2="$(route_get_dst_pmtu_from_exception "${ns_a}" "${dst}" oif veth_A-R2)"
> check_pmtu_value "1400" "${pmtu_a_R1}" "exceeding MTU via R1 (veth_A-R1)" || return 1
> check_pmtu_value "" "${pmtu_a_R2}" "exceeding MTU via R1 (veth_A-R2)" || return 1
>
> # The lower MTU behind R2 lowers the PMTU of both paths
> - run_cmd ${ns_a} ping -I ${flow_r2} -q -M want -i 0.1 -c 1 -s 1280 "${host4_b_addr}"
> + run_cmd ${ns_a} ${ping_r2} -q -M want -i 0.1 -c 1 -s 1280 "${dst}"
>
> - pmtu_a_R1="$(route_get_dst_pmtu_from_exception "${ns_a}" "${host4_b_addr}" oif veth_A-R1)"
> - pmtu_a_R2="$(route_get_dst_pmtu_from_exception "${ns_a}" "${host4_b_addr}" oif veth_A-R2)"
> + pmtu_a_R1="$(route_get_dst_pmtu_from_exception "${ns_a}" "${dst}" oif veth_A-R1)"
> + pmtu_a_R2="$(route_get_dst_pmtu_from_exception "${ns_a}" "${dst}" oif veth_A-R2)"
> check_pmtu_value "1300" "${pmtu_a_R1}" "exceeding MTU via R2 (veth_A-R1)" || return 1
> check_pmtu_value "1300" "${pmtu_a_R2}" "exceeding MTU via R2 (veth_A-R2)" || return 1
> }
>
> +test_pmtu_ipv4_mp_asym_exceptions() {
> + test_pmtu_ipvX_mp_asym_exceptions 4
> +}
> +
> +test_pmtu_ipv6_mp_asym_exceptions() {
> + test_pmtu_ipvX_mp_asym_exceptions 6
> +}
> +
> +test_pmtu_ipv6_mp_exceptions() {
> + test_pmtu_ipvX_mp_exceptions 6
> +}
> +
> usage() {
> echo
> echo "$0 [OPTIONS] [TEST]..."
[Severity: Medium]
This checks that the error from R1 lands on the path via R1. Does the
test ever reach the case where the PTB lookup picks the other nexthop?
For ICMPv6 datagram ping, icmpv6_err() calls ip6_update_pmtu() with oif
set to skb->dev->ifindex. R1 routes host6_a_addr back over the A-R1
link, so the Packet Too Big arrives on veth_A-R1 and ip6_route_output()
resolves to the R1 nexthop. The second ping works the same way for R2.
The preceding fix walks the nexthops with nexthop_for_each_fib6_nh() or
the fib6_siblings list. However, __ip6_rt_update_pmtu() still returns
early when mtu >= dst6_mtu(dst). That check uses only the single dst
chosen by the lookup, and it runs before any other nexthop is visited.
Suppose the lookup lands on the path via R2. Then dst6_mtu(dst) is 1350,
or 1300 once an exception exists there. A PTB of 1400 from R1 takes the
early return, and rt6_nh_update_pmtu() is never called for the R1
nexthop. The R1 path keeps its link MTU of 2000, so flows on it keep
sending packets that R1 drops.
The lookup can land on another nexthop when the PTB comes back on a
different interface than the one the packet left from. It can also land
there through ip6_sk_update_pmtu() on unbound sockets and through the
tunnel error handlers, which do the lookup with oif 0. The commit
message describes this for rawv6_err().
Should the early return in __ip6_rt_update_pmtu() be limited to routes
without siblings? Or should it only apply per nexthop, after the
multipath walk? Since these tests are meant to catch regressions of the
fix, could they also cover a PTB whose lookup selects the lower MTU
path?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202182545.19656-1-deliran%40verdict.gg
Technical Details
Message-ID:
<179632450234.3146.6973852608752869161@kernel.org>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376832-linux-kernel-netdev=dewy.ruReferences:
<20261202182545.19656-3-deliran@verdict.gg>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376832-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v5 2/2] selftests: net: pmtu: Add IPv6 multipath tests Date: Thu, 03 Dec 2026 19:01:42 +0000 Organization: Usenet Network Message-ID: <179632450234.3146.6973852608752869161@kernel.org> References: <20261202182545.19656-3-deliran@verdict.gg> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2571776"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:0n/wk016z/8+LBSDo+PBCQKx9ts= sha256:nuUXrl2LikZnVxcdOU56gcUCeOQGwDb1vO/f8oZDE/Y= sha1:Y8KnQRglbUxMume5UHVrTS03rJ4= sha256:ehiwnO03yOZqTzh+jKdsbkmQ1qdyjUpZWYHmnFLmWCA= 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 D1027117A16; Thu, 3 Dec 2026 22:02:30 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, 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 ovTLxFNvJSdu; Thu, 3 Dec 2026 22:02:27 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376832-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 14C21117A17; Thu, 3 Dec 2026 22:02:18 +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 C565E2D37C; Thu, 3 Dec 2026 19:01:44 +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=1796324504; b=YsGqfaDiANjW1mk7iShKbJhGaGd0zFgFX9A+tER7GuVqnIOXUEhOiMQNk8z8d0k9S2bd Yc76HYRMJLKEY0cM/DEqSO6wBULztwBZ7c0DHEjroNvH25zeBab3KCksMNHuOQg+a9sY4 CwHq2jg6bOgfffou+vfIe2lODrhcmuPb2xoIpgJs5MQOtAk1x/K2/JTscnRcby1VqZWm2 p+zJ6xYDJxkHNlIdBMeCjf4TANaBppskrsT3EXITo0rcWp4DnpQceqifnlqu4SyUoL5Z9 9R56y5r+5Pl4CpWQnH/BMnGqQdoFtWiiFkmAucqbAUAZnhYnd2LaqA/eNtKQ+Zhf3mw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796324504; 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=Wa3B5IQJSlkkYAUevHdP8HknCXCmxN5Fk/UrsYpJ42Q=; b=ZigR7wo1h3Bz9j5p94HaDIGT7mkI9g2XcU7I4YQy0bgIvvLvdq+fimCYO4oa5+wY1He4 sE0JuJdoUtj9rGZeQlJTSUEXnU8VBT54WpfMweOnzAfiyi826BnuK0XjBIvTBYSAVPfNO gz5/6UGUdiELETLC60J5G20oU9IGQ0PeD/ojGtP1hfPWCSyFioy+wYhfeHVDPsHGKPSq/ m1BSkNvpXg9u3LOWV8h3ofknGKY+l5s6KYHHkoDjsQ2y/pbEp2uW/rB8U+Nvk089Srby1 oYJ6NxhRwY5msm16aIw0DUIwc7jfKN9Tm24y3S4cszgb3c2XPqzod7dWwAGIcAS9+bA== 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=GMpRa24M; 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 9A2C6606A32F; Thu, 3 Dec 2026 19:01:44 +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=GMpRa24M 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=1796324503; b=T65yd59xmsFADpeqmwjrSs7TunKd5nozLKmE9KXn7wHDlaBaOSa56koPsZ/JsX8GQPOH nv7mA5pAgMyb9kid5BdHHDZgU90BR7gzkaaRELLFg4W2mAEGcUvuRVMM/cr6GnpBFYor2 Fr4t1GXggs4i3etJBbuqTqTbs8sfSLBhnX5PWzpolBGwQUpnRlgxVSexMY3X8PH2q6asi Hc3YMTz+B7JuyS6JkkVTT6QlbEmF1RHsDBMZAlzA1vF1HsD0eD9VuCRMr62nly+oZSFzp RKNED+/QpyPqy0Mke9760eB0Ua7Gzqlxywwu5ZfXums3+SR8yRQgKaCyiEtltYV28iQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796324503; 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=Wa3B5IQJSlkkYAUevHdP8HknCXCmxN5Fk/UrsYpJ42Q=; b=AuFC+EMXJjdOz+j1Pa7qlqe3MMnP3+PwmPsFyiKRpIR/tisU+aSlLchs9+Xdv/MwaN8U XRP+Zb5e10zkv4/2p6u9YnMK6yVJ3vYSkBc1SdcZltfdH5AC3hSZj3OY8T8hCTmr030LM 262Bb+bV6dlcte8wc3U3S+r+9uGrGb8wy1ToisskFrck1fTNcS1duR/mr470B/Ok+CGpG JbxYiVp6AcoA+qBumcf1hlSOOyDuYSeJrQ1RNLw7344qu6hpVsRUGdoTzH/XV5rdmOnhl Vdn7/L+uZFgYAT+6GFhzqep7HvuowknKAbl9VeeQCFW4bx4sOzlXuEeMm0YIMbWVQCA== 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=GMpRa24M; 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 BB6F2606A338; Thu, 3 Dec 2026 19:01:43 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA0891F0092C; Thu, 3 Dec 2026 19:01:42 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796324503; bh=Wa3B5IQJSlkkYAUevHdP8HknCXCmxN5Fk/UrsYpJ42Q=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=GMpRa24MvFiUN6G/00VWJWd2MBUCFwJE7RPmXpRf/4dF7U2OEg+on8K/MmphsdyYK hDWpjw0VIg220XkskInrgC/OaBwi6zXJGBnXDX5seSP6s+2TMW4lxB5dnrBkTFG8hk D1/pmdB7s8aBb4dKodS5lpp2yk8ZIl5roJ39k0icIlMSoSWcSVoJzF8Rr22cOZOLVz nxozTVtBLZaeLyPjEf1rH6QzgA0X+3ACq5x5HbhLgCRRMZDhu3NdyHott6a4fZYsR4 sE3qnjpbPpbg4qdEzcXYdk2Du0hNoPsEi/Bu3i+cWzzgbO4KU2/YuDX8uwxAt4xYdP YT2rklJ3itihw== X-Cc: dsahern@kernel.org, idosch@nvidia.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, willemb@google.com, horms@kernel.org, shuah@kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org X-In-Reply-To: <20261202182545.19656-3-deliran@verdict.gg> X-sashiko-severity: Medium 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