Re: [PATCH v2 net-next 1/5] net: Get skb hash over flow_keys structure
From: David Miller <davem@davemloft.net>
Date: 2015-05-12 14:30:50
From: David Miller <davem@davemloft.net>
Date: 2015-05-12 14:30:50
From: Eric Dumazet <redacted> Date: Mon, 11 May 2015 21:56:46 -0700
On Mon, 2015-05-11 at 20:26 -0700, Tom Herbert wrote:
...
This (2) is not a multiple of 4, so some arches will have unaligned word accesses ?
...
quoted
-static __always_inline u32 __flow_hash_3words(u32 a, u32 b, u32 c, u32 keyval) +static __always_inline u32 __flow_hash_words(u32 *words, u32 length, u32 keyval) { - return jhash_3words(a, b, c, keyval); + return jhash2(words, length, keyval); +} +-> crash or very slow on MIPS.
Yeah you really can't do this. You must only pass 4-byte aligned items into the hash function.