summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_stats.c
diff options
context:
space:
mode:
authorNĂ©lio Laranjeiro <nelio.laranjeiro@6wind.com>2017-11-23 10:22:32 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-01-16 18:47:49 +0100
commit01d79216e68e5fa5f79ef09bfcb9344b9d56800e (patch)
tree404891c18323f30a598d38580d171b6820ddf661 /drivers/net/mlx5/mlx5_stats.c
parent992300f402b60717ffc5d6cf3a8e71c4e485d14c (diff)
downloaddpdk-01d79216e68e5fa5f79ef09bfcb9344b9d56800e.zip
dpdk-01d79216e68e5fa5f79ef09bfcb9344b9d56800e.tar.gz
dpdk-01d79216e68e5fa5f79ef09bfcb9344b9d56800e.tar.xz
net/mlx5: remove get priv internal function
mlx5_get_priv() is barely use across the driver. To avoid mixing access, this function is definitely removed. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_stats.c')
-rw-r--r--drivers/net/mlx5/mlx5_stats.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 2427585..c11ee57 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -319,7 +319,7 @@ priv_xstats_reset(struct priv *priv)
int
mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
- struct priv *priv = mlx5_get_priv(dev);
+ struct priv *priv = dev->data->dev_private;
struct rte_eth_stats tmp = {0};
unsigned int i;
unsigned int idx;
@@ -425,7 +425,7 @@ int
mlx5_xstats_get(struct rte_eth_dev *dev,
struct rte_eth_xstat *stats, unsigned int n)
{
- struct priv *priv = mlx5_get_priv(dev);
+ struct priv *priv = dev->data->dev_private;
int ret = xstats_n;
if (n >= xstats_n && stats) {
@@ -455,7 +455,7 @@ mlx5_xstats_get(struct rte_eth_dev *dev,
void
mlx5_xstats_reset(struct rte_eth_dev *dev)
{
- struct priv *priv = mlx5_get_priv(dev);
+ struct priv *priv = dev->data->dev_private;
struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
int stats_n;
@@ -487,7 +487,7 @@ int
mlx5_xstats_get_names(struct rte_eth_dev *dev,
struct rte_eth_xstat_name *xstats_names, unsigned int n)
{
- struct priv *priv = mlx5_get_priv(dev);
+ struct priv *priv = dev->data->dev_private;
unsigned int i;
if (n >= xstats_n && xstats_names) {