diff options
author | Tom Herbert <tom@herbertland.com> | 2015-06-04 18:16:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-05 00:44:30 +0200 |
commit | 42aecaa9bb2bd57eb8d61b4565cee5d3640863fb (patch) | |
tree | 1f6198f7e7aaccaf60a51a1e69aca366a7fd1374 /include/net/ip.h | |
parent | net: Remove superfluous setting of key_basic (diff) | |
download | linux-42aecaa9bb2bd57eb8d61b4565cee5d3640863fb.tar.xz linux-42aecaa9bb2bd57eb8d61b4565cee5d3640863fb.zip |
net: Get skb hash over flow_keys structure
This patch changes flow hashing to use jhash2 over the flow_keys
structure instead just doing jhash_3words over src, dst, and ports.
This method will allow us take more input into the hashing function
so that we can include full IPv6 addresses, VLAN, flow labels etc.
without needing to resort to xor'ing which makes for a poor hash.
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 9b976cf99122..16cfc87fed6c 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -360,6 +360,8 @@ static inline void inet_set_txhash(struct sock *sk) struct inet_sock *inet = inet_sk(sk); struct flow_keys keys; + memset(&keys, 0, sizeof(keys)); + keys.addrs.src = inet->inet_saddr; keys.addrs.dst = inet->inet_daddr; keys.ports.src = inet->inet_sport; |