diff options
author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-17 21:38:54 +0200 |
---|---|---|
committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-18 22:59:25 +0200 |
commit | 2a99ab95e63758f3a38b8ff0973fbd74ddb409d9 (patch) | |
tree | d78bc36d24418dd4955024f7c10513ac46228dbc /zebra/rib.h | |
parent | Merge pull request #5180 from mjstapp/fix_nhrp_sa (diff) | |
download | frr-2a99ab95e63758f3a38b8ff0973fbd74ddb409d9.tar.xz frr-2a99ab95e63758f3a38b8ff0973fbd74ddb409d9.zip |
zebra: Handle rib updates as a thread event
If we need to batch process the rib (all tables or specific
vrf), do so as a scheduled thread event rather than immediately
handling it. Further, add context to the events so that you
narrow down to certain route types you want to reprocess.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/rib.h')
-rw-r--r-- | zebra/rib.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/rib.h b/zebra/rib.h index b82428e54..ee1df89c0 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -301,8 +301,10 @@ typedef struct rib_tables_iter_t_ { /* Events/reasons triggering a RIB update. */ typedef enum { + RIB_UPDATE_KERNEL, RIB_UPDATE_RMAP_CHANGE, - RIB_UPDATE_OTHER + RIB_UPDATE_OTHER, + RIB_UPDATE_MAX } rib_update_event_t; extern struct nexthop *route_entry_nexthop_ifindex_add(struct route_entry *re, @@ -384,7 +386,8 @@ extern struct route_entry *rib_match_ipv4_multicast(vrf_id_t vrf_id, extern struct route_entry *rib_lookup_ipv4(struct prefix_ipv4 *p, vrf_id_t vrf_id); -extern void rib_update(vrf_id_t vrf_id, rib_update_event_t event); +extern void rib_update(rib_update_event_t event); +extern void rib_update_vrf(vrf_id_t vrf_id, rib_update_event_t event); extern void rib_update_table(struct route_table *table, rib_update_event_t event); extern int rib_sweep_route(struct thread *t); |