]> Gentwo Git Trees - linux/.git/commit
selftests: drv-net: Fix tolerance calculation in devlink_rate_tc_bw.py
authorCarolina Jubran <cjubran@nvidia.com>
Sun, 30 Nov 2025 09:19:38 +0000 (11:19 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Dec 2025 01:18:41 +0000 (17:18 -0800)
commit5cc1bddcfeb298fe7e67952a50894de8afa46db5
treee4401ff564f172f2a4a695ae3bca2b5d71f1452a
parent9ecd05a2c872d5eb2ae360d2907cf9375cf2ef5a
selftests: drv-net: Fix tolerance calculation in devlink_rate_tc_bw.py

Currently, tolerance is computed against the TC’s expected percentage,
making TC3 (20%) validation overly strict and TC4 (80%) overly loose.

Update BandwidthValidator to take a dict of shares and compute bounds
relative to the overall total, so that all shares are validated
consistently.

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-7-cjubran@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/hw/devlink_rate_tc_bw.py