• Petr Machata's avatar
    mlxsw: spectrum_qdisc: Include MC TCs in Qdisc counters · 85005b82
    Petr Machata authored
    mlxsw configures Spectrum in such a way that BUM traffic is passed not
    through its nominal traffic class TC, but through its MC counterpart TC+8.
    However, when collecting statistics, Qdiscs only look at the nominal TC and
    ignore the MC TC.
    
    Add two helpers to compute the value for logical TC from the constituents,
    one for backlog, the other for tail drops. Use them throughout instead of
    going through the xstats pointer directly.
    
    Counters for TX bytes and packets are deduced from packet priority
    counters, and therefore already include BUM traffic. wred_drop counter is
    irrelevant on MC TCs, because RED is not enabled on them.
    
    Fixes: 7b819530 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports")
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    85005b82
spectrum_qdisc.c 21.5 KB