diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-12-11 08:19:00 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-03-24 08:32:17 -0400 | 
| commit | 4f830a0799e74bd18af18e3ded5d6e16c79a7d56 (patch) | |
| tree | e92b4fe1c6e633c1667f718f6e9a87d22d8518e3 /bgpd | |
| parent | 8c1186d38e9226e29bb6eed0745a7638a7f66e5b (diff) | |
*: Convert thread_timer_remain_XXX to event_timer_remain_XXX
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/bgp_bmp.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_fsm.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_route.c | 4 | ||||
| -rw-r--r-- | bgpd/bgp_vty.c | 54 | ||||
| -rw-r--r-- | bgpd/rfapi/rfapi_monitor.c | 4 | ||||
| -rw-r--r-- | bgpd/rfapi/rfapi_vty.c | 8 | 
6 files changed, 37 insertions, 37 deletions
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c index 474ec0622c..8b953e5c90 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -2408,7 +2408,7 @@ DEFPY(show_bmp,  				uptime[0] = '\0';  				if (ba->t_timer) { -					long trem = thread_timer_remain_second( +					long trem = event_timer_remain_second(  						ba->t_timer);  					peer_uptime(monotime(NULL) - trem, diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 001a8da1cc..9e9861310c 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1046,7 +1046,7 @@ void bgp_adjust_routeadv(struct peer *peer)  	 *                     (MRAI - m) < r  	 */  	if (peer->t_routeadv) -		remain = thread_timer_remain_second(peer->t_routeadv); +		remain = event_timer_remain_second(peer->t_routeadv);  	else  		remain = peer->v_routeadv;  	diff = peer->v_routeadv - diff; diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 8b56d04e64..f2451e588e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -11105,7 +11105,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,  	if (path->peer->t_gr_restart &&  	    CHECK_FLAG(path->flags, BGP_PATH_STALE)) {  		unsigned long gr_remaining = -			thread_timer_remain_second(path->peer->t_gr_restart); +			event_timer_remain_second(path->peer->t_gr_restart);  		if (json_paths) {  			json_object_int_add(json_path, @@ -11121,7 +11121,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,  	    bgp_attr_get_community(attr) &&  	    community_include(bgp_attr_get_community(attr),  			      COMMUNITY_LLGR_STALE)) { -		unsigned long llgr_remaining = thread_timer_remain_second( +		unsigned long llgr_remaining = event_timer_remain_second(  			path->peer->t_llgr_stale[afi][safi]);  		if (json_paths) { diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index e0476c0cef..bc0681df78 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -12330,7 +12330,7 @@ static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi(  			if (peer->t_gr_stale != NULL) {  				json_object_int_add(json_timer,  						    "stalePathTimerRemaining", -						    thread_timer_remain_second( +						    event_timer_remain_second(  							    peer->t_gr_stale));  			} @@ -12351,7 +12351,7 @@ static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi(  				json_object_int_add(  					json_timer,  					"selectionDeferralTimerRemaining", -					thread_timer_remain_second( +					event_timer_remain_second(  						peer->bgp->gr_info[afi][safi]  							.t_select_deferral));  			} @@ -12364,7 +12364,7 @@ static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi(  			if (peer->t_gr_stale != NULL)  				vty_out(vty,  					"      Stale Path Remaining(sec): %ld\n", -					thread_timer_remain_second( +					event_timer_remain_second(  						peer->t_gr_stale));  			/* Display Configured Selection  			 * Deferral only when when @@ -12379,7 +12379,7 @@ static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi(  			    NULL)  				vty_out(vty,  					"        Selection Deferral Time Remaining(sec): %ld\n", -					thread_timer_remain_second( +					event_timer_remain_second(  						peer->bgp->gr_info[afi][safi]  							.t_select_deferral));  		} @@ -12413,7 +12413,7 @@ static void bgp_show_neighbor_graceful_restart_time(struct vty *vty,  		if (p->t_gr_restart != NULL)  			json_object_int_add(  				json_timer, "restartTimerRemaining", -				thread_timer_remain_second(p->t_gr_restart)); +				event_timer_remain_second(p->t_gr_restart));  		json_object_object_add(json, "timers", json_timer);  	} else { @@ -12426,10 +12426,10 @@ static void bgp_show_neighbor_graceful_restart_time(struct vty *vty,  			p->v_gr_restart);  		if (p->t_gr_restart != NULL)  			vty_out(vty, "      Restart Time Remaining(sec): %ld\n", -				thread_timer_remain_second(p->t_gr_restart)); +				event_timer_remain_second(p->t_gr_restart));  		if (p->t_gr_restart != NULL) {  			vty_out(vty, "      Restart Time Remaining(sec): %ld\n", -				thread_timer_remain_second(p->t_gr_restart)); +				event_timer_remain_second(p->t_gr_restart));  		}  	}  } @@ -13464,7 +13464,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  			json_object_int_add(  				json_neigh,  				"bgpTimerUntilConditionalAdvertisementsSec", -				thread_timer_remain_second( +				event_timer_remain_second(  					bgp->t_condition_check));  	} else {  		/* Administrative shutdown. */ @@ -13544,7 +13544,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  		if (thread_is_scheduled(bgp->t_condition_check))  			vty_out(vty,  				"  Time until conditional advertisements begin is %lu seconds\n", -				thread_timer_remain_second( +				event_timer_remain_second(  					bgp->t_condition_check));  	}  	/* Capability. */ @@ -14481,13 +14481,13 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  		if (p->t_gr_restart)  			json_object_int_add(  				json_grace, "gracefulRestartTimerMsecs", -				thread_timer_remain_second(p->t_gr_restart) * +				event_timer_remain_second(p->t_gr_restart) *  					1000);  		if (p->t_gr_stale)  			json_object_int_add(  				json_grace, "gracefulStalepathTimerMsecs", -				thread_timer_remain_second(p->t_gr_stale) * +				event_timer_remain_second(p->t_gr_stale) *  					1000);  		/* more gr info in new format */  		BGP_SHOW_PEER_GR_CAPABILITY(vty, p, json_grace); @@ -14528,12 +14528,12 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  		if (p->t_gr_restart)  			vty_out(vty,  				"    The remaining time of restart timer is %ld\n", -				thread_timer_remain_second(p->t_gr_restart)); +				event_timer_remain_second(p->t_gr_restart));  		if (p->t_gr_stale)  			vty_out(vty,  				"    The remaining time of stalepath timer is %ld\n", -				thread_timer_remain_second(p->t_gr_stale)); +				event_timer_remain_second(p->t_gr_stale));  		/* more gr info in new format */  		BGP_SHOW_PEER_GR_CAPABILITY(vty, p, NULL); @@ -14767,14 +14767,15 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  					json_neigh, "reducePrefixNumFrom");  				json_object_int_add(json_neigh,  						    "restartInTimerMsec", -						    thread_timer_remain_second( -							    p->t_pmax_restart) -							    * 1000); +						    event_timer_remain_second( +							    p->t_pmax_restart) * +							    1000);  			} else  				vty_out(vty,  					"  Reduce the no. of prefix from %s, will restart in %ld seconds\n", -					p->host, thread_timer_remain_second( -							 p->t_pmax_restart)); +					p->host, +					event_timer_remain_second( +						p->t_pmax_restart));  		} else {  			if (use_json)  				json_object_boolean_true_add( @@ -14926,19 +14927,18 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  		if (p->t_start)  			json_object_int_add(  				json_neigh, "nextStartTimerDueInMsecs", -				thread_timer_remain_second(p->t_start) * 1000); +				event_timer_remain_second(p->t_start) * 1000);  		if (p->t_connect)  			json_object_int_add(  				json_neigh, "nextConnectTimerDueInMsecs", -				thread_timer_remain_second(p->t_connect) -					* 1000); +				event_timer_remain_second(p->t_connect) * 1000);  		if (p->t_routeadv) {  			json_object_int_add(json_neigh, "mraiInterval",  					    p->v_routeadv);  			json_object_int_add(  				json_neigh, "mraiTimerExpireInMsecs", -				thread_timer_remain_second(p->t_routeadv) -					* 1000); +				event_timer_remain_second(p->t_routeadv) * +					1000);  		}  		if (p->password)  			json_object_int_add(json_neigh, "authenticationEnabled", @@ -14967,15 +14967,15 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  		}  		if (p->t_start)  			vty_out(vty, "Next start timer due in %ld seconds\n", -				thread_timer_remain_second(p->t_start)); +				event_timer_remain_second(p->t_start));  		if (p->t_connect)  			vty_out(vty, "Next connect timer due in %ld seconds\n", -				thread_timer_remain_second(p->t_connect)); +				event_timer_remain_second(p->t_connect));  		if (p->t_routeadv)  			vty_out(vty,  				"MRAI (interval %u) timer expires in %ld seconds\n",  				p->v_routeadv, -				thread_timer_remain_second(p->t_routeadv)); +				event_timer_remain_second(p->t_routeadv));  		if (p->password)  			vty_out(vty, "Peer Authentication Enabled\n"); @@ -18798,7 +18798,7 @@ static void bgp_config_end(void)  #define BGP_POST_CONFIG_DELAY_SECONDS 1  	uint32_t bgp_post_config_delay =  		thread_is_scheduled(bm->t_rmap_update) -			? thread_timer_remain_second(bm->t_rmap_update) +			? event_timer_remain_second(bm->t_rmap_update)  			: BGP_POST_CONFIG_DELAY_SECONDS;  	/* If BGP config processing thread isn't running, then diff --git a/bgpd/rfapi/rfapi_monitor.c b/bgpd/rfapi/rfapi_monitor.c index 2bcfa5779c..d3a1b84b59 100644 --- a/bgpd/rfapi/rfapi_monitor.c +++ b/bgpd/rfapi/rfapi_monitor.c @@ -743,7 +743,7 @@ static void rfapiMonitorTimerExpire(struct event *t)  static void rfapiMonitorTimerRestart(struct rfapi_monitor_vpn *m)  { -	unsigned long remain = thread_timer_remain_second(m->timer); +	unsigned long remain = event_timer_remain_second(m->timer);  	/* unexpected case, but avoid wraparound problems below */  	if (remain > m->rfd->response_lifetime) @@ -1051,7 +1051,7 @@ static void rfapiMonitorEthTimerExpire(struct event *t)  static void rfapiMonitorEthTimerRestart(struct rfapi_monitor_eth *m)  { -	unsigned long remain = thread_timer_remain_second(m->timer); +	unsigned long remain = event_timer_remain_second(m->timer);  	/* unexpected case, but avoid wraparound problems below */  	if (remain > m->rfd->response_lifetime) diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index b907c24c3d..901ea22b8f 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -518,7 +518,7 @@ void rfapiPrintBi(void *stream, struct bgp_path_info *bpi)  	    && bpi->extra->vnc.import.timer) {  		struct event *t = (struct event *)bpi->extra->vnc.import.timer;  		r = snprintf(p, REMAIN, " [%4lu] ", -			     thread_timer_remain_second(t)); +			     event_timer_remain_second(t));  		INCP;  	} else { @@ -909,7 +909,7 @@ int rfapiShowVncQueries(void *stream, struct prefix *pfx_match)  					fp(out, "%-15s %-15s", "", "");  				buf_remain[0] = 0;  				rfapiFormatSeconds( -					thread_timer_remain_second(m->timer), +					event_timer_remain_second(m->timer),  					buf_remain, BUFSIZ);  				fp(out, " %-15s %-10s\n",  				   inet_ntop(m->p.family, &m->p.u.prefix, @@ -982,7 +982,7 @@ int rfapiShowVncQueries(void *stream, struct prefix *pfx_match)  				} else  					fp(out, "%-15s %-15s", "", "");  				buf_remain[0] = 0; -				rfapiFormatSeconds(thread_timer_remain_second( +				rfapiFormatSeconds(event_timer_remain_second(  							   mon_eth->timer),  						   buf_remain, BUFSIZ);  				fp(out, " %-17s %10d %-10s\n", @@ -1114,7 +1114,7 @@ static int rfapiPrintRemoteRegBi(struct bgp *bgp, void *stream,  		char buf_age[BUFSIZ];  		struct event *t = (struct event *)bpi->extra->vnc.import.timer; -		remaining = thread_timer_remain_second(t); +		remaining = event_timer_remain_second(t);  #ifdef RFAPI_REGISTRATIONS_REPORT_AGE  		/*  | 
