]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: NHE hash reduce calls to jhash
authorStephen Worley <sworley@cumulusnetworks.com>
Mon, 12 Aug 2019 15:09:46 +0000 (11:09 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:42 +0000 (11:13 -0400)
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>
zebra/zebra_nhg.c

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