summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_stats.c
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2019-02-21 10:29:14 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-01 18:17:35 +0100
commitdbeba4cf18a5e1d9f7aaa284457bf15c351eb965 (patch)
tree9f8a56c1cc5808838f8eda1b7b9d1faf07e36081 /drivers/net/mlx5/mlx5_stats.c
parent02d212ca3125444a70952aae79a1d679e2f83973 (diff)
downloaddpdk-dbeba4cf18a5e1d9f7aaa284457bf15c351eb965.zip
dpdk-dbeba4cf18a5e1d9f7aaa284457bf15c351eb965.tar.gz
dpdk-dbeba4cf18a5e1d9f7aaa284457bf15c351eb965.tar.xz
net/mlx: prefix private structure
The private structure stored in rte_eth_dev->data->dev_private was named "struct priv". In order to ease code browsing, the structure is renamed "struct mlx[45]_priv". Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_stats.c')
-rw-r--r--drivers/net/mlx5/mlx5_stats.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 38e8915..6906dc8 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -137,7 +137,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
static inline void
-mlx5_read_ib_stat(struct priv *priv, const char *ctr_name, uint64_t *stat)
+mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat)
{
FILE *file;
MKSTR(path, "%s/ports/1/hw_counters/%s",
@@ -169,7 +169,7 @@ mlx5_read_ib_stat(struct priv *priv, const char *ctr_name, uint64_t *stat)
static int
mlx5_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
{
- struct priv *priv = dev->data->dev_private;
+ struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
unsigned int i;
struct ifreq ifr;
@@ -236,7 +236,7 @@ mlx5_ethtool_get_stats_n(struct rte_eth_dev *dev) {
void
mlx5_stats_init(struct rte_eth_dev *dev)
{
- struct priv *priv = dev->data->dev_private;
+ struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
struct mlx5_stats_ctrl *stats_ctrl = &priv->stats_ctrl;
unsigned int i;
@@ -329,7 +329,7 @@ int
mlx5_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
unsigned int n)
{
- struct priv *priv = dev->data->dev_private;
+ struct mlx5_priv *priv = dev->data->dev_private;
unsigned int i;
uint64_t counters[n];
struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
@@ -370,7 +370,7 @@ mlx5_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
int
mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
- struct priv *priv = dev->data->dev_private;
+ struct mlx5_priv *priv = dev->data->dev_private;
struct rte_eth_stats tmp;
unsigned int i;
unsigned int idx;
@@ -435,7 +435,7 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
void
mlx5_stats_reset(struct rte_eth_dev *dev)
{
- struct priv *priv = dev->data->dev_private;
+ struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_stats_ctrl *stats_ctrl = &priv->stats_ctrl;
unsigned int i;
unsigned int idx;
@@ -469,7 +469,7 @@ mlx5_stats_reset(struct rte_eth_dev *dev)
void
mlx5_xstats_reset(struct rte_eth_dev *dev)
{
- struct priv *priv = dev->data->dev_private;
+ struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
int stats_n;
unsigned int i;
@@ -513,7 +513,7 @@ mlx5_xstats_get_names(struct rte_eth_dev *dev __rte_unused,
struct rte_eth_xstat_name *xstats_names, unsigned int n)
{
unsigned int i;
- struct priv *priv = dev->data->dev_private;
+ struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
unsigned int mlx5_xstats_n = xstats_ctrl->mlx5_stats_n;