net/mlx5: Change lag mutex lock to spin lock
authorMaor Gottlieb <maorg@mellanox.com>
Thu, 30 Apr 2020 19:21:40 +0000 (22:21 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 1 May 2020 19:15:38 +0000 (12:15 -0700)
commit64363e61c7bbcfa4c7d6697d96ef2e18fc311cf3
tree254ca3b37da83f2aeda1d2b428a3970040fe7d89
parent33720aaf8c2af5c0ff341a16b5048b9c7ecae569
net/mlx5: Change lag mutex lock to spin lock

The lag lock could be a spin lock, the critical section is short
and there is no need that the thread will sleep.
Change the lock that protects the LAG structure from mutex
to spin lock. It is required for next patch that need to
access this structure from context that we can't sleep.
In addition there is no need to hold this lock when query the
congestion counters.

Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/lag.c