Created
May 27, 2015 14:14
-
-
Save ronin13/b08faf84a88a04d89019 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
net_get_random_once(&inet_ehash_secret, sizeof(inet_ehash_secret)); | |
return __inet_ehashfn(laddr, lport, faddr, fport, | |
inet_ehash_secret + net_hash_mix(net)); | |
............... | |
........... | |
static inline unsigned int __inet_ehashfn(const __be32 laddr, | |
const __u16 lport, | |
const __be32 faddr, | |
const __be16 fport, | |
u32 initval) | |
{ | |
return jhash_3words((__force __u32) laddr, | |
(__force __u32) faddr, | |
((__u32) lport) << 16 | (__force __u32)fport, | |
initval); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment