diff options
author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-04-02 19:57:48 +0200 |
---|---|---|
committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-04-05 20:19:44 +0200 |
commit | 1b1fe1c4090ee98908f216d13af0c766df772714 (patch) | |
tree | fb1af35e4eba4aa381fcc4f20065168f3fe66202 /lib/nexthop.h | |
parent | Merge pull request #4083 from donaldsharp/static_reinstall_nexthops (diff) | |
download | frr-1b1fe1c4090ee98908f216d13af0c766df772714.tar.xz frr-1b1fe1c4090ee98908f216d13af0c766df772714.zip |
lib: Add hash function for nexthop groups
Add a hash function to turn a nexthop group into a
32 bit unsigned hash key with jhash. We do not care to
hash any recursively resolved nexthops, just the group.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop.h')
-rw-r--r-- | lib/nexthop.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h index 9cdb040fc..24b095319 100644 --- a/lib/nexthop.h +++ b/lib/nexthop.h @@ -136,7 +136,7 @@ void nexthop_del_labels(struct nexthop *); * Returns: * 32-bit hash of nexthop */ -uint32_t nexthop_hash(struct nexthop *nexthop); +uint32_t nexthop_hash(const struct nexthop *nexthop); extern bool nexthop_same(const struct nexthop *nh1, const struct nexthop *nh2); |