]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Add support for route replace
authorIdo Schimmel <idosch@mellanox.com>
Thu, 3 Aug 2017 11:28:29 +0000 (13:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Aug 2017 22:36:01 +0000 (15:36 -0700)
commit6a97d4d32409598c965d79f65833c0747e1e35d0
treec74d9f3f28f74ce4772bf96611c5a90b94ce029a
parent227b30de9f7720bb1128c0485702f67ba4f56a56
mlxsw: spectrum_router: Add support for route replace

In case we got a replace event, then the replaced route must exist. If
the route isn't capable of multipath, then replace first matching
non-multipath capable route.

If the route is capable of multipath and matching multipath capable
route is found, then replace it. Otherwise, replace first matching
non-multipath capable route.

The new route is inserted before the replaced one. In case the replaced
route is currently offloaded, then it's overwritten in the device's table
by the new route and later deleted, thus not impacting routed traffic.

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