> > if (hashsize%2 == 0) > > hashsize--; > > Just so you don't underestimate a requirement ... :-)
Underestimating is desirable here. User gives upper bound - observe it! > (assume we are checking positive numbers ;-) We are, the variable in question, is unsigned. Actually, I now have this nice <128-byte-icache snippet which computes the next-smaller-prime, given any 32 bit unsigned. And it's fast. If the core team doesn't puke, that's what I would like to do at conntrack module load time. best regards Patrick