Skip to content
Commit b6b2fed1 authored by David S. Miller's avatar David S. Miller
Browse files

net: Improve simple_tx_hash().



Based upon feedback from Eric Dumazet and Andi Kleen.

Cure several deficiencies in simple_tx_hash() by using
jhash + reciprocol multiply.

1) Eliminates expensive modulus operation.

2) Makes hash less attackable by using random seed.

3) Eliminates endianness hash distribution issues.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3ee8416
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment