• David S. Miller's avatar
    net: Improve simple_tx_hash(). · b6b2fed1
    David S. Miller authored
    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>
    b6b2fed1
dev.c 116 KB