From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA0891F0092C; Thu, 3 Dec 2026 19:01:42 +0000 (UTC) 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== Subject: Re: [PATCH net-next v5 2/2] selftests: net: pmtu: Add IPv6 multipath tests From: netdev-bot+sashiko@kernel.org To: deliran@verdict.gg 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 Date: Thu, 03 Dec 2026 19:01:42 +0000 Message-ID: <179632450234.3146.6973852608752869161@kernel.org> In-Reply-To: <20261202182545.19656-3-deliran@verdict.gg> References: <20261202182545.19656-3-deliran@verdict.gg> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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