* [PATCH net] ipv6: Fix sysctl max for fib_multipath_hash_policy
@ 2020-09-02 13:16 Ido Schimmel
2020-09-02 15:34 ` Stephen Suryaputra
2020-09-02 22:45 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Ido Schimmel @ 2020-09-02 13:16 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, ssuryaextr, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@nvidia.com>
Cited commit added the possible value of '2', but it cannot be set. Fix
it by adjusting the maximum value to '2'. This is consistent with the
corresponding IPv4 sysctl.
Before:
# sysctl -w net.ipv6.fib_multipath_hash_policy=2
sysctl: setting key "net.ipv6.fib_multipath_hash_policy": Invalid argument
net.ipv6.fib_multipath_hash_policy = 2
# sysctl net.ipv6.fib_multipath_hash_policy
net.ipv6.fib_multipath_hash_policy = 0
After:
# sysctl -w net.ipv6.fib_multipath_hash_policy=2
net.ipv6.fib_multipath_hash_policy = 2
# sysctl net.ipv6.fib_multipath_hash_policy
net.ipv6.fib_multipath_hash_policy = 2
Fixes: d8f74f0975d8 ("ipv6: Support multipath hashing on inner IP pkts")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
net/ipv6/sysctl_net_ipv6.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index fac2135aa47b..5b60a4bdd36a 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -21,6 +21,7 @@
#include <net/calipso.h>
#endif
+static int two = 2;
static int flowlabel_reflect_max = 0x7;
static int auto_flowlabels_min;
static int auto_flowlabels_max = IP6_AUTO_FLOW_LABEL_MAX;
@@ -150,7 +151,7 @@ static struct ctl_table ipv6_table_template[] = {
.mode = 0644,
.proc_handler = proc_rt6_multipath_hash_policy,
.extra1 = SYSCTL_ZERO,
- .extra2 = SYSCTL_ONE,
+ .extra2 = &two,
},
{
.procname = "seg6_flowlabel",
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] ipv6: Fix sysctl max for fib_multipath_hash_policy
2020-09-02 13:16 [PATCH net] ipv6: Fix sysctl max for fib_multipath_hash_policy Ido Schimmel
@ 2020-09-02 15:34 ` Stephen Suryaputra
2020-09-02 22:45 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Suryaputra @ 2020-09-02 15:34 UTC (permalink / raw)
To: Ido Schimmel; +Cc: netdev, davem, kuba, mlxsw, Ido Schimmel
On Wed, Sep 02, 2020 at 04:16:59PM +0300, Ido Schimmel wrote:
> From: Ido Schimmel <idosch@nvidia.com>
>
> Cited commit added the possible value of '2', but it cannot be set. Fix
> it by adjusting the maximum value to '2'. This is consistent with the
> corresponding IPv4 sysctl.
>
> Before:
>
> # sysctl -w net.ipv6.fib_multipath_hash_policy=2
> sysctl: setting key "net.ipv6.fib_multipath_hash_policy": Invalid argument
> net.ipv6.fib_multipath_hash_policy = 2
> # sysctl net.ipv6.fib_multipath_hash_policy
> net.ipv6.fib_multipath_hash_policy = 0
>
> After:
>
> # sysctl -w net.ipv6.fib_multipath_hash_policy=2
> net.ipv6.fib_multipath_hash_policy = 2
> # sysctl net.ipv6.fib_multipath_hash_policy
> net.ipv6.fib_multipath_hash_policy = 2
>
> Fixes: d8f74f0975d8 ("ipv6: Support multipath hashing on inner IP pkts")
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
> net/ipv6/sysctl_net_ipv6.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
> index fac2135aa47b..5b60a4bdd36a 100644
> --- a/net/ipv6/sysctl_net_ipv6.c
> +++ b/net/ipv6/sysctl_net_ipv6.c
> @@ -21,6 +21,7 @@
> #include <net/calipso.h>
> #endif
>
> +static int two = 2;
> static int flowlabel_reflect_max = 0x7;
> static int auto_flowlabels_min;
> static int auto_flowlabels_max = IP6_AUTO_FLOW_LABEL_MAX;
> @@ -150,7 +151,7 @@ static struct ctl_table ipv6_table_template[] = {
> .mode = 0644,
> .proc_handler = proc_rt6_multipath_hash_policy,
> .extra1 = SYSCTL_ZERO,
> - .extra2 = SYSCTL_ONE,
> + .extra2 = &two,
> },
> {
> .procname = "seg6_flowlabel",
> --
> 2.26.2
>
Thanks for catching.
Reviewed-by: Stephen Suryaputra <ssuryaextr@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] ipv6: Fix sysctl max for fib_multipath_hash_policy
2020-09-02 13:16 [PATCH net] ipv6: Fix sysctl max for fib_multipath_hash_policy Ido Schimmel
2020-09-02 15:34 ` Stephen Suryaputra
@ 2020-09-02 22:45 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-09-02 22:45 UTC (permalink / raw)
To: idosch; +Cc: netdev, kuba, ssuryaextr, mlxsw, idosch
From: Ido Schimmel <idosch@idosch.org>
Date: Wed, 2 Sep 2020 16:16:59 +0300
> From: Ido Schimmel <idosch@nvidia.com>
>
> Cited commit added the possible value of '2', but it cannot be set. Fix
> it by adjusting the maximum value to '2'. This is consistent with the
> corresponding IPv4 sysctl.
>
> Before:
>
> # sysctl -w net.ipv6.fib_multipath_hash_policy=2
> sysctl: setting key "net.ipv6.fib_multipath_hash_policy": Invalid argument
> net.ipv6.fib_multipath_hash_policy = 2
> # sysctl net.ipv6.fib_multipath_hash_policy
> net.ipv6.fib_multipath_hash_policy = 0
>
> After:
>
> # sysctl -w net.ipv6.fib_multipath_hash_policy=2
> net.ipv6.fib_multipath_hash_policy = 2
> # sysctl net.ipv6.fib_multipath_hash_policy
> net.ipv6.fib_multipath_hash_policy = 2
>
> Fixes: d8f74f0975d8 ("ipv6: Support multipath hashing on inner IP pkts")
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Wow, how was this mode even tested...
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-02 22:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-02 13:16 [PATCH net] ipv6: Fix sysctl max for fib_multipath_hash_policy Ido Schimmel
2020-09-02 15:34 ` Stephen Suryaputra
2020-09-02 22:45 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).