]> nv-tegra.nvidia Code Review - linux-2.6.git/commit - net/ipv6/udp.c
udp: split sk_hash into two u16 hashes
authorEric Dumazet <eric.dumazet@gmail.com>
Sun, 8 Nov 2009 10:17:30 +0000 (10:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Nov 2009 04:53:05 +0000 (20:53 -0800)
commitd4cada4ae1c012815f95fa507eb86a0ae9d607d7
tree23cdfb3763c9140ae095bf8095c3e6b16f7b48f3
parentfdcc8aa953a1123a289791dd192090651036d593
udp: split sk_hash into two u16 hashes

Union sk_hash with two u16 hashes for udp (no extra memory taken)

One 16 bits hash on (local port) value (the previous udp 'hash')

One 16 bits hash on (local address, local port) values, initialized
but not yet used. This second hash is using jenkin hash for better
distribution.

Because the 'port' is xored later, a partial hash is performed
on local address + net_hash_mix(net)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/udp.h
include/net/sock.h
net/ipv4/udp.c
net/ipv6/udp.c