diff options
author | Stephen Worley <sworley@cumulusnetworks.com> | 2020-07-22 19:45:47 +0200 |
---|---|---|
committer | Stephen Worley <sworley@cumulusnetworks.com> | 2020-09-28 18:41:00 +0200 |
commit | 8155e8c592199b27d73b800f471447f27add8826 (patch) | |
tree | d92755932baca1a69ea236060b3bab6d073eb082 /zebra/zebra_nhg.h | |
parent | sharpd: implement NHG notification handling (diff) | |
download | frr-8155e8c592199b27d73b800f471447f27add8826.tar.xz frr-8155e8c592199b27d73b800f471447f27add8826.zip |
zebra: add flag track released state of proto NHGS
Add a flag to track the released state of a proto-based NHG.
This flag is used to know whether the upper level proto has called
the *_del API. Typically, the NHG would just get removed and uninstalled
at this point but there is a chance we are being sent it while routes
are still being owned or we were sent it multiple times. This flag
and associated code handles that.
Ticket: CM-30369
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_nhg.h')
-rw-r--r-- | zebra/zebra_nhg.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/zebra/zebra_nhg.h b/zebra/zebra_nhg.h index 6c9f20d0a..d8aafbf2c 100644 --- a/zebra/zebra_nhg.h +++ b/zebra/zebra_nhg.h @@ -110,9 +110,20 @@ struct nhg_hash_entry { #define NEXTHOP_GROUP_BACKUP (1 << 4) /* + * The NHG has been release by an upper level protocol via the + * `zebra_nhg_proto_del()` API. + * + * We use this flag to track this state in case the NHG is still being used + * by routes therefore holding their refcnts as well. Otherwise, the NHG will + * be removed and uninstalled. + * + */ +#define NEXTHOP_GROUP_PROTO_RELEASED (1 << 5) + +/* * Track FPM installation status.. */ -#define NEXTHOP_GROUP_FPM (1 << 5) +#define NEXTHOP_GROUP_FPM (1 << 6) }; /* Was this one we created, either this session or previously? */ |