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=1796498462; b=a7Tny+Q2gQauBEqgpt8QnxnV9oebf/bdxAEBmuwrTerSFsk3Buchd08K195RxEdVa/2D aatFd37S9T+wDG1+hU56kb7mY0Jf720SrUlbxu39wijQd8vYBvLXHWhYqCJB29tGAE7D2 F8Tx65vBkrM9N2wOUBt+DEBhZuKBUiuVGMMskedUVO9z4/3T9PrA3cVmOMGBPAQdDckU1 9VDtGGYquF7kEtlczoUBbVH8TjV6Phk7ps3dZFjL+QUbK/K15ilimMhu2hMJpjWVtm6j1 pR0hkk+gs7YEX0JJ8ijkNxzfDnyZfCViBe2qeLoxfNI8kgf3mQVxQeewkWkZ1D2rG8A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796498462; 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=n4cXTl36mIkHE7R8Qk28w+Nyh1e5F/yOIrJC5OOdJ9g=; b=qH6K7sthUl5IJL4h75tFmTbfPBnlKcIVpa+4mVSKaOpW2NouJXHFeuJI1j1HPVSD/ec8 1ytz8fSV0mjae1H94rYnIgUvceiq6MJcESXC8dr95wj5jj6nKsnodbwoRDwMFJ0VDyTKz Z5Gc5ijDRUYPWjobHw2xaMrTF4aiUqPZJgzIeyCglrKY9tqF7x11AA18hhQmv1EeZO6/9 mj44cjX2JzoIPpIxPgA4u4E3+G1qMCx52xdsOkw3Po7SHxUr11+AjiQjLJuddSqhpmzKF pB3YyKxHq5c8NiRV5J4I6M1isFNd7rvicg2HXHZyAwBRyv0u9+x9wsMrCJQfTh/wJJA== 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=ipCzwOg1; 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 DA8CB606A33C for ; Sat, 5 Dec 2026 19:21:02 +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=ipCzwOg1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E133B1F00A07; Sat, 5 Dec 2026 19:21:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796498462; bh=n4cXTl36mIkHE7R8Qk28w+Nyh1e5F/yOIrJC5OOdJ9g=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ipCzwOg1dq2Tvs64wCfpjK59+0I4z8jAKVJ6nCepIetC486c5Xk8RlO1KMNCPnIow Nk/+jgWZ8PAdpiFx8CPy3qto1COm4FMGtzbdlTBZx3PWf9LdNfZ7rW/4wOfqYKu+XC MhExDRgRS+/2hGXJ3KuQxxKecHyiLwF+jS3KKhKamleoMoZcCTIWlPW1UvHrkDoQRK KrKTkMlI6FSCOVJz+txDViQloRk23UM3FcAVypwg70cxuJvaQJTIxYmeIyGuBjN0Ua ugFUekpzl9dvtWp8mGIqLRVmiMABeiibBsA+xhaD4YyqiIPVsISHwHjeK29yUqO3ps NACuCwKr1jMQQ== Subject: Re: [PATCH net-next v3 12/13] selftests: net: fib_tests: Add stale pcpu test 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:01 +0000 Message-ID: <179649846142.3148.18354584472003624041@kernel.org> In-Reply-To: <20261201174021.7211-13-dsahern@kernel.org> References: <20261201174021.7211-13-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 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 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] In tools/testing/selftests/net/fib_tests.sh, ipv6_nh_pcpu_stale_test() skips only when `$(nproc)` is below 2 (line… -- selftests: net: fib_tests: Add stale pcpu test This adds an ipv6_nh_pcpu_stale test to fib_tests.sh. The test creates a pcpu dst on CPU 0 for a route that uses a nexthop object, re-adds the route, and then checks route lookups on CPUs 0 and 1. It covers the regression fixed by commit 8f34e53b60b3 ("ipv6: Use global sernum for dst validation with nexthop objects"). > diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh > index d7ac3c727f704..dc2ac5d7f29b7 100755 > --- a/tools/testing/selftests/net/fib_tests.sh > +++ b/tools/testing/selftests/net/fib_tests.sh [ ... ] > @@ -3228,6 +3228,56 @@ ipv6_mpath_oif_vrf_test() > cleanup > } > > +ipv6_nh_pcpu_stale_test() > +{ [ ... ] > + if [ $(nproc) -lt 2 ]; then > + echo "SKIP: pcpu test requires multiple cpus" > + return $ksft_skip > + fi > + > + setup [ ... ] > + # create a pcpu dst entry on cpu 0 > + taskset -a -c 0 $IP -6 route get 2001:db8:11::1 &> /dev/null > + > + # re-add the route entry > + $IP -6 route del 2001:db8:11::1 > + $IP -6 route add 2001:db8:11::1/128 nhid 100 > + > + # cached dst on cpu 0 must have been invalidated > + for cpu in 0 1; do > + taskset -a -c $cpu $IP -6 route get 2001:db8:11::1 &> /dev/null > + log_test $? 0 "Route get on cpu $cpu after route re-add" > + done [Severity: Medium] Can ipv6_nh_pcpu_stale_test() report a FAIL when the kernel is working correctly? The skip check only looks at nproc. nproc counts the CPUs in the caller's affinity mask, and GNU nproc also honours OMP_NUM_THREADS and OMP_THREAD_LIMIT. A count of 2 or more does not mean that CPU 0 and CPU 1 exist, are online, or are allowed. Some examples: a cpuset-limited container or CI runner with cpus 2-5, a system where CPU 1 has been hot-unplugged, or a run started under taskset -c 2,3. In those cases sched_setaffinity() ends up with an empty mask and returns EINVAL, so taskset exits non-zero without running ip. Because stderr goes to /dev/null, log_test only sees the non-zero exit code. It then logs "Route get on cpu N after route re-add" as a failure. The test can also miss the regression it is meant to catch, because the result of the priming lookup is never checked: taskset -a -c 0 $IP -6 route get 2001:db8:11::1 &> /dev/null If pinning to CPU 0 fails, no pcpu dst is created on CPU 0. That means the stale dst condition is never set up. The later CPU 0 check then fails in taskset too, which hides the real cause. Could the test pick two CPUs from the allowed set instead, for example by parsing taskset -pc $$ or cpuset.cpus.effective? Another option is to skip when CPUs 0 and 1 are not both usable. Checking the result of the priming lookup would also help. -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201174021.7211-1-dsahern%40kernel.org