]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mlxsw: spectrum: Move netdevice NB to struct mlxsw_sp
authorPetr Machata <petrm@mellanox.com>
Mon, 16 Oct 2017 14:26:35 +0000 (16:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Oct 2017 20:30:32 +0000 (21:30 +0100)
commitc30f5d012edf755959c44d71757fbf4648ad75a8
treee71fec02c0ce1a063705356e3d2942b39b0744a7
parent36c0a9dfc6613242ba1de012e2d15145cdaae805
mlxsw: spectrum: Move netdevice NB to struct mlxsw_sp

So far, all netdevice notifications that the driver cared about were
related to its own ports, and mlxsw_sp could be retrieved from the
netdevice's private data. For IP-in-IP offloading however, the driver
cares about events on foreign netdevices, and getting at mlxsw_sp or
router data structures from the handler is inconvenient.

Therefore move the netdevice notifier blocks from global scope to struct
mlxsw_sp to allow retrieval from the notifier block pointer itself.

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