diff options
| author | mxyns <mx.yns@outlook.fr> | 2022-09-28 08:05:25 +0200 | 
|---|---|---|
| committer | Maxence Younsi <mx.yns@outlook.fr> | 2023-11-04 12:17:48 +0100 | 
| commit | 66d564a60be23ae7b1181ed908fd8ecce8db8434 (patch) | |
| tree | 2f1cde22b8c32de9a8ff3a4255313878e038b031 /bgpd/bgp_route.h | |
| parent | 1cca53e5c645ee011910e16a387c47abde163508 (diff) | |
bgpd: loc-rib uptime moved to bgp_path_info_extra and set in header
moved loc-rib uptime field "bgp_rib_uptime" to struct bgp_path_info_extra for memory concerns
moved logic into bgp_route_update's callback bmp_route_update
written timestamp in per peer header
Signed-off-by: Maxence Younsi <mx.yns@outlook.fr>
Diffstat (limited to 'bgpd/bgp_route.h')
| -rw-r--r-- | bgpd/bgp_route.h | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h index 232d680188..3057a4259a 100644 --- a/bgpd/bgp_route.h +++ b/bgpd/bgp_route.h @@ -211,6 +211,9 @@ struct bgp_path_info_extra {  	mpls_label_t label[BGP_MAX_LABELS];  	uint32_t num_labels; +	/* timestamp of the rib installation */ +	time_t bgp_rib_uptime; +  	/*For EVPN*/  	struct bgp_path_info_extra_evpn *evpn; @@ -295,7 +298,6 @@ struct bgp_path_info {  	/* Uptime.  */  	time_t uptime; -	time_t rib_uptime;  	/* reference count */  	int lock; @@ -678,8 +680,8 @@ DECLARE_HOOK(bgp_process,  /* called when a route is updated in the rib */  DECLARE_HOOK(bgp_route_update,  	     (struct bgp *bgp, afi_t afi, safi_t safi, struct bgp_dest *bn, -	      struct bgp_path_info *updated_route, bool withdraw), -	     (bgp, afi, safi, bn, updated_route, withdraw)); +	      struct bgp_path_info *old_route, struct bgp_path_info *new_route), +	     (bgp, afi, safi, bn, old_route, new_route));  /* BGP show options */  #define BGP_SHOW_OPT_JSON (1 << 0)  | 
