]> 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)
commit638b3c0ed2f90585ac662c29d5ed675112464406
tree254ca3b37da83f2aeda1d2b428a3970040fe7d89
parent3e4b66dad9c6df98b96c69013bbd53c0d3ccd3bb
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