• Eran Ben Elisha's avatar
    net/mlx5e: Present SW stats when state is not opened · 8bfaf07f
    Eran Ben Elisha authored
    The driver can present all SW stats even when the state not opened.
    Fixed get strings, count and stats to support it.
    
    In addition, fix tc2txq to hold a static mapping which doesn't depend on
    the amount of open channels, and cannot have the same value on two
    different cells  while moving between configurations.
    Example:
    - OOB 16 channels
    - Change to 2 channels, 8 TCs
    - tc2txq[15][0] == tc2txq[1][7] == 15
    This will cause multiple appearances of the same TX index in statistics
    output.
    
    Fixes: 76c3810bade3 ("net/mlx5e: Avoid reset netdev stats on configuration changes")
    Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    8bfaf07f
en_stats.c 44 KB