summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_stats.c
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@6wind.com>2018-05-20 10:13:58 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-05-23 00:35:01 +0200
commit5fd4d049692b2fde8bf49c7461b18180a8fd2545 (patch)
tree46023f8f858007225664b8d2bb42069b83e2c80e /drivers/net/mlx5/mlx5_stats.c
parent954b68224febbdd41de1f772de649757f8edafea (diff)
downloaddpdk-5fd4d049692b2fde8bf49c7461b18180a8fd2545.zip
dpdk-5fd4d049692b2fde8bf49c7461b18180a8fd2545.tar.gz
dpdk-5fd4d049692b2fde8bf49c7461b18180a8fd2545.tar.xz
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 <david.marchand@6wind.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_stats.c')
-rw-r--r--drivers/net/mlx5/mlx5_stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 8e427e7..875dd10 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;
}
/**