diff options
author | Petr Machata <petrm@mellanox.com> | 2018-03-11 10:45:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-12 18:07:15 +0300 |
commit | 918ee5073b0e253649083d731a88588b5c1723a3 (patch) | |
tree | 425c07f80a2358d362f91a0524ec02d26a474598 /drivers/net/ethernet/mellanox | |
parent | 129cf5f7f19658db343edbdfbda5b95d2756cb2a (diff) | |
download | linux-918ee5073b0e253649083d731a88588b5c1723a3.tar.xz |
net: ipv6: Introduce ip6_multipath_hash_policy()
In order to abstract away access to the
ipv6.sysctl.multipath_hash_policy variable, which is not available on
systems compiled without IPv6 support, introduce a wrapper function
ip6_multipath_hash_policy() that falls back to 0 on non-IPv6 systems.
Use this wrapper from mlxsw/spectrum_router instead of a direct
reference.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index a8a578610a7b..921bd1075edf 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -7031,7 +7031,7 @@ static void mlxsw_sp_mp4_hash_init(char *recr2_pl) static void mlxsw_sp_mp6_hash_init(char *recr2_pl) { - bool only_l3 = !init_net.ipv6.sysctl.multipath_hash_policy; + bool only_l3 = !ip6_multipath_hash_policy(&init_net); mlxsw_sp_mp_hash_header_set(recr2_pl, MLXSW_REG_RECR2_IPV6_EN_NOT_TCP_NOT_UDP); |