]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Implement LPM trees management
authorJiri Pirko <jiri@mellanox.com>
Mon, 4 Jul 2016 06:23:08 +0000 (08:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2016 01:25:14 +0000 (18:25 -0700)
commita2b897e2cfe5bf3626e82d720fb8f1c119e8defd
tree60589c31a616d6790be94e7278118e517b17106a
parent33eab78c6d0113c95510e03b69e7c0ba8c1cb79a
mlxsw: spectrum_router: Implement LPM trees management

Introduce basic LPM tree management allowing to share the trees in
between tables if the used prefixes in the tables are the same.
Build the tree structure according to the used prefixes. Although it is
not optimal for many use cases, this initial implementation does only
simple linear left-tree. More advanced structures will be introduced
later on, possibly including mechanisms to change trees on the fly.

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