Skip to content

Commit 9ecd05a

Browse files
cjubrankuba-moo
authored andcommitted
selftests: drv-net: Fix and clarify TC bandwidth split in devlink_rate_tc_bw.py
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. Signed-off-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Nimrod Oren <noren@nvidia.com> Link: https://patch.msgid.link/20251130091938.4109055-6-cjubran@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 3796e54 commit 9ecd05a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tools/testing/selftests/drivers/net/hw/devlink_rate_tc_bw.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@
2121
----------
2222
1. test_no_tc_mapping_bandwidth:
2323
- Verifies that without TC mapping, bandwidth is NOT distributed according to
24-
the configured 80/20 split between TC4 and TC3
25-
- This test should fail if bandwidth matches the 80/20 split without TC
24+
the configured 20/80 split between TC3 and TC4
25+
- This test should fail if bandwidth matches the 20/80 split without TC
2626
mapping
27-
- Expected: Bandwidth should NOT be distributed as 80/20
27+
- Expected: Bandwidth should NOT be distributed as 20/80
2828
2929
2. test_tc_mapping_bandwidth:
3030
- Configures TC mapping using mqprio qdisc
3131
- Verifies that with TC mapping, bandwidth IS distributed according to the
32-
configured 80/20 split between TC3 and TC4
33-
- Expected: Bandwidth should be distributed as 80/20
32+
configured 20/80 split between TC3 and TC4
33+
- Expected: Bandwidth should be distributed as 20/80
3434
3535
Bandwidth Distribution:
3636
----------------------
37-
- TC3 (VLAN 101): Configured for 80% of total bandwidth
38-
- TC4 (VLAN 102): Configured for 20% of total bandwidth
37+
- TC3 (VLAN 101): Configured for 20% of total bandwidth
38+
- TC4 (VLAN 102): Configured for 80% of total bandwidth
3939
- Total bandwidth: 1Gbps
4040
- Tolerance: +-12%
4141
@@ -402,10 +402,10 @@ def run_bandwidth_distribution_test(cfg, set_tc_mapping):
402402

403403
def test_no_tc_mapping_bandwidth(cfg):
404404
"""
405-
Verifies that bandwidth is not split 80/20 without traffic class mapping.
405+
Verifies that bandwidth is not split 20/80 without traffic class mapping.
406406
"""
407-
pass_bw_msg = "Bandwidth is NOT distributed as 80/20 without TC mapping"
408-
fail_bw_msg = "Bandwidth matched 80/20 split without TC mapping"
407+
pass_bw_msg = "Bandwidth is NOT distributed as 20/80 without TC mapping"
408+
fail_bw_msg = "Bandwidth matched 20/80 split without TC mapping"
409409
is_mlx5 = "driver: mlx5" in ethtool(f"-i {cfg.ifname}").stdout
410410

411411
if run_bandwidth_distribution_test(cfg, set_tc_mapping=False):
@@ -419,13 +419,13 @@ def test_no_tc_mapping_bandwidth(cfg):
419419

420420
def test_tc_mapping_bandwidth(cfg):
421421
"""
422-
Verifies that bandwidth is correctly split 80/20 between TC3 and TC4
422+
Verifies that bandwidth is correctly split 20/80 between TC3 and TC4
423423
when traffic class mapping is set.
424424
"""
425425
if run_bandwidth_distribution_test(cfg, set_tc_mapping=True):
426-
ksft_pr("Bandwidth is distributed as 80/20 with TC mapping")
426+
ksft_pr("Bandwidth is distributed as 20/80 with TC mapping")
427427
else:
428-
raise KsftFailEx("Bandwidth did not match 80/20 split with TC mapping")
428+
raise KsftFailEx("Bandwidth did not match 20/80 split with TC mapping")
429429

430430

431431
def main() -> None:

0 commit comments

Comments
 (0)