From: Tom Herbert <hidden> Date: 2015-09-23 21:13:40
In rt6_info_hash_nhsfn replace the custom hashing over flowi6 that is
using xor with a call to common function get_hash_from_flowi6.
Signed-off-by: Tom Herbert <redacted>
---
net/ipv6/route.c | 26 +-------------------------
1 file changed, 1 insertion(+), 25 deletions(-)
@@ -421,31 +421,7 @@ static bool rt6_check_expired(const struct rt6_info *rt)staticintrt6_info_hash_nhsfn(unsignedintcandidate_count,conststructflowi6*fl6){-unsignedintval=fl6->flowi6_proto;--val^=ipv6_addr_hash(&fl6->daddr);-val^=ipv6_addr_hash(&fl6->saddr);--/* Work only if this not encapsulated */-switch(fl6->flowi6_proto){-caseIPPROTO_UDP:-caseIPPROTO_TCP:-caseIPPROTO_SCTP:-val^=(__forceu16)fl6->fl6_sport;-val^=(__forceu16)fl6->fl6_dport;-break;--caseIPPROTO_ICMPV6:-val^=(__forceu16)fl6->fl6_icmp_type;-val^=(__forceu16)fl6->fl6_icmp_code;-break;-}-/* RFC6438 recommands to use flowlabel */-val^=(__forceu32)fl6->flowlabel;--/* Perhaps, we need to tune, this function? */-val=val^(val>>7)^(val>>12);-returnval%candidate_count;+returnget_hash_from_flowi6(fl6)%candidate_count;}staticstructrt6_info*rt6_multipath_select(structrt6_info*match,
From: David Miller <davem@davemloft.net> Date: 2015-09-23 21:21:41
From: Tom Herbert <redacted>
Date: Wed, 23 Sep 2015 14:13:35 -0700
In rt6_info_hash_nhsfn replace the custom hashing over flowi6 that is
using xor with a call to common function get_hash_from_flowi6.
Signed-off-by: Tom Herbert <redacted>
From: David Miller <davem@davemloft.net> Date: 2015-09-23 21:57:31
From: David Miller <davem@davemloft.net>
Date: Wed, 23 Sep 2015 14:21:38 -0700 (PDT)
From: Tom Herbert <redacted>
Date: Wed, 23 Sep 2015 14:13:35 -0700
quoted
In rt6_info_hash_nhsfn replace the custom hashing over flowi6 that is
using xor with a call to common function get_hash_from_flowi6.
Signed-off-by: Tom Herbert <redacted>
Applied, thanks.
Tom, I just so happened to look over the call paths that lead to this
function and the flowi6 ports aren't filled in much of the time.
I know your patch doesn't change things one way or the other in this
area, but I thought I'd bring it up nonetheless.
From: Tom Herbert <hidden> Date: 2015-09-23 22:45:18
On Wed, Sep 23, 2015 at 2:57 PM, David Miller [off-list ref] wrote:
From: David Miller <davem@davemloft.net>
Date: Wed, 23 Sep 2015 14:21:38 -0700 (PDT)
quoted
From: Tom Herbert <redacted>
Date: Wed, 23 Sep 2015 14:13:35 -0700
quoted
In rt6_info_hash_nhsfn replace the custom hashing over flowi6 that is
using xor with a call to common function get_hash_from_flowi6.
Signed-off-by: Tom Herbert <redacted>
Applied, thanks.
Tom, I just so happened to look over the call paths that lead to this
function and the flowi6 ports aren't filled in much of the time.
I know your patch doesn't change things one way or the other in this
area, but I thought I'd bring it up nonetheless.
Yeah, I noticed there's still a little work to do here. On input put
we should be passing in skb to use skb->hash instead of calculating
it. On ouput we should be getting hash from sk->txhash for connected
sockets.