From 590f04362a6dd546e868b5160a72443ce97547ca Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 19 Aug 2009 17:25:52 +0000 Subject: zebra: rib update in background and recursive routes Right now Zebra doesn't support recursive routes correctly when the next hop is a dynamic protocol. Imagine the case where a static route was entered to destination X.X.X.X via Y.Y.Y.Y and a protocol created a route to Y.Y.Y.Y. Any change from that protocol to Y.Y.Y.Y would might require zebra to update it's recursive route. The RIB as is doesn't have the necessary state to do this quickly, and the rib_update() and the resulting meta-queue is slow (2N) with lots of routes. That combined with the incremental updates from protocols makes the whole process potentially N^2. When we enabled it for BGP, the feed to 30min to complete. The comprimise I took was to start a delayed thread when zebra receives an update from protocol. So only a limited number of scans are done. I know this conflicts with your cleanup; but this might provide additional help. The existing meta-queue stuff makes the rib update worse not better. --- zebra/rib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'zebra/rib.h') diff --git a/zebra/rib.h b/zebra/rib.h index 887ed3c2..499d48b2 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -262,6 +262,7 @@ extern struct rib *rib_match_ipv4 (struct in_addr); extern struct rib *rib_lookup_ipv4 (struct prefix_ipv4 *); extern void rib_update (void); +extern void rib_update_background (void); extern void rib_weed_tables (void); extern void rib_sweep_route (void); extern void rib_close (void); -- cgit v1.2.3