Re: [PATCH] netfilter: remove modulo operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:
> Le dimanche 24 octobre 2010 à 20:25 +0200, Florian Westphal a écrit :
> > I'd imagine that the result of ((hash * total) >> 32) is (almost)
> > always zero, especially if total is small (which it is usually).
> > 
> 
> Absolutely not. total is a 32bit number, using full range.
> 
> > Did you test that this change does not affect distribution average?
> 
> That would be shocking actually, given we use jhash()
> 
> I did same tricks in various parts of network stack in the past, and its
> fine.

Yes, you are right.  I tested this change and it is OK.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux