]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4: do not use priv->stats_lock in mlx4_en_auto_moderation()
authorEric Dumazet <edumazet@google.com>
Wed, 23 Nov 2016 17:46:52 +0000 (09:46 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Nov 2016 20:26:15 +0000 (15:26 -0500)
commitbc277908067dcbc71a798b850c5155deb52d3d3a
tree1f978091016d7c8c066a05d0ee6db6d9dbf331c3
parent0a0db65fc677d0e1f3b60e9047d5a5b7e5b1914c
mlx4: do not use priv->stats_lock in mlx4_en_auto_moderation()

Per RX ring packets/bytes counters are not protected by global
priv->stats_lock.

Better not confuse the reader, and use READ_ONCE() to show we read
these counters without surrounding synchronization.

Interrupt moderation is best effort, and we do not really care of
ultra precise counters.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c