mlxsw: spectrum_router: Expose router struct to internal users
authorIdo Schimmel <idosch@mellanox.com>
Fri, 21 Feb 2020 17:54:07 +0000 (19:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Feb 2020 05:24:51 +0000 (21:24 -0800)
commit2a60c460b5889d5892ac809f7a26ab89e2580bf8
tree1b0250ad6ce97aea3253840b7d0ce9edef5adb8a
parentf38656d067257cc43b652958dd154e1ab0773701
mlxsw: spectrum_router: Expose router struct to internal users

The dpipe code accesses internal router data structures and acquires
RTNL to protect against their changes. Subsequent patches will remove
reliance on RTNL and introduce a dedicated lock to protect router data
structures.

Publish the router struct to internal users such as the dpipe, so that
they could acquire it instead of RTNL.

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