datapath: Rehash 16-bit skbuff hashes into 32 bits.
authorJesse Gross <jesse@nicira.com>
Wed, 25 Jun 2014 01:28:08 +0000 (18:28 -0700)
committerJesse Gross <jesse@nicira.com>
Wed, 25 Jun 2014 15:12:05 +0000 (08:12 -0700)
commit18819c01184dab02196d25a2b1dd758829a4bb9e
tree02211d16b2e8d65c75291ba16a73f6e468eefabe
parentdaded0421c7b746c4ce54b6f79061918ed440edf
datapath: Rehash 16-bit skbuff hashes into 32 bits.

Currently, if the network stack provides skb->rxhash then we use it,
otherwise we compute our own. However, on at least some versions of
RHEL/CentOS, the stack provides a hash that is 16 bits rather than
32 bits. In cases where we use the uppermost bits of the hash this
is particularly bad because we detect that a hash is present and we
use it rather than computing our own but the result is always zero.

This is particularly noticible with tunnel ports that use the hash
to generate a source port, such as VXLAN. On these kernels the tunnel
source port is always the minimum value. To solve this problem while
still taking advantage of the precomputed hash, this rehashes the
hash so that the entropy is spread throughout 32 bits.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
acinclude.m4
datapath/linux/compat/include/linux/skbuff.h