]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Simplify LPM tree allocation
authorIdo Schimmel <idosch@mellanox.com>
Fri, 10 Mar 2017 07:53:40 +0000 (08:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 17:36:06 +0000 (09:36 -0800)
commitccd18e2bb5a1db70334fbf549e0694efea1fc381
tree7fa875716571ce32e25143c56bb92df028b3ddac
parent42052a0d406c7aee71b3c6990d04343f103d5202
mlxsw: spectrum_router: Simplify LPM tree allocation

When looking for a new LPM tree we should always consider all the unused
trees. It doesn't matter if the new tree is required due to changes in
currently used prefixes inside an existing routing table or because a
route was inserted into an empty table.

Both cases are functionally identical and therefore should be treated
the same.

When looking for a new LPM tree, consider all unused trees and don't
reserve trees for specific cases.

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