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

packet: Use symmetric hash for PACKET_FANOUT_HASH.



People who use PACKET_FANOUT_HASH want a symmetric hash, meaning that
they want packets going in both directions on a flow to hash to the
same bucket.

The core kernel SKB hash became non-symmetric when the ipv6 flow label
and other entities were incorporated into the standard flow hash order
to increase entropy.

But there are no users of PACKET_FANOUT_HASH who want an assymetric
hash, they all want a symmetric one.

Therefore, use the flow dissector to compute a flat symmetric hash
over only the protocol, addresses and ports.  This hash does not get
installed into and override the normal skb hash, so this change has
no effect whatsoever on the rest of the stack.

Reported-by: default avatarEric Leblond <eric@regit.org>
Tested-by: default avatarEric Leblond <eric@regit.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 08df7bc5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment