mlxsw: spectrum: Track NVE type at FIDs
authorPetr Machata <petrm@mellanox.com>
Fri, 7 Dec 2018 19:55:09 +0000 (19:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Dec 2018 20:59:08 +0000 (12:59 -0800)
commit2a36c12520683b17ce3fff674446313482e5ab5e
treeb0a47e4cc5a3d5a7a1fd0652f370aef51585893e
parent43920edf3b24b0a3d136019c816e84ffcbef83ab
mlxsw: spectrum: Track NVE type at FIDs

A follow-up patch will add support for replay and for clearing of
offload marks. These are NVE type-sensitive operations, and to be able
to dispatch them properly, a FID needs to know what NVE type is attached
to it.

Therefore, track the NVE type at struct mlxsw_sp_fid. Extend
mlxsw_sp_fid_vni_set() to take it as an argument, and add
mlxsw_sp_fid_nve_type().

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.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c