]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net/mlx4_en: get rid of ret_stats
authorEric Dumazet <edumazet@google.com>
Wed, 25 May 2016 16:50:38 +0000 (09:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 May 2016 05:15:50 +0000 (22:15 -0700)
commit9ed17db17fb01a7be5b84558b768c091bdf8bb41
tree43fd2851d5d3984ea4f19dabec28885e8970b61c
parent45acbac609e73991dd9c3c9b7ffd03ddb8c939ef
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>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h