From: David Marchand Date: Sun, 20 May 2018 08:13:58 +0000 (+0200) Subject: net/mlx5: fix count in xstats X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5fd4d049692b2fde8bf49c7461b18180a8fd2545;p=dpdk.git net/mlx5: fix count in xstats 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 Acked-by: Nelio Laranjeiro --- diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index 8e427e7442..875dd10270 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -325,7 +325,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; } /**