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=1796498464; b=4IaXec425Z4uqFOAXJDgyqJlJ5HveIDdYntYe1kPwUODfD1H9R3eLL9mA1+FIjPy5kpy kstdYtPukrK7dGmMgP2aYjQpYR5Nr9LgtUvuO+I0x1+DWwBjn/j+EfplHCE3E9SHrVjPW R/LWqW3eVNZNgVm2j9J6zNwQFDe0x910JnL+nkfkgkr7IBKFp6CD7vIBg3e5oGJP9gvPC eMg7Z5fy1XAHX9e4RwyXm81lsl1i873ITqpwcQ4Zptq21FbeTYZfbWNVut779m+xHb1/R /T4heTbX80dB9w7X5jv9EPUMpeeFujRsG+LZPBfcvHPxDP5oU7d1I0wzAe1IZEq+f/g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796498464; 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=pCJ3vOAFvF3CEL8dqDsGS/xXtT3S5Cv6wbAFC/lELL0=; b=g5308lAt4VYhaAJxWN6MCldT7AHtiVg3UTQrvqC+ntk2vI3eR/oijbBRU5jirpiH17X9 1r0IdYjLx9jE1n8Ys8+DeNoTCWcJZiXG2uAghk7k8xnUUniUZ6VmD2vqDSjAQt4utKeLS g3CDVKgVFgJrVGx19oc5+QUlW//CvE4ST84ntHzFmwVOF13nSueTV5cjyfuIKuFAQ2koS F1T9zTkT8On4HCZIBKcY1ZyHu/OpLSCYoEC7H+aTO0vy928VArqVyVg0UDLDiGhfkjf0A YmvNCw66Fj4IKk8wVihwROoT++hQPi0WXwKWz5FPsUi7vNSiIquKzddF8rHe5OGAW1A== 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=Tg6bpULv; 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 0C1C1606A322 for ; Sat, 5 Dec 2026 19:21:04 +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=Tg6bpULv Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40DEC1F0092B; Sat, 5 Dec 2026 19:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796498463; bh=pCJ3vOAFvF3CEL8dqDsGS/xXtT3S5Cv6wbAFC/lELL0=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Tg6bpULvvxgqg/ZCMNDPqCmMQRZBIwN1sCSZqJnUJ4EGNer0BiEwCi+T0rOHycfJf EZJKYHvqWBhzy4RjR5ISSe3q4C7s5iaQWSFgl1G1F9oPGDfdBkX7AwprT3R0EplBt8 cJn4GppJHXrdMc7VJ4w8D5yN3NAwZNF9T8MTOp+CeIDORDNdiPssaiQ2U+JjQyUPT3 lW3JqaNPOUYKoRMowd8+AmRybLLTMaDdCgV8h20g1RiGy391FRr1/AAI36aqciifCa rzSoggieYDVUXk44ybMl1HS+O+SXzNno4DNCvx0ID88AHRx6LKFmIts01pmFl4vq2O Yt2sPGjhwhZgg== Subject: Re: [PATCH net-next v3 13/13] selftests: net: ipvs: check a PMTU learned after the DR route was cached From: netdev-bot+sashiko@kernel.org To: dsahern@kernel.org Cc: netdev@vger.kernel.org, idosch@nvidia.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, ralf@mandelbit.com, ja@ssi.bg, dahern@nvidia.com, noreply@anthropic.com Date: Sat, 05 Dec 2026 19:21:02 +0000 Message-ID: <179649846281.3148.13079176381668961620@kernel.org> In-Reply-To: <20261201174021.7211-14-dsahern@kernel.org> References: <20261201174021.7211-14-dsahern@kernel.org> 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 5 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 4 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] test_dr_v6_pmtu() in tools/testing/selftests/net/netfilter/ipvs.sh can pass on a kernel… - [Low] The new top-level `checktool "python3 -c pass" "run test without python3"` in tools/testing/selftests/net/netfilter/ipvs.sh runs before… - [Low] The commit message carries the trailer 'Co-Authored-By: Claude Sonnet 5.5 '. - [Low] The header comment of udp_send_v6() in tools/testing/selftests/net/netfilter/ipvs.sh says it sends 'one UDP… - [Low] test_dr_v6_pmtu() in tools/testing/selftests/net/netfilter/ipvs.sh never checks the exit… -- selftests: net: ipvs: check a PMTU learned after the DR route was cached This adds an IPv6 DR mode test to ipvs.sh. The test caches the director's route to the real server, forges a packet too big message so the director learns a PMTU for the real server, and then checks that an oversized datagram gets a packet too big message back to the client. It also adds CONFIG_IP_VS_IPV6 and CONFIG_IP_VS_PROTO_UDP to the netfilter selftest config. > Co-Authored-By: Claude Sonnet 5.5 [Severity: Low] This isn't a bug, but Co-Authored-By is not in $signature_tags in scripts/checkpatch.pl. Running checkpatch on this patch will warn "Non-standard signature: Co-Authored-By:". Documentation/process/coding-assistants.rst in this tree does not define an AI attribution trailer. It also forbids an AI Signed-off-by, so Co-developed-by can't be used either. Could the attribution follow a convention the maintainers accept, or move below the --- line? > diff --git a/tools/testing/selftests/net/netfilter/ipvs.sh b/tools/testing/selftests/net/netfilter/ipvs.sh > index 9c9d5b38ab712..556ce071035ec 100755 > --- a/tools/testing/selftests/net/netfilter/ipvs.sh > +++ b/tools/testing/selftests/net/netfilter/ipvs.sh [ ... ] > @@ -54,6 +60,7 @@ fi > > checktool "ipvsadm -v" "run test without ipvsadm" > checktool "socat -h" "run test without socat" > +checktool "python3 -c pass" "run test without python3" [Severity: Low] On a system without python3, does this skip the existing IPv4 DR, NAT and tunnel tests as well? checktool() in netfilter/lib.sh exits the whole script: checktool (){ if ! $1 > /dev/null 2>&1; then echo "SKIP: Could not $2" exit $ksft_skip fi } The IPv4 tests only need socat, and before this patch they ran without python3. Only test_dr_v6_pmtu() uses python3, through udp_send_v6() and send_ptb_v6(). Could the python3 check move into test_dr_v6_pmtu() so that only that test is skipped? [ ... ] > @@ -169,6 +176,74 @@ test_tun() { > test_service > } > > +# Send one UDP datagram of ${2} bytes from the client to the IPv6 service and > +# keep the socket open for a moment, so that a packet too big message for it > +# is accepted. > +udp_send_v6() { > + ip netns exec "${ns0}" python3 -c ' > +import socket, sys, time > +s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) > +s.bind((sys.argv[1], 0)) > +s.sendto(b"x" * int(sys.argv[3]), (sys.argv[2], int(sys.argv[4]))) > +time.sleep(0.5) > +' "${cip_v6}" "${vip_v6}" "${1}" "${port}" > +} [Severity: Low] This isn't a bug, but the comment says the datagram is ${2} bytes. The size actually comes from ${1}, which is passed as sys.argv[3]. Should the comment say ${1}? [ ... ] > +test_dr_v6_pmtu() { [ ... ] > + ip netns exec "${ns1}" ip addr add "${vip_v6}/128" dev lo nodad > + ip netns exec "${ns1}" ipvsadm -A -u "[${vip_v6}]:${port}" -s rr > + ip netns exec "${ns1}" ipvsadm -a -u "[${vip_v6}]:${port}" \ > + -r "[${rip_v6}]:${port}" -g [Severity: Low] What happens here if ip_vs was built without CONFIG_IP_VS_IPV6? Neither ipvsadm call has its exit status checked, so the test carries on with no service. The datagrams to vip_v6 would then be delivered locally in ns1. Nothing listens on the port there, and they are never forwarded to the real server. The first check still passes. ns1 learns the PMTU from the forged packet too big through icmpv6_err()->ip6_update_pmtu(), without IPVS being involved. The second check then reports "FAIL: director kept using a route that bypasses the learned PMTU", which points at route caching instead of the missing IPVS feature. The config fragment in this patch covers CI builds, but other configs would hit this. Should a failed ipvsadm call make the test skip, or fail with a message that names the real cause? > + > + ip netns exec "${ns2}" ip addr add "${rip_v6}/64" dev veth21 nodad > + ip netns exec "${ns2}" ip addr add "${vip_v6}/128" dev lo nodad > + > + # Let the director cache its route to the real server > + udp_send_v6 100 > + > + send_ptb_v6 1280 > + sleep 0.2 > + if ! ip netns exec "${ns1}" ip -6 route get "${rip_v6}" | grep -q "mtu 1280"; then > + echo "FAIL: director did not learn the PMTU of the real server" > + return 1 > + fi > + > + # A datagram that exceeds the PMTU must be answered with a packet too > + # big message, which gives the client a PMTU for the service > + udp_send_v6 1400 > + if ! ip netns exec "${ns0}" ip -6 route get "${vip_v6}" | grep -q "mtu 1280"; then > + echo "FAIL: director kept using a route that bypasses the learned PMTU" > + return 1 > + fi > +} [Severity: Medium] Can this test pass on a kernel that lacks the ip6_dst_check() behaviour it is meant to cover? setup() brings up veth10 and veth12 in ns1 and then waits only one second: ip netns exec "${ns1}" ip link set veth10 up ... ip netns exec "${ns1}" ip link set veth12 up ... sleep 1 setup_ns() does not disable accept_dad, so the link-local addresses on veth10 and veth12 are still tentative at that point. addrconf_dad_kick() waits a random delay of up to rtr_solicit_delay (1s) before the first NS. DAD succeeds RETRANS_TIME (1s) after that, so each interface finishes DAD somewhere between 1s and 2s after link up. When DAD completes, addrconf_dad_completed() calls rt_genid_bump_ipv6(). __ipv6_ifa_notify() then inserts the host route with ip6_ins_rt(), and fib6_add() bumps the generation again. ip6_dst_check() checks the generation before it gets to the exception check: net/ipv6/route.c:ip6_dst_check() { ... if (!rt6_is_valid(rt)) return NULL; ... rt6_uncached_clone_superseded(rt, from))) ... } Suppose an ns1 link-local address finishes DAD after "udp_send_v6 100" and before "udp_send_v6 1400". The cached dst then fails the check for an unrelated reason. __ip_vs_get_out_rt_v6() looks the route up again through ip6_route_output() and picks up the 1280 MTU exception. The client gets a packet too big message whether or not rt6_uncached_clone_superseded() works. The window between the two sends runs from roughly 1.1-1.6s to roughly 2.0-2.6s after link up. That covers most of the DAD completion range for both ns1 interfaces, so a false pass seems likely on most runs. Would setting accept_dad=0 in ns1 before the links come up make this deterministic? Another option is to wait until "ip -n $ns1 -6 addr show tentative" is empty before the first udp_send_v6. -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201174021.7211-1-dsahern%40kernel.org