diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-10-27 11:54:55 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-21 20:26:12 -0500 | 
| commit | e71bf8f7bd5457e62fed234fcd9d908d4d614906 (patch) | |
| tree | a8858b0e88aa5148a0eb44e7c8b3c49f6b5108f3 /pimd/pim_rpf.h | |
| parent | 8a9bd91cd9ebcecf3c9492ba1865d908448338da (diff) | |
pimd: Add basic nexthop lookup cached information.
Cache the last time we looked up the nexthop for this particular
address.  Store time to usec accuracy.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_rpf.h')
| -rw-r--r-- | pimd/pim_rpf.h | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/pimd/pim_rpf.h b/pimd/pim_rpf.h index b93c934116..b267a9b6fa 100644 --- a/pimd/pim_rpf.h +++ b/pimd/pim_rpf.h @@ -40,6 +40,8 @@      units applicable to the unicast routing protocol used.  */  struct pim_nexthop { +  struct in_addr    last_lookup; +  long long         last_lookup_time;    struct interface *interface;              /* RPF_interface(S) */    struct prefix     mrib_nexthop_addr;      /* MRIB.next_hop(S) */    uint32_t          mrib_metric_preference; /* MRIB.pref(S) */ @@ -59,9 +61,13 @@ enum pim_rpf_result {  struct pim_upstream; +extern long long nexthop_lookups_avoided; +  int pim_nexthop_lookup(struct pim_nexthop *nexthop, struct in_addr addr, int neighbor_needed);  enum pim_rpf_result pim_rpf_update(struct pim_upstream *up, struct in_addr *old_rpf_addr);  int pim_rpf_addr_is_inaddr_none (struct pim_rpf *rpf);  int pim_rpf_addr_is_inaddr_any (struct pim_rpf *rpf); + +void pim_rpf_set_refresh_time (void);  #endif /* PIM_RPF_H */  | 
