summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en.h
diff options
context:
space:
mode:
authorGal Pressman2017-05-10 14:10:33 +0200
committerSaeed Mahameed2017-06-15 23:19:32 +0200
commit3834a5e62617603673474ada9831aa4bda955e03 (patch)
treedada90898c8a8354418e0d022a381935e168e386 /drivers/net/ethernet/mellanox/mlx5/core/en.h
parentnet/mlx5e: Move and optimize query out of buffer function (diff)
downloadkernel-qcow2-linux-3834a5e62617603673474ada9831aa4bda955e03.tar.gz
kernel-qcow2-linux-3834a5e62617603673474ada9831aa4bda955e03.tar.xz
kernel-qcow2-linux-3834a5e62617603673474ada9831aa4bda955e03.zip
net/mlx5e: Optimize update stats work
Unlike ethtool stats, get_stats ndo provides information cached by update stats work that is running in the background without updating them explicitly. We cannot update all counters inside the ndo because some updates require firmware commands that cannot be performed under a spinlock. update_stats work does not need to update ALL counters, since only some of them are needed by ndo_get_stats. This patch will allow for a minimal run of update_stats using an extra parameter which will update necessary counters only and cut 13 firmware commands in each iteration of the work. Work duration previous to this patch: ~4200us. Work duration after this patch: ~700us (17% of the original time). Signed-off-by: Gal Pressman <galp@mellanox.com> Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Cc: kernel-team@fb.com
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index a0516b0a5273..8094e78292de 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -822,7 +822,7 @@ void mlx5e_rx_am(struct mlx5e_rq *rq);
void mlx5e_rx_am_work(struct work_struct *work);
struct mlx5e_cq_moder mlx5e_am_get_def_profile(u8 rx_cq_period_mode);
-void mlx5e_update_stats(struct mlx5e_priv *priv);
+void mlx5e_update_stats(struct mlx5e_priv *priv, bool full);
int mlx5e_create_flow_steering(struct mlx5e_priv *priv);
void mlx5e_destroy_flow_steering(struct mlx5e_priv *priv);