[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18107.47927.676454.739240@notabene.brown>
Date: Fri, 10 Aug 2007 11:11:19 +1000
From: Neil Brown <neilb@...e.de>
To: chuck.lever@...cle.com
Cc: Aurélien Charbon
<aurelien.charbon@....bull.net>,
Mailing list NFSv4 <nfsv4@...ux-nfs.org>,
netdev ML <netdev@...r.kernel.org>
Subject: Re: [PATCH 1/1] NFS: change the ip_map cache code to handle IPv6
addresses
On Thursday August 9, chuck.lever@...cle.com wrote:
> >>
> >> 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
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists