From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: tom@herbertland.com, netdev@vger.kernel.org
Subject: Re: [PATCH v2 net-next 1/5] net: Get skb hash over flow_keys structure
Date: Tue, 12 May 2015 10:30:46 -0400 (EDT) [thread overview]
Message-ID: <20150512.103046.1807865055959150687.davem@davemloft.net> (raw)
In-Reply-To: <1431406606.566.62.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.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.
next prev parent reply other threads:[~2015-05-12 14:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 3:26 [PATCH v2 net-next 0/5] net: Increase inputs to flow_keys hashing Tom Herbert
2015-05-12 3:26 ` [PATCH v2 net-next 1/5] net: Get skb hash over flow_keys structure Tom Herbert
2015-05-12 4:56 ` Eric Dumazet
2015-05-12 14:30 ` David Miller [this message]
2015-05-12 3:26 ` [PATCH v2 net-next 2/5] net: Add full IPv6 addresses to flow_keys Tom Herbert
2015-05-12 3:26 ` [PATCH v2 net-next 3/5] net: Add VLAN ID " Tom Herbert
2015-05-12 3:26 ` [PATCH v2 net-next 4/5] net: Add IPv6 flow label " Tom Herbert
2015-05-12 3:26 ` [PATCH v2 net-next 5/5] net: Add GRE keyid in flow_keys Tom Herbert
2015-05-12 4:33 ` Eric Dumazet
2015-05-12 4:50 ` Eric Dumazet
2015-05-12 14:51 ` Tom Herbert
2015-05-12 16:06 ` Eric Dumazet
2015-05-15 12:48 ` [PATCH net-next] net: fix two sparse errors Eric Dumazet
2015-05-15 14:35 ` Sabrina Dubroca
2015-05-15 14:52 ` Eric Dumazet
2015-05-15 15:23 ` Sabrina Dubroca
2015-05-15 16:14 ` Eric Dumazet
2015-05-15 15:27 ` Tom Herbert
2015-05-15 15:54 ` Sabrina Dubroca
2015-05-15 16:19 ` David Miller
2015-05-15 16:26 ` Sabrina Dubroca
2015-05-15 15:11 ` Tom Herbert
2015-05-17 18:11 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150512.103046.1807865055959150687.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).