1
0
Fork 0
alistair23-linux/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 [NET]: kfree cleanup 2005-11-08 09:41:34 -08:00
8021q [VLAN]: Add two missing checks to vlan_ioctl_handler() 2005-12-21 18:39:49 -08:00
appletalk [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
atm [NET]: move struct proto_ops to const 2006-01-03 13:11:15 -08:00
ax25 [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 2006-01-04 18:44:12 -08:00
bridge [NET]: Change 1500 to ETH_DATA_LEN in some files 2006-01-05 16:48:56 -08:00
core Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 2006-01-04 18:44:12 -08:00
dccp [DCCP] ackvec: use u8 for the buf offsets 2006-01-04 01:46:34 -02:00
decnet [DECNET]: Only use local routers 2006-01-03 14:24:02 -08:00
econet [ECONET]: Use macro for spinlock_t definition. 2006-01-04 13:56:08 -08:00
ethernet [NET]: Change 1500 to ETH_DATA_LEN in some files 2006-01-05 16:48:56 -08:00
ieee80211 [IEEE80211] ipw2200: Simplify multicast checks. 2006-01-03 15:27:38 -08:00
ipv4 [NET]: Change 1500 to ETH_DATA_LEN in some files 2006-01-05 16:48:56 -08:00
ipv6 [NET]: Change 1500 to ETH_DATA_LEN in some files 2006-01-05 16:48:56 -08:00
ipx [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
irda Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-01-04 16:34:57 -08:00
key [NET]: move struct proto_ops to const 2006-01-03 13:11:15 -08:00
lapb [NET]: Kill skb->list 2005-08-29 15:31:14 -07:00
llc [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
netfilter [NETFILTER]: Fix module_param types and permissions 2006-01-05 12:19:46 -08:00
netlink [NETLINK] genetlink: fix cmd type in genl_ops to be consistent to u8 2006-01-03 14:13:29 -08:00
netrom [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
packet [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
rose [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
rxrpc [NET]: Detect hardware rx checksum faults correctly 2005-11-10 13:01:24 -08:00
sched [INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.h 2006-01-03 13:11:21 -08:00
sctp [INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.h 2006-01-03 13:11:21 -08:00
sunrpc [PATCH] knfsd: fix hash function for IP addresses on 64bit little-endian machines. 2006-01-06 08:33:21 -08:00
unix [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
wanrouter [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
x25 [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
xfrm [LSM-IPSec]: Security association restriction. 2006-01-03 13:10:24 -08:00
Kconfig [NETFILTER] move nfnetlink options to right location in kconfig menu 2005-09-17 00:41:21 -07:00
Makefile [NETFILTER]: link 'netfilter' before ipv4 2005-11-14 15:25:59 -08:00
TUNABLE Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
compat.c [PATCH] Fix 32bit sendmsg() flaw 2005-09-08 08:14:11 -07:00
nonet.c [NET]: Fix sock_init() return value. 2006-01-03 13:11:17 -08:00
socket.c [NET]: Add a dev_ioctl() fallback to sock_ioctl() 2006-01-03 14:18:33 -08:00
sysctl_net.c [NET]: Fix "sysctl_net.c:36: error: 'core_table' undeclared here" 2005-10-03 14:16:34 -07:00