diff options
author | Andy Gospodarek <gospo@broadcom.com> | 2018-01-10 00:06:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-10 23:27:45 +0300 |
commit | 8115b750dbcbeb3aa412f18b7a8b0aee4d35b079 (patch) | |
tree | b4fa5607f5f7e5655abca1b0f0fd6524e20a1c4d /drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | |
parent | 4c4dbb4a7363ce56c77cf8eb2090f67c1b0aa2cc (diff) | |
download | linux-8115b750dbcbeb3aa412f18b7a8b0aee4d35b079.tar.xz |
net/dim: use struct net_dim_sample as arg to net_dim
Simplify the arguments net_dim() by formatting them into a struct
net_dim_sample before calling the function.
Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
Suggested-by: Tal Gilboa <talgi@mellanox.com>
Acked-by: Tal Gilboa <talgi@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c index a1c94fdc7174..f292bb346985 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c @@ -78,11 +78,14 @@ int mlx5e_napi_poll(struct napi_struct *napi, int budget) for (i = 0; i < c->num_tc; i++) mlx5e_cq_arm(&c->sq[i].cq); - if (MLX5E_TEST_BIT(c->rq.state, MLX5E_RQ_STATE_AM)) - net_dim(&c->rq.dim, - c->rq.cq.event_ctr, - c->rq.stats.packets, - c->rq.stats.bytes); + if (MLX5E_TEST_BIT(c->rq.state, MLX5E_RQ_STATE_AM)) { + struct net_dim_sample dim_sample; + net_dim_sample(c->rq.cq.event_ctr, + c->rq.stats.packets, + c->rq.stats.bytes, + &dim_sample); + net_dim(&c->rq.dim, dim_sample); + } mlx5e_cq_arm(&c->rq.cq); mlx5e_cq_arm(&c->icosq.cq); |