aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@mellanox.com>2016-10-27 09:27:22 -0400
committerDavid S. Miller <davem@davemloft.net>2016-10-29 16:23:48 -0400
commiteb4b678825992aa434d32b2f615d2090281e0f88 (patch)
treec679c85b13a9b843f7a192a525c32e2473932cfe
parentd2582a03939ed0a80ffcd3ea5345505bc8067c54 (diff)
net/mlx4_en: Save slave ethtool stats command
Following the previous patch, as an optimization, the slave will not even bother sending the DUMP_ETH_STATS command over the comm channel. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 314f54c8dbed..12c99a2655f2 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -1917,8 +1917,9 @@ static void mlx4_en_clear_stats(struct net_device *dev)
1917 struct mlx4_en_dev *mdev = priv->mdev; 1917 struct mlx4_en_dev *mdev = priv->mdev;
1918 int i; 1918 int i;
1919 1919
1920 if (mlx4_en_DUMP_ETH_STATS(mdev, priv->port, 1)) 1920 if (!mlx4_is_slave(mdev->dev))
1921 en_dbg(HW, priv, "Failed dumping statistics\n"); 1921 if (mlx4_en_DUMP_ETH_STATS(mdev, priv->port, 1))
1922 en_dbg(HW, priv, "Failed dumping statistics\n");
1922 1923
1923 memset(&priv->pstats, 0, sizeof(priv->pstats)); 1924 memset(&priv->pstats, 0, sizeof(priv->pstats));
1924 memset(&priv->pkstats, 0, sizeof(priv->pkstats)); 1925 memset(&priv->pkstats, 0, sizeof(priv->pkstats));