mlxsw: spectrum_router: Make abort mechanism VR-aware
commitb5d90e6d6b19477c49ad699c173bbcfa3e4725bd
authorIdo Schimmel <idosch@mellanox.com>
Fri, 10 Mar 2017 07:53:43 +0000 (10 08:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 17:36:06 +0000 (10 09:36 -0800)
tree9ddca0bb5ff2420cdb00f4af763a7ca22a7278aa
parent6913229eea27e63df086f55372e52021727fd0a7
mlxsw: spectrum_router: Make abort mechanism VR-aware

When the abort mechanism is invoked it binds the first virtual router
(VR) to an LPM tree and inserts a default route to direct packets to the
CPU.

With VRFs, we can have router interfaces (RIFs) bound to multiple VRs,
so we need to make sure packets are trapped from all VRs and not just
the first one.

Upon abort invocation, bind all active VRs to the same LPM tree and
insert a default route in each.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c