]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc23bd05857b12fed4856210f3a23893f616c15da
tree254ca3b37da83f2aeda1d2b428a3970040fe7d89
parentb4e7ad5ef3d649b4a80fb80756a2da43a5982d6d
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