OSDN Git Service

mlxsw: spectrum_qdisc: Add mlxsw_sp_qdisc_get_class_stats()
authorPetr Machata <petrm@mellanox.com>
Fri, 24 Jan 2020 13:23:08 +0000 (15:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 Jan 2020 09:56:31 +0000 (10:56 +0100)
commit3d0d592193dce954bf5ccac5128080830dd8e982
treecfdd19112dae3e73f2e8031982f3b46cb44a4cd8
parentcf9af379cd672d6873ae97ec416148708c6575e9
mlxsw: spectrum_qdisc: Add mlxsw_sp_qdisc_get_class_stats()

Add a wrapper around mlxsw_sp_qdisc_collect_tc_stats() and
mlxsw_sp_qdisc_update_stats() for the simple case of doing both in one go:
mlxsw_sp_qdisc_get_class_stats(). Dispatch to that function from
mlxsw_sp_qdisc_get_red_stats(). This new function will be useful for other
leaf Qdiscs as well.

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