]> 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)
commitb01319d1faf0a513f9693984fc4b3884343b3b2c
treece90e75ca0084737d4b48e8261e674b5e1421b70
parent9ffd0c9119eac1b3158c9d9260e074ef4a9b6d63
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