mlxsw: spectrum_fid: Implement missing operations for rFID and dummy FID
authorAmit Cohen <amcohen@nvidia.com>
Tue, 21 Jun 2022 08:33:45 +0000 (11:33 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Jun 2022 11:56:58 +0000 (12:56 +0100)
commit048fcbb71a0e4d8a30b7bd0a497cd032b25d1186
tree31beaa3bfab7d31a13c549f9e574f1c7eca5bfc2
parent784763e59225c3baf7d97fbcda5bc7bb0dc77380
mlxsw: spectrum_fid: Implement missing operations for rFID and dummy FID

rFID and dummy FID do not support FID->VNI mapping. Currently, these
families do not implement the vni_{set, clear}() operations. Instead, there
is a check if these functions are implemented.

Similarly, 'SFMR.nve_tunnel_flood_ptr' is not relevant for rFID and dummy
FID, therefore, these families do not implement
nve_flood_index_{set, clear}().

Align the behavior to other unsupported operations, implement the functions
and just return an error or warn. Then, checks like '!ops->vni_set' can be
removed.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c