Thread (1 message) 1 message, 1 author, 2007-08-10

Re: [PATCH 1/1] NFS: change the ip_map cache code to handle IPv6 addresses

From: Neil Brown <hidden>
Date: 2007-08-10 01:11:32

On Thursday August 9, chuck.lever@oracle.com wrote:
quoted
quoted
How have you tested the effectiveness of the new hash function?
I have not tested that point but I can easily imagine there are better 
solutions.
Perhaps we can keep the same function for an IPv4 address (only taking 
the 32 bits of IPv4 addr), and then design one for IPv6 addresses.
I see that, to generate the hash, you would be xor-ing the FF and 00 
bytes in the canonicalized IPv4 address.  Yes, perhaps a better function 
is needed, or as you say, one specifically for IPv6 and one for 
canonicalized IPv4.
I suspect that the given hash function will be as good as any other.
The values in each byte of an IPv6 are likely to be either evenly
distributed, or constant.
Each the first case you don't need a clever hash function to
distribute them, while in the second, no hash function can improve the
distribution. 

NeilBrown
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help