]> 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)
commit6ab68b9b498dc8b79367ca0e4db16f6cd14dd96a
tree282b61da6f92065b961c32b7a2aa6b582103a04b
parent8818ae7e043667ef0502c50571ac4d79ef93fd93
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