mlxsw: spectrum_qdisc: Clean stats recursively when priomap changes
authorPetr Machata <petrm@nvidia.com>
Tue, 19 Oct 2021 08:07:09 +0000 (11:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Oct 2021 11:24:51 +0000 (12:24 +0100)
commit01164dda0a64498c9f8fded838e80f645e918a5d
treef534b2c8e41d4d5e25fbe0bccd201deb6c7ae642
parentbe7e2a5a58d4905c8737b64491accb803cf987a9
mlxsw: spectrum_qdisc: Clean stats recursively when priomap changes

On Spectrum, there are no per-TC TX counters. Instead, mlxsw uses per-prio
counters and aggregates them according to the priomap. Therefore when
priomap changes, the counter base values need to be reset to reflect the
change. Previously, this was only done for the sole child qdisc, but a
following patch makes RED and TBF classful. Thus apply the request to the
whole sub-tree.

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