[dpdk-dev] [PATCH] net/mlx5: fix extended statistics counters identification

Shahaf Shuler shahafs at mellanox.com
Sun Mar 5 13:02:48 CET 2017


Checking whether the counter is IB counter was performed with the
wrong index.

Fixes: a4e3056b7018 ("net/mlx5: add out of buffer counter to extended statistic")
Cc: stable at dpdk.org

Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
---
 drivers/net/mlx5/mlx5_stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 1953293..703f48c 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -253,7 +253,7 @@ struct mlx5_counter_ctrl {
 		}
 	}
 	for (j = 0; j != xstats_n; ++j) {
-		if (priv_is_ib_cntr(mlx5_counters_init[i].ctr_name))
+		if (priv_is_ib_cntr(mlx5_counters_init[j].ctr_name))
 			continue;
 		if (xstats_ctrl->dev_table_idx[j] >= dev_stats_n) {
 			WARN("counter \"%s\" is not recognized",
-- 
1.8.3.1



More information about the dev mailing list