mlxsw: spectrum_router: Don't assume neighbour type
authorIdo Schimmel <idosch@mellanox.com>
Tue, 18 Jul 2017 08:10:19 +0000 (10:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Jul 2017 18:57:33 +0000 (11:57 -0700)
commit58adf2c48003d1a7469fe0d0b438300ab6173031
treece90e75ca0084737d4b48e8261e674b5e1421b70
parenta6c9b5d1990577eed514110f4ba4d3bc032c57fd
mlxsw: spectrum_router: Don't assume neighbour type

Thankfully, the neighbour subsystem is agnostic to the upper protocol
and used by both IPv4 and IPv6. By removing assumptions regarding the
neighbour type we can thus re-use much of the neighbour-related code for
both IPv4 and IPv6.

For each nexthop, store its gateway IP and for nexthop group store the
neighbour table used by its nexthops.

Use this information throughout the code and remove assumption about the
neighbour type.

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