diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2020-05-13 14:32:13 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2020-09-28 12:40:59 -0400 |
| commit | 54c89c9377685e32010ab1f788b2a19c0bc3531b (patch) | |
| tree | 0c3e604646bd67b9230d151058fdcb9a9358197f /lib/zclient.c | |
| parent | 16b20ad0628ee98537c79ae7e018303ad1de8aca (diff) | |
zebra: NHG ID bounds macros
Determine the NHG ID spacing and lower bound with ZEBRA_ROUTE_MAX
in macros.
Directly set the upperbound to be the lower 28bits of the uint32_t ID
space (the top 4 are reserved for l2-NHGs). Round that number down
a bit to make it more even.
Convert all former lower_bound calls to just use the macro.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index deb5f519bd..b73dc688fb 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -4081,13 +4081,5 @@ uint32_t zclient_get_nhg_start(uint32_t proto) { assert(proto < ZEBRA_ROUTE_MAX); - return ZEBRA_NHG_SPACING * proto; -} - -/* - * Where do routing protocols IDs start overall (first ID after zebra) - */ -uint32_t zclient_get_nhg_lower_bound() -{ - return ZEBRA_NHG_SPACING * (ZEBRA_ROUTE_CONNECT + 1); + return ZEBRA_NHG_PROTO_SPACING * proto; } |
