]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_qdisc: Extract a per-TC stat function
authorPetr Machata <petrm@mellanox.com>
Fri, 24 Jan 2020 13:23:07 +0000 (15:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 Jan 2020 09:56:31 +0000 (10:56 +0100)
commitad07f6c1d2bb7e1d808441c8f4b24c61ab90fe46
tree5ab1e2012b44c72fbd258d577ca3a9da48d93617
parent09192a03e484ab67153992b79f77d173039a7c31
mlxsw: spectrum_qdisc: Extract a per-TC stat function

Extract from mlxsw_sp_qdisc_get_prio_stats() two new functions:
mlxsw_sp_qdisc_collect_tc_stats() to accumulate stats for that one TC only,
and mlxsw_sp_qdisc_update_stats() that makes the stats relative to base
values stored earlier. Use them from mlxsw_sp_qdisc_get_red_stats().

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c