zebra: NHE hash reduce calls to jhash

Reduce the two calls to jhash to one jhash_3words() call
to save some more hashing time.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
Stephen Worley 2019-08-12 11:09:46 -04:00
parent cba6a409cf
commit 62991a1167

View File

@ -362,9 +362,8 @@ uint32_t zebra_nhg_hash_key(const void *arg)
uint32_t key = 0x5a351234; uint32_t key = 0x5a351234;
key = jhash_2words(nhe->vrf_id, nhe->afi, key); key = jhash_3words(nhe->vrf_id, nhe->afi, nexthop_group_hash(nhe->nhg),
key);
key = jhash_1word(nexthop_group_hash(nhe->nhg), key);
return key; return key;
} }