diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-02-06 10:23:58 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-03-27 16:22:22 -0400 | 
| commit | 699dae230db72cdb75c9e2c0237d602a48dbf61f (patch) | |
| tree | 6fc306d202c849f43917f9f55ec304e9c8cfcdc2 /zebra/rib.h | |
| parent | c86ba6c283689d0fd9f7dce9c29fdbbea7d0a0b2 (diff) | |
zebra: Modify NHT to occur when needed.
Currently nexthop tracking is performed for all nexthops that
are being tracked after a group of contexts are passed back
from the data plane for post install processing.
This is inefficient and leaves us sending nexthop tracking
changes at an accelerated pace, when we think we've changed
a route.  Additionally every route change will cause us
to relook at all nexthops we are tracking irrelevant if
they are possibly related to the route change or not.
Let's modify the code base to track the rnh's off of the rib
table's rn, `rib_dest_t`.  So after we process a node, install
it into the data plane, in rib_process_result we can
look at the `rib_dest_t` associated with the rn and see that
a nexthop depended on this route node.  If so, refigure it.
Additionally we will store rnh's that are not resolved on the
0.0.0.0/0 nexthop tracking list.  As such when a route node
changes we can quickly walk up the rib tree and notice that
it needs to be reprocessed as well.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/rib.h')
| -rw-r--r-- | zebra/rib.h | 11 | 
1 files changed, 11 insertions, 0 deletions
diff --git a/zebra/rib.h b/zebra/rib.h index 2e0a73aa8b..3c68daf76c 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -145,6 +145,15 @@ typedef struct rib_dest_t_ {  	uint32_t flags;  	/* +	 * The list of nht prefixes that have ended up +	 * depending on this route node. +	 * After route processing is returned from +	 * the data plane we will run evaluate_rnh +	 * on these prefixes. +	 */ +	struct list *nht; + +	/*  	 * Linkage to put dest on the FPM processing queue.  	 */  	TAILQ_ENTRY(rib_dest_t_) fpm_q_entries; @@ -359,6 +368,8 @@ extern struct route_table *rib_tables_iter_next(rib_tables_iter_t *iter);  extern uint8_t route_distance(int type); +extern void zebra_rib_evaluate_rn_nexthops(struct route_node *rn, uint32_t seq); +  /*   * Inline functions.   */  | 
