diff options
| author | Or Har-Toov <ohartoov@nvidia.com> | 2025-12-18 17:58:32 +0200 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-01-05 02:42:53 -0500 |
| commit | 2941abac6d0bffd6bf8f438135505b39168a0a08 (patch) | |
| tree | d64e679beca447cf6f4b648cf0109042ab45fb74 /tools/perf/scripts/python | |
| parent | 263d1d9975b5ac2b813c3107fe21c957b57f0a59 (diff) | |
| download | linux-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
