Messages in this thread | | | Date | Wed, 31 May 2006 03:51:24 -0600 | From | "Brian F. G. Bidulock" <> | Subject | Re: Question about tcp hash function tcp_hashfn() |
| |
Evgeniy,
On Wed, 31 May 2006, Evgeniy Polyakov wrote: > 2. Compared Jenkins hash with XOR hash used in TCP socket selection code. > http://tservice.net.ru/~s0mbre/blog/2006/05/14#2006_05_14
Two problems with the comparison:
Port numbers can be collected into a 32 bit register in network byte order directly from the TCP packet without taking two 16 bit values and shifting and or'ing them.
Worse: he folded the jenkins algorith result with
h ^= h >> 16; h ^= h >> 8;
Destroying the coverage of the function.
I, for one, am not suprised that artifacts appeared in the comparison as a result of this destruction of the coverage of the hashing function. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |