mlxsw: spectrum_router: Add support for double entry RIFs
authorIdo Schimmel <idosch@nvidia.com>
Wed, 7 Dec 2022 12:36:44 +0000 (13:36 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 Dec 2022 02:46:32 +0000 (18:46 -0800)
commit5ca1b208c5d107fd4b9e7801200dea18ab1af8e7
tree05bb74f2050c67a995147edae4c2cf210c98077d
parent1a2f65b4a277fca10bb24d5615e512971a87587a
mlxsw: spectrum_router: Add support for double entry RIFs

In Spectrum-1, loopback router interfaces (RIFs) used for IP-in-IP
encapsulation with an IPv6 underlay require two RIF entries and the RIF
index must be even.

Prepare for this change by extending the RIF parameters structure with a
'double_entry' field that indicates if the RIF being created requires
two RIF entries or not. Only set it for RIFs representing ip6gre tunnels
in Spectrum-1.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c