mlxsw: spectrum: Use a stable ECMP/LAG seed
authorIdo Schimmel <idosch@mellanox.com>
Sun, 21 Apr 2019 07:18:34 +0000 (07:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Apr 2019 17:31:45 +0000 (10:31 -0700)
commitfa73989f26973fa8043252ae278533eda3b8a658
tree4ed425596352b9030e8c46f245724c5b0f3a4331
parent4ef6cbe80d71058dfd53f11a2801be4b6d227a4a
mlxsw: spectrum: Use a stable ECMP/LAG seed

In order to get a consistent behavior of traffic flows across reboots /
module unload, we need to use the same ECMP/LAG seed.

Calculate the seed by hashing the base MAC of the device. This results
in a seed that is both unique (to avoid polarization) and consistent.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c