]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Avoid expensive lookup during route removal
authorIdo Schimmel <idosch@mellanox.com>
Sun, 8 Oct 2017 09:53:26 +0000 (11:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Oct 2017 17:05:27 +0000 (10:05 -0700)
commitcae6f47548fccb588812aac35071357b9f768937
tree3b9ce1d50117a1ad187714628b8ccda0cb5b0c88
parent5ba357a7e0876612402cc5a7daf3aedf8249445c
mlxsw: spectrum_router: Avoid expensive lookup during route removal

In commit 8cbd61b03cca ("mlxsw: spectrum_router: Use one LPM tree for
all virtual routers") I increased the scale of supported VRFs by having
all of them share the same LPM tree.

In order to avoid look-ups for prefix lengths that don't exist, each
route removal would trigger an aggregation across all the active virtual
routers to see which prefix lengths are in use and which aren't and
structure the tree accordingly.

With the way the data structures are currently laid out, this is a very
expensive operation. When preformed repeatedly - due to the invocation
of the abort mechanism - and with enough VRFs, this can result in a hung
task.

For now, avoid this optimization until it can be properly re-added in
net-next.

Fixes: 8cbd61b03cca ("mlxsw: spectrum_router: Use one LPM tree for all virtual routers")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: David Ahern <dsa@cumulusnetworks.com>
Tested-by: David Ahern <dsa@cumulusnetworks.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