From: Carolina Jubran <cjubran@nvidia.com>
To: Shuah Khan <shuah@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>
Cc: Gal Pressman <gal@nvidia.com>, Tariq Toukan <tariqt@nvidia.com>,
"Cosmin Ratiu" <cratiu@nvidia.com>,
Nimrod Oren <noren@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
<linux-kernel@vger.kernel.org>, <linux-kselftest@vger.kernel.org>,
<netdev@vger.kernel.org>
Subject: [PATCH v2 net 1/2] selftests: drv-net: Fix and clarify TC bandwidth split in devlink_rate_tc_bw.py
Date: Tue, 9 Sep 2025 13:13:52 +0300 [thread overview]
Message-ID: <20250909101353.3778751-2-cjubran@nvidia.com> (raw)
In-Reply-To: <20250909101353.3778751-1-cjubran@nvidia.com>
Correct the documented bandwidth distribution between TC3 and TC4
from 80/20 to 20/80. Update test descriptions and printed messages
to consistently reflect the intended split.
Fixes: 23ca32e4ead4 ("selftests: drv-net: Add test for devlink-rate traffic class bandwidth distribution")
Tested-by: Carolina Jubran <cjubran@nvidia.com>
Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Nimrod Oren <noren@nvidia.com>
---
.../drivers/net/hw/devlink_rate_tc_bw.py | 26 +++++++++----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/hw/devlink_rate_tc_bw.py b/tools/testing/selftests/drivers/net/hw/devlink_rate_tc_bw.py
index ead6784d1910..4da91e3292bf 100755
--- a/tools/testing/selftests/drivers/net/hw/devlink_rate_tc_bw.py
+++ b/tools/testing/selftests/drivers/net/hw/devlink_rate_tc_bw.py
@@ -21,21 +21,21 @@ Test Cases:
----------
1. test_no_tc_mapping_bandwidth:
- Verifies that without TC mapping, bandwidth is NOT distributed according to
- the configured 80/20 split between TC4 and TC3
- - This test should fail if bandwidth matches the 80/20 split without TC
+ the configured 20/80 split between TC3 and TC4
+ - This test should fail if bandwidth matches the 20/80 split without TC
mapping
- - Expected: Bandwidth should NOT be distributed as 80/20
+ - Expected: Bandwidth should NOT be distributed as 20/80
2. test_tc_mapping_bandwidth:
- Configures TC mapping using mqprio qdisc
- Verifies that with TC mapping, bandwidth IS distributed according to the
- configured 80/20 split between TC3 and TC4
- - Expected: Bandwidth should be distributed as 80/20
+ configured 20/80 split between TC3 and TC4
+ - Expected: Bandwidth should be distributed as 20/80
Bandwidth Distribution:
----------------------
-- TC3 (VLAN 101): Configured for 80% of total bandwidth
-- TC4 (VLAN 102): Configured for 20% of total bandwidth
+- TC3 (VLAN 101): Configured for 20% of total bandwidth
+- TC4 (VLAN 102): Configured for 80% of total bandwidth
- Total bandwidth: 1Gbps
- Tolerance: +-12%
@@ -413,10 +413,10 @@ def run_bandwidth_distribution_test(cfg, set_tc_mapping):
def test_no_tc_mapping_bandwidth(cfg):
"""
- Verifies that bandwidth is not split 80/20 without traffic class mapping.
+ Verifies that bandwidth is not split 20/80 without traffic class mapping.
"""
- pass_bw_msg = "Bandwidth is NOT distributed as 80/20 without TC mapping"
- fail_bw_msg = "Bandwidth matched 80/20 split without TC mapping"
+ pass_bw_msg = "Bandwidth is NOT distributed as 20/80 without TC mapping"
+ fail_bw_msg = "Bandwidth matched 20/80 split without TC mapping"
is_mlx5 = "driver: mlx5" in ethtool(f"-i {cfg.ifname}").stdout
if run_bandwidth_distribution_test(cfg, set_tc_mapping=False):
@@ -430,13 +430,13 @@ def test_no_tc_mapping_bandwidth(cfg):
def test_tc_mapping_bandwidth(cfg):
"""
- Verifies that bandwidth is correctly split 80/20 between TC3 and TC4
+ Verifies that bandwidth is correctly split 20/80 between TC3 and TC4
when traffic class mapping is set.
"""
if run_bandwidth_distribution_test(cfg, set_tc_mapping=True):
- ksft_pr("Bandwidth is distributed as 80/20 with TC mapping")
+ ksft_pr("Bandwidth is distributed as 20/80 with TC mapping")
else:
- raise KsftFailEx("Bandwidth did not match 80/20 split with TC mapping")
+ raise KsftFailEx("Bandwidth did not match 20/80 split with TC mapping")
def main() -> None:
--
2.38.1
next prev parent reply other threads:[~2025-09-09 10:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 10:13 [PATCH v2 net 0/2] selftests: drv-net: Fix issues in devlink_rate_tc_bw.py Carolina Jubran
2025-09-09 10:13 ` Carolina Jubran [this message]
2025-09-10 8:34 ` [PATCH v2 net 1/2] selftests: drv-net: Fix and clarify TC bandwidth split " Simon Horman
2025-09-09 10:13 ` [PATCH v2 net 2/2] selftests: drv-net: Fix tolerance calculation " Carolina Jubran
2025-09-10 8:35 ` Simon Horman
2025-09-10 8:36 ` [PATCH v2 net 0/2] selftests: drv-net: Fix issues " Simon Horman
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=20250909101353.3778751-2-cjubran@nvidia.com \
--to=cjubran@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=cratiu@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=noren@nvidia.com \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=tariqt@nvidia.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