android_kernel_xiaomi_sm8350/net
NeilBrown 1f1e030bf7 [PATCH] knfsd: fix hash function for IP addresses on 64bit little-endian machines.
The hash.h hash_long function, when used on a 64 bit machine, ignores many
of the middle-order bits.  (The prime chosen it too bit-sparse).

IP addresses for clients of an NFS server are very likely to differ only in
the low-order bits.  As addresses are stored in network-byte-order, these
bits become middle-order bits in a little-endian 64bit 'long', and so do
not contribute to the hash.  Thus you can have the situation where all
clients appear on one hash chain.

So, until hash_long is fixed (or maybe forever), us a hash function that
works well on IP addresses - xor the bytes together.

Thanks to "Iozone" <capps@iozone.org> for identifying this problem.

Cc: "Iozone" <capps@iozone.org>

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:21 -08:00
..
802
8021q
appletalk
atm
ax25
bluetooth
bridge
core
dccp
decnet
econet
ethernet
ieee80211
ipv4
ipv6
ipx
irda
key
lapb
llc
netfilter
netlink
netrom
packet
rose
rxrpc
sched
sctp
sunrpc [PATCH] knfsd: fix hash function for IP addresses on 64bit little-endian machines. 2006-01-06 08:33:21 -08:00
unix
wanrouter
x25
xfrm
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE