]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitdccaa4cf0be53eaf08859e7290328b4256c1660b
treece90e75ca0084737d4b48e8261e674b5e1421b70
parent056d0a4a3f14fba3c0537cdef5f4ee02973c84dd
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