]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Use different seeds for ECMP and LAG hash
authorIdo Schimmel <idosch@mellanox.com>
Tue, 11 Jun 2019 07:19:40 +0000 (10:19 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Jun 2019 18:08:14 +0000 (11:08 -0700)
commit774d5cdf8778ba04ec52a767ae9731cb4cad7cd2
tree9b44fd720cc7784141fbcd5564c52008e45f429e
parentd1c306792352a09afbbf169997f2ffd95f7b3a84
mlxsw: spectrum: Use different seeds for ECMP and LAG hash

The same hash function and seed are used for both ECMP and LAG hash.
Therefore, when a LAG device is used as a nexthop device as part of an
ECMP group, hash polarization can occur and all the traffic will be
hashed to a single LAG slave.

Fix this by using a different seed for the LAG hash.

Fixes: 33a24e0cf164 ("mlxsw: spectrum: Use a stable ECMP/LAG seed")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Alex Veber <alexve@mellanox.com>
Tested-by: Alex Veber <alexve@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