net/mlx5e: Reorder update stats
authorSaeed Mahameed <saeedm@mellanox.com>
Wed, 28 Dec 2016 15:07:17 +0000 (17:07 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 19 Jan 2017 21:20:04 +0000 (23:20 +0200)
Reorder update stats flow to update most important counters last,
to get more accurate results.

New update order:
- PCIe counters
- Port counters
- Vport counters
- Queue counters
- Software counters

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Gal Pressman <galp@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c

index 9aed892cd35056dab9a41b2a408bfce7db810138..3a06c81ef85e1cccd854da645475bf047f7708dd 100644 (file)
@@ -321,11 +321,11 @@ static void mlx5e_update_pcie_counters(struct mlx5e_priv *priv)
 
 void mlx5e_update_stats(struct mlx5e_priv *priv)
 {
-       mlx5e_update_q_counter(priv);
-       mlx5e_update_vport_counters(priv);
+       mlx5e_update_pcie_counters(priv);
        mlx5e_update_pport_counters(priv);
+       mlx5e_update_vport_counters(priv);
+       mlx5e_update_q_counter(priv);
        mlx5e_update_sw_counters(priv);
-       mlx5e_update_pcie_counters(priv);
 }
 
 void mlx5e_update_stats_work(struct work_struct *work)