]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Present SW stats when state is not opened
authorEran Ben Elisha <eranbe@mellanox.com>
Tue, 29 May 2018 07:54:47 +0000 (10:54 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 1 Jun 2018 23:48:14 +0000 (16:48 -0700)
commit26171a0a2f2e0c5961ca81effbf1a070f922fc12
treefdef3609ad237511fa25bf7477ccb947455fa36b
parent5aca534b1f84e2c6ba9a3c5d45cdfce4cdd93f44
net/mlx5e: Present SW stats when state is not opened

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: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c