diff options
author | Petr Machata | 2017-10-16 16:26:35 +0200 |
---|---|---|
committer | David S. Miller | 2017-10-16 22:30:32 +0200 |
commit | c30f5d012edf755959c44d71757fbf4648ad75a8 (patch) | |
tree | e71fec02c0ce1a063705356e3d2942b39b0744a7 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h | |
parent | tipc: fix rebasing error (diff) | |
download | kernel-qcow2-linux-c30f5d012edf755959c44d71757fbf4648ad75a8.tar.gz kernel-qcow2-linux-c30f5d012edf755959c44d71757fbf4648ad75a8.tar.xz kernel-qcow2-linux-c30f5d012edf755959c44d71757fbf4648ad75a8.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h index 8e45183dc9bb..e1a0157c0b94 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h @@ -161,6 +161,7 @@ struct mlxsw_sp { struct { DECLARE_BITMAP(usage, MLXSW_SP_KVD_LINEAR_SIZE); } kvdl; + struct notifier_block netdevice_nb; struct mlxsw_sp_counter_pool *counter_pool; struct { |