net/mlx5e: Introducing new statistics rwlock
authorShalom Lagziel <shaloml@mellanox.com>
Mon, 12 Feb 2018 15:43:07 +0000 (17:43 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 25 May 2018 21:11:01 +0000 (14:11 -0700)
commit868a01a27d80a59e719f0c369d1b26b923fc7674
treeaefd1c9fa55e565eac83f94251da3cb1d16d3fe9
parent6ab75516cf35c4789ca8baa206b21fdbc03c7870
net/mlx5e: Introducing new statistics rwlock

Introduce a new read/write lock that will protect statistics gathering from
netdev channels configuration changes.
e.g. when channels are being replaced (increase/decrease number of rings)
prevent statistic gathering (ndo_get_stats64) to read the statistics of
in-active channels (channels that are being closed).

Plus update channels software statistics on the fly when calling
ndo_get_stats64, and remove it from stats periodic work.

Fixes: 9218b44dcc05 ("net/mlx5e: Statistics handling refactoring")
Signed-off-by: Shalom Lagziel <shaloml@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h