From: Konstantin Khorenko <khorenko@virtuozzo.com>
Subject: [Devel] [PATCH RHEL10 COMMIT] selftests: netdevsim: skip the rate tc-bw check without tool support
Date: Tue, 25 Aug 2026 16:41:40 +0200 [thread overview]
Message-ID: <202608251441.67PEfe8n807556@f0.sw.ru> (raw)
In-Reply-To: <20260824135010.454450-1-khorenko@virtuozzo.com>
The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.39.1.16.9.vz10
------>
commit 50b3850eecab56c3fe69a1561c523bc4795c6d38
Author: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Date: Mon Aug 24 15:50:10 2026 +0200
selftests: netdevsim: skip the rate tc-bw check without tool support
The tc-bw attribute was added to devlink in iproute2 6.17, together
with the kernel side in v6.17. An older devlink has no such option and
the rate test fails on "Unknown option" instead of skipping.
Probe once in rate_test() and skip the tc-bw checks as a whole, so that
a missing option costs a single skip line rather than one per rate
object.
https://virtuozzo.atlassian.net/browse/VSTOR-139651
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
.../selftests/drivers/net/netdevsim/devlink.sh | 29 +++++++++++++++-------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/netdevsim/devlink.sh b/tools/testing/selftests/drivers/net/netdevsim/devlink.sh
index 030762b203d76..fd17fb0ec0202 100755
--- a/tools/testing/selftests/drivers/net/netdevsim/devlink.sh
+++ b/tools/testing/selftests/drivers/net/netdevsim/devlink.sh
@@ -668,6 +668,13 @@ rate_test()
{
RET=0
+ local tc_bw_supported=false
+ if devlink port function rate help 2>&1 | grep -q tc-bw; then
+ tc_bw_supported=true
+ else
+ log_test_skip "rate tc-bw" "Current iproute doesn't support rate option 'tc-bw'."
+ fi
+
echo $VF_COUNT > /sys/bus/netdevsim/devices/$DEV_NAME/sriov_numvfs
devlink dev eswitch set $DL_HANDLE mode switchdev
local leafs=`rate_leafs_get $DL_HANDLE`
@@ -691,12 +698,14 @@ rate_test()
rate=$(($rate+100))
done
- local tc_bw="0:0 1:40 2:0 3:0 4:0 5:0 6:60 7:0"
- for r_obj in $leafs
- do
- rate_attr_tc_bw_check "$r_obj" "$tc_bw" \
- "$DEBUGFS_DIR"/ports/"${r_obj##*/}"
- done
+ if $tc_bw_supported; then
+ local tc_bw="0:0 1:40 2:0 3:0 4:0 5:0 6:60 7:0"
+ for r_obj in $leafs
+ do
+ rate_attr_tc_bw_check "$r_obj" "$tc_bw" \
+ "$DEBUGFS_DIR"/ports/"${r_obj##*/}"
+ done
+ fi
local node1_name='group1'
local node1="$DL_HANDLE/$node1_name"
@@ -716,9 +725,11 @@ rate_test()
$DEBUGFS_DIR/rate_nodes/${node1##*/}/tx_max
- local tc_bw="0:20 1:0 2:0 3:0 4:0 5:20 6:60 7:0"
- rate_attr_tc_bw_check $node1 "$tc_bw" \
- "$DEBUGFS_DIR"/rate_nodes/"${node1##*/}"
+ if $tc_bw_supported; then
+ local tc_bw="0:20 1:0 2:0 3:0 4:0 5:20 6:60 7:0"
+ rate_attr_tc_bw_check $node1 "$tc_bw" \
+ "$DEBUGFS_DIR"/rate_nodes/"${node1##*/}"
+ fi
rate_node_del "$node1"
next prev parent reply other threads:[~2026-08-25 14:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 16:41 [Devel] [PATCH vz10 1/3] selftests: net: Adapt ethtool mq tests to fix in qdisc graft Eva Kurchatova
2026-08-21 16:41 ` [Devel] [PATCH vz10 2/3] selftests: netdevsim: skip the rate tc-bw check without tool support Eva Kurchatova
2026-08-24 13:48 ` Konstantin Khorenko
2026-08-24 13:50 ` [Devel] [PATCH vz10 v2] " Konstantin Khorenko
2026-08-25 14:41 ` Konstantin Khorenko [this message]
2026-08-21 16:41 ` [Devel] [PATCH vz10 3/3] selftests: netdevsim: mark ethtool-features.sh executable Eva Kurchatova
2026-08-24 14:35 ` [Devel] [PATCH vz10 v2] " Konstantin Khorenko
2026-08-24 14:37 ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko
2026-08-24 13:36 ` [Devel] [PATCH vz10 1/3] selftests: net: Adapt ethtool mq tests to fix in qdisc graft Konstantin Khorenko
2026-08-24 14:36 ` [Devel] [PATCH RHEL10 COMMIT] ms/selftests: " Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202608251441.67PEfe8n807556@f0.sw.ru \
--to=khorenko@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox