]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Add support for IPv6 non-equal-cost multipath
authorIdo Schimmel <idosch@mellanox.com>
Fri, 12 Jan 2018 16:15:59 +0000 (17:15 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Jan 2018 17:06:15 +0000 (12:06 -0500)
commitfcb7f257425c27be552cf89a98b146d42f358374
treef2e7449ae6073775d5d507cc30d8f74b65ed15df
parent039b61aab5145dce75e70e2c9bf92100132ecf76
mlxsw: spectrum_router: Add support for IPv6 non-equal-cost multipath

Since commit 992912c9ca17 ("mlxsw: spectrum_router: Populate adjacency
entries according to weights") the driver includes support for
non-equal-cost multipath, but IPv4 nexthops were the only user.

Now that the kernel supports weighted IPv6 nexthops, we can extend the
driver to support it as well.

This is done by assigning each nexthop its configured weight, so that it
will be populated accordingly in the device's adjacency table. The
`weight` parameter is also taken into account when comparing nexthop
groups in order not to consolidate non-identical groups.

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