]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Add support for nexthop group consolidation for IPv6
authorArkadi Sharshevsky <arkadis@mellanox.com>
Mon, 14 Aug 2017 19:09:20 +0000 (21:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Aug 2017 05:23:32 +0000 (22:23 -0700)
commitab38557f73a37113f69e07d0e84d57999c2f75a8
tree9a0060c8f47419902d1531fa1ca46a9569411978
parentc527eabbc8f3bbff212a8201a053842f9794a62d
mlxsw: spectrum_router: Add support for nexthop group consolidation for IPv6

Due to limited ASIC resources the maximum number of routes is limited by
the nexthop resource. In order to improve the routing scale nexthop
consolidation should be performed.

This patch adds support for IPv6 neighbor consolidation. The hash value
is calculated based on the nexthop set, by performing bitwise xor on the
ifindexs of the nexthops, in a similar way to IPv4's kernel implementation.
In case of collision a full match is performed between the sets which
include address and ifindex comparison.

Non gateway nexthop groups are not inserted to the hash table due to
lack of nexthop device (ifindex).

Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Reviewed-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