diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-17 15:38:54 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-18 16:59:25 -0400 |
| commit | 2a99ab95e63758f3a38b8ff0973fbd74ddb409d9 (patch) | |
| tree | d78bc36d24418dd4955024f7c10513ac46228dbc /zebra/rib.h | |
| parent | 757c868b4b734a1cbefb008e327f658082bb6dae (diff) | |
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 b82428e54c..ee1df89c0e 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); |
