Skip to content
Commit adc6c7ec authored by Petr Machata's avatar Petr Machata Committed by David S. Miller
Browse files

selftests: Move two functions from mlxsw's qos_lib to lib



The function humanize() is used for converting value in bits/s to a
human-friendly approximate value in Kbps, Mbps or Gbps. There is nothing
hardware-specific in that, so move the function to lib.sh.

Similarly for the rate() function, which just does a bit of math to
calculate a rate, given two counter values and a time interval.

Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a44f58c4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment