summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorOr Har-Toov <ohartoov@nvidia.com>2025-12-18 17:58:32 +0200
committerLeon Romanovsky <leon@kernel.org>2026-01-05 02:42:53 -0500
commit2941abac6d0bffd6bf8f438135505b39168a0a08 (patch)
treed64e679beca447cf6f4b648cf0109042ab45fb74 /tools/perf/scripts/python
parent263d1d9975b5ac2b813c3107fe21c957b57f0a59 (diff)
downloadlinux-2941abac6d0bffd6bf8f438135505b39168a0a08.tar.gz
linux-2941abac6d0bffd6bf8f438135505b39168a0a08.zip
IB/core: Add helper to convert port attributes to data rate
Introduce ib_port_attr_to_rate() to compute the data rate in 100 Mbps units (deci-Gb/sec) from a port's active_speed and active_width attributes. This generic helper removes duplicated speed-to-rate calculations, which are used by sysfs and the upcoming new verb. Signed-off-by: Or Har-Toov <ohartoov@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Edward Srouji <edwards@nvidia.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions