• Petr Machata's avatar
    mlxsw: spectrum_qdisc: Introduce per-TC ECN counters · 15be36b8
    Petr Machata authored
    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 8a29581e ("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: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    15be36b8
spectrum_qdisc.c 58 KB