X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fnet%2Finet6_hashtables.h;h=f071f50433a1972d6fa79f012d1635f31b2f3ae3;hb=7e122d3c7c52acfa96c2939db26e7fd3cc96a651;hp=9e34c877a77093ff1257e18941949a12391363d6;hpb=d97e1dcde5e19ed1f828baff4ab5fd0e517c8dae;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index 9e34c87..f071f50 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h @@ -28,16 +28,16 @@ struct inet_hashinfo; -/* I have no idea if this is a good hash for v6 or not. -DaveM */ static inline unsigned int inet6_ehashfn(struct net *net, const struct in6_addr *laddr, const u16 lport, const struct in6_addr *faddr, const __be16 fport) { - u32 ports = (lport ^ (__force u16)fport); + u32 ports = (((u32)lport) << 16) | (__force u32)fport; return jhash_3words((__force u32)laddr->s6_addr32[3], - (__force u32)faddr->s6_addr32[3], - ports, inet_ehash_secret + net_hash_mix(net)); + ipv6_addr_jhash(faddr), + ports, + inet_ehash_secret + net_hash_mix(net)); } static inline int inet6_sk_ehashfn(const struct sock *sk)