summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
diff options
context:
space:
mode:
authorEric Dumazet2016-05-25 18:50:38 +0200
committerDavid S. Miller2016-05-26 07:15:50 +0200
commit9ed17db17fb01a7be5b84558b768c091bdf8bb41 (patch)
tree43fd2851d5d3984ea4f19dabec28885e8970b61c /drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
parentnet/mlx4_en: clear some TX ring stats in mlx4_en_clear_stats() (diff)
downloadkernel-qcow2-linux-9ed17db17fb01a7be5b84558b768c091bdf8bb41.tar.gz
kernel-qcow2-linux-9ed17db17fb01a7be5b84558b768c091bdf8bb41.tar.xz
kernel-qcow2-linux-9ed17db17fb01a7be5b84558b768c091bdf8bb41.zip
net/mlx4_en: get rid of ret_stats
mlx4 uses a private struct net_device_stats in a vain attempt to avoid races. This is buggy because multiple cpus could call mlx4_en_get_stats() at the same time, so ret_stats can not guarantee stable results. To fix this, we need to switch to ndo_get_stats64() as this method provides per-thread storage. This allows to reduce mlx4_en_priv bloat. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Willem de Bruijn <willemb@google.com> Cc: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mlx4_en.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4_en.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
index 9a9124031fc7..bfda84df8aae 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -484,7 +484,6 @@ struct mlx4_en_priv {
struct net_device *dev;
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
struct net_device_stats stats;
- struct net_device_stats ret_stats;
struct mlx4_en_port_state port_state;
spinlock_t stats_lock;
struct ethtool_flow_id ethtool_rules[MAX_NUM_OF_FS_RULES];