aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/sysctl_net_ipv6.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@OSS.NVIDIA.COM>2021-05-17 21:15:23 +0300
committerDavid S. Miller <davem@davemloft.net>2021-05-18 13:27:32 -0700
commit73c2c5cbb15a8a82d5bea52594b0beb038963bcc (patch)
tree0ed851c3888c527b7e641f8b052d0af130f1443b /net/ipv6/sysctl_net_ipv6.c
parentipv6: Add a sysctl to control multipath hash fields (diff)
downloadlinux-dev-73c2c5cbb15a8a82d5bea52594b0beb038963bcc.tar.xz
linux-dev-73c2c5cbb15a8a82d5bea52594b0beb038963bcc.zip
ipv6: Add custom multipath hash policy
Add a new multipath hash policy where the packet fields used for hash calculation are determined by user space via the fib_multipath_hash_fields sysctl that was introduced in the previous patch. The current set of available packet fields includes both outer and inner fields, which requires two invocations of the flow dissector. Avoid unnecessary dissection of the outer or inner flows by skipping dissection if none of the outer or inner fields are required. In accordance with the existing policies, when an skb is not available, packet fields are extracted from the provided flow key. In which case, only outer fields are considered. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/sysctl_net_ipv6.c')
-rw-r--r--net/ipv6/sysctl_net_ipv6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index ce23c8f7ceb3..160bea5db973 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -23,6 +23,7 @@
#endif
static int two = 2;
+static int three = 3;
static int flowlabel_reflect_max = 0x7;
static int auto_flowlabels_max = IP6_AUTO_FLOW_LABEL_MAX;
static u32 rt6_multipath_hash_fields_all_mask =
@@ -152,7 +153,7 @@ static struct ctl_table ipv6_table_template[] = {
.mode = 0644,
.proc_handler = proc_rt6_multipath_hash_policy,
.extra1 = SYSCTL_ZERO,
- .extra2 = &two,
+ .extra2 = &three,
},
{
.procname = "fib_multipath_hash_fields",