[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150512.103046.1807865055959150687.davem@davemloft.net>
Date: Tue, 12 May 2015 10:30:46 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: tom@...bertland.com, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next 1/5] net: Get skb hash over flow_keys
structure
From: Eric Dumazet <eric.dumazet@...il.com>
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 ?
...
>> -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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists