mlxsw: spectrum_nve: Un/offload FDB on nve_fid_disable/enable
authorPetr Machata <petrm@mellanox.com>
Fri, 7 Dec 2018 19:55:17 +0000 (19:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Dec 2018 20:59:08 +0000 (12:59 -0800)
commit8a5969d8a83d86f3542355eedcad67d47feafdab
treea6dc619dbb27695ba78669827ba2120063ee2ea1
parent83de78831b99582c0de13d7d2a5849b6bab962c8
mlxsw: spectrum_nve: Un/offload FDB on nve_fid_disable/enable

Any existing NVE FDB entries need to be offloaded when NVE is enabled
for a given FID. Recent patches have added fdb_replay op for this, so
just invoke it from mlxsw_sp_nve_fid_enable().

When NVE is disabled on a FID, any existing FDB offloaded marks need to
be cleared on NVE device as well as on its bridge master. An op to
handle this, fdb_clear_offload, has been added to FID ops and NVE ops in
previous patches. Add code to resolve the NVE device, NVE type, and
dispatch to both fdb_clear_offload ops.

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