]> 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)
commit91d705c27aa0501e4d0f333c6a477fa9a72b664d
tree60589c31a616d6790be94e7278118e517b17106a
parentb0d1be484e62ff59a4eeef9689d0f4ac103d8a7e
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