summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBud Grise <griseb@cisco.com>2016-02-24 16:14:22 -0500
committerGerrit Code Review <gerrit@fd.io>2016-03-02 17:23:29 +0000
commit8fbd37edacf3bc95b06d6fa620e28a08b0b0905f (patch)
tree3d2358cfe00ef4e2b206281699fed58421ec5506
parentdc03cf4eb4d2cb515d79d26f7b4cdef174ffa677 (diff)
Add rotates to v6 worker hash to prevent SIP/DIP synchronizing.
Change-Id: Ibe8ec6271b3f04290a60c0145e59a01d3130500f Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
-rw-r--r--vnet/vnet/devices/dpdk/node.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vnet/vnet/devices/dpdk/node.c b/vnet/vnet/devices/dpdk/node.c
index b9815706169..72d564ba8b2 100644
--- a/vnet/vnet/devices/dpdk/node.c
+++ b/vnet/vnet/devices/dpdk/node.c
@@ -963,9 +963,9 @@ static inline u64 ipv6_get_key (ip6_header_t *ip)
u64 hash_key;
hash_key = ip->src_address.as_u64[0] ^
- ip->src_address.as_u64[1] ^
- ip->dst_address.as_u64[0] ^
- ip->dst_address.as_u64[1] ^
+ rotate_left(ip->src_address.as_u64[1],13) ^
+ rotate_left(ip->dst_address.as_u64[0],26) ^
+ rotate_left(ip->dst_address.as_u64[1],39) ^
ip->protocol;
return hash_key;