Re: Question about tcp hash function tcp_hashfn()



Evgeniy,

On Thu, 01 Jun 2006, Evgeniy Polyakov wrote:

for (i=0; i<hash_size*iter_num; ++i) {
saddr = num2ip(get_random_byte(), get_random_byte(), get_random_byte(), get_random_byte());
sport = get_random_word();

You still have a problem: you cannot use a pseudo-random number
generator to generate the sample set as the pseudo-random number
generator function itself can interact with the hash.

Try iterating through all 2**48 values or at least a sizeable
representative subset.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: random number question.
    ... between random numbers and pseudo-random numbers. ... They typically "gang up" on posters they think are female, ... the specifications for the generator. ... the chapter of Knuth's "The Art of Computer Programming" ...
    (comp.programming)
  • Re: random generation
    ... we need a random number generator. ... pseudo-random numbers generated with software on computers. ... If we get the same sequence of numbers every time we run the algorithm ... The cycle length is important. ...
    (sci.stat.consult)
  • Re: Testing a Pseudo-Random Generator
    ... > Testing a Pseudo-Random Generator ... > numbers (PRN). ... the next "random" number in a sequence is completely ...
    (sci.stat.math)
  • Re: ID revisited ... ( Yet another reason for abandoning numerical
    ... pseudo-random number generator, ... this generator is unlikely to be used in numerical simulation ... made based on a percentage of each ticket sold "on average". ... wins the jackpot, it is rolled over to the next round of ticket sales ...
    (talk.origins)
  • Re: Question about tcp hash function tcp_hashfn()
    ... On Thu, 01 Jun 2006, Evgeniy Polyakov wrote: ... you cannot use a pseudo-random number ... generator function itself can interact with the hash. ... but it will take ages on my test machine:) ...
    (Linux-Kernel)