mlxsw: spectrum_router: Prepare for nexthops with trap action
authorIdo Schimmel <idosch@nvidia.com>
Mon, 22 Mar 2021 15:58:47 +0000 (17:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Mar 2021 20:45:46 +0000 (13:45 -0700)
commit1be2361e3ca715cd9315c3c4ebede8cdcfcbf7d5
treeb501320d81b6564ccecb7aa33fd74d690df09854
parent031d5c16065606efc387aa6865690037c13cefc4
mlxsw: spectrum_router: Prepare for nexthops with trap action

Nexthops that need to be programmed with a trap action might not have a
valid router interface (RIF) associated with them. Therefore, use the
loopback RIF created during initialization to program them to the
device.

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