diff options
author | Eran Ben Elisha <eranbe@mellanox.com> | 2017-12-19 15:53:34 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-01-19 23:41:33 +0300 |
commit | 57d689a8ca7b360f902328da95e8b441c24823ca (patch) | |
tree | 602aebc070e5e1501cde62e7da90e3a7f0b2db15 /drivers/net/ethernet/mellanox/mlx5/core/en_main.c | |
parent | 7ca560b5af70b5f578c9bf32c8fbfbd68d22252f (diff) | |
download | linux-57d689a8ca7b360f902328da95e8b441c24823ca.tar.xz |
net/mlx5e: Add per-channel counters infrastructure, use it upon TX timeout
Add per-channel counter ch#_eq_rearm to monitor how many lost interrupt
recovery actions happened upon TX timeouts.
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_main.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 12ea5e319e38..f61f4f475497 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -178,6 +178,7 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv) struct mlx5e_sw_stats temp, *s = &temp; struct mlx5e_rq_stats *rq_stats; struct mlx5e_sq_stats *sq_stats; + struct mlx5e_ch_stats *ch_stats; int i, j; memset(s, 0, sizeof(*s)); @@ -185,6 +186,7 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv) struct mlx5e_channel *c = priv->channels.c[i]; rq_stats = &c->rq.stats; + ch_stats = &c->stats; s->rx_packets += rq_stats->packets; s->rx_bytes += rq_stats->bytes; @@ -209,6 +211,7 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv) s->rx_cache_empty += rq_stats->cache_empty; s->rx_cache_busy += rq_stats->cache_busy; s->rx_cache_waive += rq_stats->cache_waive; + s->ch_eq_rearm += ch_stats->eq_rearm; for (j = 0; j < priv->channels.params.num_tc; j++) { sq_stats = &c->sq[j].stats; @@ -3781,6 +3784,7 @@ static bool mlx5e_tx_timeout_eq_recover(struct net_device *dev, return false; netdev_err(dev, "Recover %d eqes on EQ 0x%x\n", eqe_count, eq->eqn); + sq->channel->stats.eq_rearm++; return true; } |