]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_qdisc: Introduce per-TC ECN counters
authorPetr Machata <petrm@nvidia.com>
Wed, 13 Oct 2021 10:37:47 +0000 (13:37 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 14 Oct 2021 00:47:18 +0000 (17:47 -0700)
commitdd56e2a0514a088014f374eca70125a7d7349fa2
tree9c12dbbbd85e66f09d7335bbaaf0d0ac36a46eb4
parent8c129220610df146ed3adeb45a2ab77995b67ec5
mlxsw: spectrum_qdisc: Introduce per-TC ECN counters

The Qdisc code in mlxsw used to report a number of packets ECN-marked on a
port. Because reporting a per-port value as a per-TC value was misleading,
this was removed in commit dbd0bddc0195 ("mlxsw: spectrum: Move the
ECN-marked packet counter to ethtool").

On Spectrum-3, a per-TC number of ECN-marked packets is available in per-TC
congestion counter group. Add a new array for the ECN counter, fetch the
values from the per-TC congestion group, and pick the value indicated by
tclass_num as appropriate.

On Spectrum-1 and Spectrum-2, this per-TC value is not available, and
zeroes will be reported, as they currently are.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c