From: "Aurélien Charbon" <aurelien.charbon@ext.bull.net>
To: cel@citi.umich.edu
Cc: Neil Brown <neilb@suse.de>, Iozone <capps@iozone.org>,
wli@holomorphy.com, nfs@lists.sourceforge.net
Subject: Re: Re: An interesting performance thing ?
Date: Fri, 16 Dec 2005 11:15:49 +0100 [thread overview]
Message-ID: <43A293D5.9020007@ext.bull.net> (raw)
In-Reply-To: <43A0BC49.3070604@citi.umich.edu>
Chuck Lever wrote:
> we might also think a little bit of the future (IPv6).
>
> IPv6 addresses are larger than IPv4 addresses, so they will need their=20
> own hash function, *or* we will have to design a reasonable hash=20
> function for variably-sized addresses now, which seems like a harder=20
> problem.
For information, in the IPv6 client support, we are currently using the=20
hash_long function by doing a xor operation between the four 32 bit=20
parts or an IPv6 address.
static inline int ip_map_hash(struct ip_map *item)
{
return hash_str(item->m_class, IP_HASHBITS) ^=20
- hash_long((unsigned long)item->m_addr.s_addr, IP_HASHBITS);
+ hash_long((unsigned long)(item->m_addr.s6_addr32[0] ^
+ item->m_addr.s6_addr32[1] ^
+ item->m_addr.s6_addr32[2] ^
+ item->m_addr.s6_addr32[3]), IP_HASHBITS);
}
Regards,
Aur=E9lien
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2005-12-16 10:14 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-14 18:22 An interesting performance thing ? Iozone
2005-12-14 22:26 ` Neil Brown
2005-12-14 22:46 ` Chuck Lever
2005-12-14 23:47 ` Iozone
2005-12-15 0:02 ` Neil Brown
2005-12-15 0:43 ` Chuck Lever
2005-12-15 0:57 ` Neil Brown
2005-12-15 0:59 ` Chuck Lever
2005-12-16 10:15 ` Aurélien Charbon [this message]
2005-12-16 14:23 ` Iozone
2005-12-15 2:32 ` J. Bruce Fields
2005-12-15 4:51 ` Iozone
2005-12-15 14:49 ` J. Bruce Fields
2005-12-15 15:36 ` Iozone
2005-12-15 16:14 ` J. Bruce Fields
2005-12-15 16:41 ` Iozone
2005-12-15 17:07 ` J. Bruce Fields
2005-12-16 1:25 ` Neil Brown
2005-12-16 3:59 ` Iozone
2005-12-14 22:50 ` Iozone
2005-12-15 2:22 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43A293D5.9020007@ext.bull.net \
--to=aurelien.charbon@ext.bull.net \
--cc=capps@iozone.org \
--cc=cel@citi.umich.edu \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.