]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6dd0898333b7621b6d2e5e2636f1db94c5c5cd71
tree23cdfb3763c9140ae095bf8095c3e6b16f7b48f3
parent26e0762747df5087972aedaa6bde0f83368d413a
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