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_group.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_group.h')
-rw-r--r-- | lib/nexthop_group.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/nexthop_group.h b/lib/nexthop_group.h index d96d0ab9f..f68033c20 100644 --- a/lib/nexthop_group.h +++ b/lib/nexthop_group.h @@ -47,6 +47,8 @@ void nexthop_del(struct nexthop_group *nhg, struct nexthop *nexthop); void copy_nexthops(struct nexthop **tnh, const struct nexthop *nh, struct nexthop *rparent); +uint32_t nexthop_group_hash(const struct nexthop_group *nhg); + /* The following for loop allows to iterate over the nexthop * structure of routes. * |