]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Propagate 'struct mlxsw_sp' further
authorIdo Schimmel <idosch@mellanox.com>
Wed, 19 Dec 2018 06:08:47 +0000 (06:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Dec 2018 20:28:07 +0000 (12:28 -0800)
commit974e36a89923e2b9eebc48715b43411c9889ff4e
tree21f62951aef8b74d96b5d501605bedef3cfdf7e3
parent37b9e38528c6cde0bdb99b8b85df7224ca4db6b2
mlxsw: spectrum_router: Propagate 'struct mlxsw_sp' further

Next patch is going to make RIF deletion more robust by removing
reliance on fragile mlxsw_sp_lower_get(). This is because a netdev is
not necessarily our upper anymore when its IP addresses are flushed.

The inet{,6}addr notification blocks are going to resolve 'struct
mlxsw_sp' using container_of(), but the functions they call still use
mlxsw_sp_lower_get().

As a preparation for the next patch, propagate 'struct mlxsw_sp' down to
the functions called from the notification blocks and remove reliance on
mlxsw_sp_lower_get().

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c