]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Introduce router lock
authorIdo Schimmel <idosch@mellanox.com>
Fri, 21 Feb 2020 17:54:09 +0000 (19:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Feb 2020 05:24:51 +0000 (21:24 -0800)
commit62b68234f039ae33a18ad37ae7e9a9009bdaebe3
tree282b61da6f92065b961c32b7a2aa6b582103a04b
parente331b6d84670103c47803404607f9301d9dd5a3e
mlxsw: spectrum_router: Introduce router lock

Introduce a mutex to protect the internal structure of the routing code.
A single lock is added instead of a more fine-grained and complicated
locking scheme because there is not a lot of concurrency in the routing
code.

The main motivation is remove the dependence on RTNL lock, which is
currently used by both the process pushing routes to the kernel and the
workqueue pushing the routes to the underlying device.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h