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

Message ID 1488715368-60884-1-git-send-email-shahafs@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Shahaf Shuler March 5, 2017, 12:02 p.m. UTC
  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@dpdk.org

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

Comments

Adrien Mazarguil March 6, 2017, 8:43 a.m. UTC | #1
On Sun, Mar 05, 2017 at 02:02:48PM +0200, Shahaf Shuler wrote:
> 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@dpdk.org
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
  
Ferruh Yigit March 6, 2017, 9:50 a.m. UTC | #2
On 3/6/2017 8:43 AM, Adrien Mazarguil wrote:
> On Sun, Mar 05, 2017 at 02:02:48PM +0200, Shahaf Shuler wrote:
>> 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@dpdk.org
>>
>> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> 
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

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