diff options
author | Eric Dumazet <edumazet@google.com> | 2019-11-04 03:24:16 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-04 20:28:49 +0100 |
commit | b6b556afd21b48a372be8ed0c0f79428022e1b7c (patch) | |
tree | ecdd12f7e9d797bb4483800436b99202d4d83d29 /net/ipv6/route.c | |
parent | net: of_get_phy_mode: Change API to solve int/unit warnings (diff) | |
download | linux-b6b556afd21b48a372be8ed0c0f79428022e1b7c.tar.xz linux-b6b556afd21b48a372be8ed0c0f79428022e1b7c.zip |
ipv6: use jhash2() in rt6_exception_hash()
Faster jhash2() can be used instead of jhash(), since
IPv6 addresses have the needed alignment requirement.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a63ff85fe141..c7a2022e64eb 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1475,11 +1475,11 @@ static u32 rt6_exception_hash(const struct in6_addr *dst, u32 val; net_get_random_once(&seed, sizeof(seed)); - val = jhash(dst, sizeof(*dst), seed); + val = jhash2((const u32 *)dst, sizeof(*dst)/sizeof(u32), seed); #ifdef CONFIG_IPV6_SUBTREES if (src) - val = jhash(src, sizeof(*src), val); + val = jhash2((const u32 *)src, sizeof(*src)/sizeof(u32), val); #endif return hash_32(val, FIB6_EXCEPTION_BUCKET_SIZE_SHIFT); } |