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 <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit is contained in:
Shahaf Shuler 2017-03-05 14:02:48 +02:00 committed by Ferruh Yigit
parent b247f34601
commit 4b2e6df261

View File

@ -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",