summaryrefslogtreecommitdiffstats
path: root/zebra/rib.h
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-10-17 21:38:54 +0200
committerStephen Worley <sworley@cumulusnetworks.com>2019-10-18 22:59:25 +0200
commit2a99ab95e63758f3a38b8ff0973fbd74ddb409d9 (patch)
treed78bc36d24418dd4955024f7c10513ac46228dbc /zebra/rib.h
parentMerge pull request #5180 from mjstapp/fix_nhrp_sa (diff)
downloadfrr-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.h7
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);