|
@@ -21,6 +21,7 @@
|
|
#include <linux/dcbnl.h>
|
|
#include <linux/dcbnl.h>
|
|
#include <linux/inetdevice.h>
|
|
#include <linux/inetdevice.h>
|
|
#include <linux/netlink.h>
|
|
#include <linux/netlink.h>
|
|
|
|
+#include <linux/random.h>
|
|
#include <net/switchdev.h>
|
|
#include <net/switchdev.h>
|
|
#include <net/pkt_cls.h>
|
|
#include <net/pkt_cls.h>
|
|
#include <net/tc_act/tc_mirred.h>
|
|
#include <net/tc_act/tc_mirred.h>
|
|
@@ -3666,8 +3667,10 @@ static void mlxsw_sp_traps_fini(struct mlxsw_sp *mlxsw_sp)
|
|
static int mlxsw_sp_lag_init(struct mlxsw_sp *mlxsw_sp)
|
|
static int mlxsw_sp_lag_init(struct mlxsw_sp *mlxsw_sp)
|
|
{
|
|
{
|
|
char slcr_pl[MLXSW_REG_SLCR_LEN];
|
|
char slcr_pl[MLXSW_REG_SLCR_LEN];
|
|
|
|
+ u32 seed;
|
|
int err;
|
|
int err;
|
|
|
|
|
|
|
|
+ get_random_bytes(&seed, sizeof(seed));
|
|
mlxsw_reg_slcr_pack(slcr_pl, MLXSW_REG_SLCR_LAG_HASH_SMAC |
|
|
mlxsw_reg_slcr_pack(slcr_pl, MLXSW_REG_SLCR_LAG_HASH_SMAC |
|
|
MLXSW_REG_SLCR_LAG_HASH_DMAC |
|
|
MLXSW_REG_SLCR_LAG_HASH_DMAC |
|
|
MLXSW_REG_SLCR_LAG_HASH_ETHERTYPE |
|
|
MLXSW_REG_SLCR_LAG_HASH_ETHERTYPE |
|
|
@@ -3676,7 +3679,7 @@ static int mlxsw_sp_lag_init(struct mlxsw_sp *mlxsw_sp)
|
|
MLXSW_REG_SLCR_LAG_HASH_DIP |
|
|
MLXSW_REG_SLCR_LAG_HASH_DIP |
|
|
MLXSW_REG_SLCR_LAG_HASH_SPORT |
|
|
MLXSW_REG_SLCR_LAG_HASH_SPORT |
|
|
MLXSW_REG_SLCR_LAG_HASH_DPORT |
|
|
MLXSW_REG_SLCR_LAG_HASH_DPORT |
|
|
- MLXSW_REG_SLCR_LAG_HASH_IPPROTO);
|
|
|
|
|
|
+ MLXSW_REG_SLCR_LAG_HASH_IPPROTO, seed);
|
|
err = mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(slcr), slcr_pl);
|
|
err = mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(slcr), slcr_pl);
|
|
if (err)
|
|
if (err)
|
|
return err;
|
|
return err;
|