mlxsw: spectrum_router: Extract a helper for RIF migration
authorPetr Machata <petrm@nvidia.com>
Mon, 12 Jun 2023 15:31:08 +0000 (17:31 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Wed, 14 Jun 2023 11:12:20 +0000 (13:12 +0200)
commit440273e763f575bfd801e00a8892a9abb82fa263
treeec3d1e51f48a19f1a8e0efc98dd4788f2dcda695
parent33d11c4e5ce922bc16493fc75ad3c20cc55ed88a
mlxsw: spectrum_router: Extract a helper for RIF migration

RIF configuration contains a number of parameters that cannot be changed
after the RIF is created. For the IPIP loopbacks, this is currently worked
around by creating a new RIF with the desired configuration changes
applied, and updating next hops to the new RIF, and then destroying the old
RIF. This operation will be useful as a reusable atom, so extract a helper
to that effect.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c