• Petr Machata's avatar
    mlxsw: spectrum: Include RFC-2819 counters in stats length · 9897dce2
    Petr Machata authored
    The function mlxsw_sp_port_get_sset_count() is supposed to return the
    total number of ethtool strings that mlxsw supports. Specifically for
    names of statistic counters (the only string type that mlxsw supports
    as of now), that number is stored in MLXSW_SP_PORT_ETHTOOL_STATS_LEN.
    However, when adding RFC-2891 counters, that define wasn't updated to
    include the new counters. As a result, ethtool snips out the counters
    towards the end of the list, which contains per-TC counters, and only
    the first three traffic classes end up being reported.
    
    Fix by adding MLXSW_SP_PORT_HW_RFC_2819_STATS_LEN as appropriate.
    
    Fixes: 1222d15a ("mlxsw: spectrum: Expose counters for various packet sizes")
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9897dce2
spectrum.c 141 KB