]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Store nexthop groups in a hash table
authorIdo Schimmel <idosch@mellanox.com>
Wed, 8 Feb 2017 10:16:29 +0000 (11:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Feb 2017 20:25:15 +0000 (15:25 -0500)
commit18ba48473bd05a6aba49d9554e7bad262d378846
tree8b42a9a04d40fdf9a3ac8409698531fd4fd2781a
parentd20608b603efe05aa2c6371187535676d932738a
mlxsw: spectrum_router: Store nexthop groups in a hash table

Currently, when we're notified about a new RTN_UNICAST route we perform
a lookup on the nexthop group list looking for a group with a matching
configuration to that found in the FIB info. This is quite inefficient.

Instead, we can simply rely on the kernel to consolidate several FIB
configurations into the same FIB info and use the FIB info as the key
for our private nexthop group struct.

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.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c