Article View: linux.kernel.netdev
Article #22993Re: [PATCH net-next v6] selftests: net: veth: derive invalid-tx test value from kernel max
From: netdev-bot+sashiko
Date: Thu, 26 Nov 2026 09:19
Date: Thu, 26 Nov 2026 09:19
102 lines
12169 bytes
12169 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] chk_channels() in tools/testing/selftests/net/veth.sh (lines
175-196) prints " fail ..." on a mismatch but never sets `ret=1`.
- [Low] The commit message says that once "failure propagation" is fixed,
the false failure "fails the whole script".
--
selftests: net: veth: derive invalid-tx test value from kernel max
The "setting invalid channels nr" check in veth.sh used to try nproc+1
TX channels. It now reads the TX maximum the kernel reports through
ethtool -l and tries max+1. The old value can be valid on hosts where
nproc is less than num_possible_cpus().
> selftests: net: veth: derive invalid-tx test value from kernel max
>
> The "setting invalid channels nr" check treats CPUS+1 (CPUS=nproc)
> as an invalid tx count, but the kernel allows up to max_tx, for veth
[ ... ]
> the ethtool -L call succeeds and chk_channels() reports a false
> failure. With failure propagation fixed, this fails the whole script.
[Severity: Low]
Which patch provides the failure propagation fix mentioned here? In this
tree, chk_channels() only echoes on a mismatch and never sets ret=1:
tools/testing/selftests/net/veth.sh:chk_channels() {
...
if [ "$cur_rx" = "$rx" -a "$cur_tx" = "$tx" -a "$cur_combined" = "n/a" ]; then
echo " ok "
else
echo " fail rx:$rx:$cur_rx tx:$tx:$cur_tx combined:n/a:$cur_combined"
fi
}
So before this patch, the CPUS+1 false positive printed a misleading
"fail" line, but veth.sh still exited with 0.
Suppose the failure propagation change is applied or backported to
stable without this patch. Then veth.sh would fail on hosts where nproc
is less than num_possible_cpus(). veth_get_channels() reports max_tx as
dev->num_tx_queues, and ethnl_set_channels() only rejects
tx_count > max_tx.
Could the two changes go in the same series, or could this one name the
dependency? Could it also carry a Fixes tag for the commit that added
the CPUS + 1 value?
Fixes: 1ec2230fc721 ("selftests: net: veth: add tests for set_channel")
> diff --git a/tools/testing/selftests/net/veth.sh b/tools/testing/selftests/net/veth.sh
> index 9496b599d722c..bd0d19c49b7cd 100755
> --- a/tools/testing/selftests/net/veth.sh
> +++ b/tools/testing/selftests/net/veth.sh
> @@ -569,7 +569,9 @@ fi
> ip netns exec $NS_DST ethtool -L veth$DST combined 2 2>/dev/null
> chk_channels "bad setting: combined channels" $DST $CUR_RX $CUR_TX
>
> -ip netns exec $NS_DST ethtool -L veth$DST tx $((CPUS + 1)) 2>/dev/null
> +MAX_TX=`ip netns exec $NS_DST ethtool -l veth$DST |\
> + grep TX: | head -n 1 | awk '{print $2}'`
> +ip netns exec $NS_DST ethtool -L veth$DST tx $((MAX_TX + 1)) 2>/dev/null
> chk_channels "setting invalid channels nr" $DST $CUR_RX $CUR_TX
[Severity: Medium]
Can this check ever change the test result? The other checkers in
veth.sh set ret=1 on failure, for example chk_napi_ids(), and
chk_channels_carrier is called with "|| ret=1". chk_channels() does
not set ret at all.
The script ends with exit $ret. Suppose the tx_count > max_tx check in
ethnl_set_channels() or ethtool_set_channels() regressed, and
ethtool -L tx $((MAX_TX + 1)) were accepted. veth.sh would print "fail"
and still report success to kselftest.
The same applies to the other chk_channels() checks: "setting tx
channels", "setting both rx and tx channels" and "bad setting: combined
channels".
The commit message relies on failure propagation being fixed. Should
that change be part of this submission, so the updated check actually
affects the exit status?
>
> if [ $CPUS -gt 1 ]; then
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124211645.5751-2-emmaonana18%40gmail.com
Technical Details
Message-ID:
<179568476191.3135.16062946746480831699@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371990-linux-kernel-netdev=dewy.ruReferences:
<20261124211645.5751-2-emmaonana18@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371990-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v6] selftests: net: veth: derive invalid-tx test value from kernel max Date: Thu, 26 Nov 2026 09:19:21 +0000 Organization: Usenet Network Message-ID: <179568476191.3135.16062946746480831699@kernel.org> References: <20261124211645.5751-2-emmaonana18@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="425611"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:AKeOv3LObxCKg1r27eE91cvqv2I= sha256:z/Ps2rnnVlyayqGSCpUXlh4DP5rNx8B4qBFYaj+Lv1w= sha1:r37N0PwLlmIW6SbdnMOz/3WcFYA= sha256:KPrPD3JvLYfwdPqIU0XNZs1p0D68OvFzJv+k2u7xYyo= 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 C17CA125EBC; Thu, 26 Nov 2026 12:19:41 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[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] 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 chYhanVV7XwF; Thu, 26 Nov 2026 12:19:38 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-371990-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 3A423125EBA; Thu, 26 Nov 2026 12:19:29 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 7FC916098C3; Thu, 26 Nov 2026 09:19:28 +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=1795684764; b=0fapH1XtORB9LKTkiCfoLQgGRBriRq2zo9RYrKXW+Es+FaU4SyTFpN33ARzzuBCNhbxs xZTLWROp0q3DVjo59oxDMze3zB+GHALJlkxGTnxfo306vvkHEv5RGWOHdhJBe/Cw91mf6 rB1meyeojiha0KFr5VuMwyxQLJqTHTL6B5E9BoXAQQOSI1AdU8twq4ks/di5TgjAE9fcy HIQOnc21b8PrtajTlf50VrALXti8n/x0KesJdw98CqfH4x8QtYNRtlCVTIEr/nKlvYaww T4OK57TR/QPrftCGXYd2G3X/jmUIN8mdMJZe+DQWq6LWyX2Oa+1+SN7tglf2siu7IqQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795684764; 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=Q8yqgBgzTDJmfW5A1DWYJIHW8nL4dwX5V+usI6LVyyo=; b=qLBF5nnDB6r9/PhzGnxyyM7daJak95vObLbrNozMDPkZ4gTPFXTB/oMi74HhRn6qX4Jv 8ZAZphplzM6DkiPowydPJxz/WkEQUbQXWJv3Yr4f5Iw/oEbYbl9XTCNAA2DgtpcX4nTSs KXksJRZfcMZd7aEzWrChW1crU8xSm8OQkLOFfvSa1FaOTjjHyNTfnNojadZjqjD5vc9A/ d3svJFr86pYllLRr1wjZKjB0aRl3+zeaUw6zbfFxr5xgnKiJ5OIte1C1rqffskUn+s+hL Bis2a/4jRdbYhfxC6O/esHiYfRpmCRm9oAhKWDjLz/8YXFK+52XuDofPQPs/IMUkzOg== 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=m2eWfEDc; 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 D558C606A332; Thu, 26 Nov 2026 09:19:24 +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=m2eWfEDc 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=1795684764; b=3Bpp2r3MGAVpGkUJ4BgXAy+BPVcQoskYeKO0p+pwAWZbBuny2MqYpdohYUoMNd3OEQB9 byqnKyHQqQzqRolXgf3sOp0nLw6OHopPLvhLQYA6hLzPL7Ie3//gj3ZNGqVXIEpd1B/Wb 0/YL8Ta0lLQqnwyQsRCvCYUztj+9Yq+hxKgwvinD2aEpTmSvCJ3IoeP9eHxOtPauhXPUY kC32rHNlvVohaYsEmrG+b90NCa3s9XHAWznK8SLjcI5lV0afdr2Ic97bZVb0iB69KvYCu kf4EoyQRz38l4Rsdatd+XMJsuICw7l05Q42tXS/u/OdBP7e7sq6Z6iUqkdlO+4IPRqw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795684764; 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=Q8yqgBgzTDJmfW5A1DWYJIHW8nL4dwX5V+usI6LVyyo=; b=Sm3KxKKTDweSLN4PNWO1idOBFd6uCqDH+o5qcF8e/v0h1OidooOLrtfEAxEq93pmQuRS y4NA8WKeozTnZ8a3gYTQAMNjU2NNqP/GWQI0HzN1AoS3peSESH9XRjkm9zWMPfI4sbdJ3 e/jmUGcNl6R0o1fwr8NSRRMTqRmf/YuePYhuTzuzXXQU4z7YZlS9x5qpgHZs3+WB5kxKW ySqSUTF9exzcabngyqWNszfMKpHvY7OASwlwEuLDKsMvEYIL+a+D68r6BW80tnLwLUXW5 0TKHuQcQC2eJu+aifhsm0/qW7MBuGPMMrFmd+oBkZQVEUx9dBnvuNWyCQjE3K8Cj3pQ== 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=m2eWfEDc; 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 F2C5C606A31C; Thu, 26 Nov 2026 09:19:23 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CC961F000D0; Thu, 26 Nov 2026 09:19:22 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795684763; bh=Q8yqgBgzTDJmfW5A1DWYJIHW8nL4dwX5V+usI6LVyyo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=m2eWfEDckBiV4URE17VXZMhzfxL8BBTiDuHqWG7oji0R8xam1bnn93Y4ZKGUc2B1j wJlaw1uFL9zNDd0+4s5sBHAEdC4PjJToOvhMTv2qMyKoguJVMOH9pGj5jV/0262Jxj 5F7KLJRSx1PLWPMG1Df6RPSaj8nfrV2uESimdttsVM6GJPmfs2UNL/uXl7P5CdDHJ6 Hf4dx19Py7sc9NZdX7E7V3jXTCqKLN8BUSAJXyvpPFq4e4xpd0dz4AKp5PmeCHnVth Qd16UOqdiIl3H0DljYQH/Ypdusb7S5WiwVwulP2KZwscFIr1F/eWfwE0Hu9AQZnGXj USnYjonUnVm9g== X-Cc: tianyi@cloudflare.com, hangbin.liu@linux.dev, kuba@kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com, horms@kernel.org, shuah@kernel.org, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me, skhan@linuxfoundation.org, kernel-team@cloudflare.com, tianyi.gao@linux.dev X-In-Reply-To: <20261124211645.5751-2-emmaonana18@gmail.com> 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