mlxsw: spectrum_dpipe: Take router lock from dpipe code
authorIdo Schimmel <idosch@mellanox.com>
Fri, 21 Feb 2020 17:54:11 +0000 (19:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Feb 2020 05:24:51 +0000 (21:24 -0800)
commit6a5c69cd5512b450816fa75b46ac244a980ad09f
tree96e2c2c5c0ba565dd8579b170438df782bdea169
parent894276e85c1602b0b7e309ed03700380cdf3245c
mlxsw: spectrum_dpipe: Take router lock from dpipe code

The dpipe code traverses internal router structures such as neighbours
and adjacency entries and dumps them to user space via netlink. Up until
now the routing code did not have its own locks and relied on RTNL lock
to serialize access. This is going to change with the introduction of
the router lock.

Take the router lock in the code paths where RTNL lock is currently
taken so that the latter could be removed by subsequent patches.

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_dpipe.c