From 4b2e6df26168a22464fd62ba727ac14bc26b632d Mon Sep 17 00:00:00 2001 From: Shahaf Shuler Date: Sun, 5 Mar 2017 14:02:48 +0200 Subject: [PATCH] net/mlx5: fix extended statistics counters identification Checking whether the counter is IB counter was performed with the wrong index. Fixes: 859081d3fbbf ("net/mlx5: add out of buffer counter to extended statistic") Cc: stable@dpdk.org Signed-off-by: Shahaf Shuler Acked-by: Adrien Mazarguil --- 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 1953293308..703f48c3a0 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -253,7 +253,7 @@ priv_xstats_init(struct priv *priv) } } 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", -- 2.20.1