[dpdk-stable] [PATCH v2 65/67] net/mlx5: fix count in xstats
Yongseok Koh
yskoh at mellanox.com
Tue Jun 5 02:41:37 CEST 2018
From: David Marchand <david.marchand at 6wind.com>
[ upstream commit 5fd4d049692b2fde8bf49c7461b18180a8fd2545 ]
With the commit af4f09f28294 ("net/mlx5: prefix all functions with mlx5"),
mlx5_xstats_get() is not compliant any longer with the api.
It always returns the caller max entries count while it should return how
many entries it wrote/wanted to write.
Fixes: af4f09f28294 ("net/mlx5: prefix all functions with mlx5")
Signed-off-by: David Marchand <david.marchand at 6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.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 7dda2691d..345ed7075 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -337,7 +337,7 @@ mlx5_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
stats[i].value = (counters[i] - xstats_ctrl->base[i]);
}
}
- return n;
+ return xstats_n;
}
/**
--
2.11.0
More information about the stable
mailing list