mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 13:33:15 +00:00
*: Convert a bunch of thread_XX to event_XX
Convert these functions: thread_getrusage thread_cmd_init thread_consumed_time thread_timer_to_hhmmss thread_is_scheduled thread_ignore_late_timer Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
70c35c11f2
commit
5f6eaa9b96
@ -328,7 +328,7 @@ void bgp_conditional_adv_enable(struct peer *peer, afi_t afi, safi_t safi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Register for conditional routes polling timer */
|
/* Register for conditional routes polling timer */
|
||||||
if (!thread_is_scheduled(bgp->t_condition_check))
|
if (!event_is_scheduled(bgp->t_condition_check))
|
||||||
event_add_timer(bm->master, bgp_conditional_adv_timer, bgp, 0,
|
event_add_timer(bm->master, bgp_conditional_adv_timer, bgp, 0,
|
||||||
&bgp->t_condition_check);
|
&bgp->t_condition_check);
|
||||||
}
|
}
|
||||||
|
@ -13460,7 +13460,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
|
|||||||
json_neigh,
|
json_neigh,
|
||||||
"bgpTimerConfiguredConditionalAdvertisementsSec",
|
"bgpTimerConfiguredConditionalAdvertisementsSec",
|
||||||
bgp->condition_check_period);
|
bgp->condition_check_period);
|
||||||
if (thread_is_scheduled(bgp->t_condition_check))
|
if (event_is_scheduled(bgp->t_condition_check))
|
||||||
json_object_int_add(
|
json_object_int_add(
|
||||||
json_neigh,
|
json_neigh,
|
||||||
"bgpTimerUntilConditionalAdvertisementsSec",
|
"bgpTimerUntilConditionalAdvertisementsSec",
|
||||||
@ -13541,7 +13541,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
|
|||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
" Configured conditional advertisements interval is %d seconds\n",
|
" Configured conditional advertisements interval is %d seconds\n",
|
||||||
bgp->condition_check_period);
|
bgp->condition_check_period);
|
||||||
if (thread_is_scheduled(bgp->t_condition_check))
|
if (event_is_scheduled(bgp->t_condition_check))
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
" Time until conditional advertisements begin is %lu seconds\n",
|
" Time until conditional advertisements begin is %lu seconds\n",
|
||||||
event_timer_remain_second(
|
event_timer_remain_second(
|
||||||
@ -18768,7 +18768,7 @@ static struct event *t_bgp_cfg;
|
|||||||
|
|
||||||
bool bgp_config_inprocess(void)
|
bool bgp_config_inprocess(void)
|
||||||
{
|
{
|
||||||
return thread_is_scheduled(t_bgp_cfg);
|
return event_is_scheduled(t_bgp_cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bgp_config_finish(struct event *t)
|
static void bgp_config_finish(struct event *t)
|
||||||
@ -18797,7 +18797,7 @@ static void bgp_config_end(void)
|
|||||||
{
|
{
|
||||||
#define BGP_POST_CONFIG_DELAY_SECONDS 1
|
#define BGP_POST_CONFIG_DELAY_SECONDS 1
|
||||||
uint32_t bgp_post_config_delay =
|
uint32_t bgp_post_config_delay =
|
||||||
thread_is_scheduled(bm->t_rmap_update)
|
event_is_scheduled(bm->t_rmap_update)
|
||||||
? event_timer_remain_second(bm->t_rmap_update)
|
? event_timer_remain_second(bm->t_rmap_update)
|
||||||
: BGP_POST_CONFIG_DELAY_SECONDS;
|
: BGP_POST_CONFIG_DELAY_SECONDS;
|
||||||
|
|
||||||
|
@ -1372,7 +1372,7 @@ int lsp_generate(struct isis_area *area, int level)
|
|||||||
return ISIS_ERROR;
|
return ISIS_ERROR;
|
||||||
|
|
||||||
/* Check if config is still being processed */
|
/* Check if config is still being processed */
|
||||||
if (thread_is_scheduled(t_isis_cfg))
|
if (event_is_scheduled(t_isis_cfg))
|
||||||
return ISIS_OK;
|
return ISIS_OK;
|
||||||
|
|
||||||
memset(&lspid, 0, ISIS_SYS_ID_LEN + 2);
|
memset(&lspid, 0, ISIS_SYS_ID_LEN + 2);
|
||||||
|
@ -195,7 +195,7 @@ static void isis_config_end(void)
|
|||||||
/* If ISIS config processing thread isn't running, then
|
/* If ISIS config processing thread isn't running, then
|
||||||
* we can return and rely it's properly handled.
|
* we can return and rely it's properly handled.
|
||||||
*/
|
*/
|
||||||
if (!thread_is_scheduled(t_isis_cfg))
|
if (!event_is_scheduled(t_isis_cfg))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
THREAD_OFF(t_isis_cfg);
|
THREAD_OFF(t_isis_cfg);
|
||||||
|
@ -2542,7 +2542,7 @@ void cmd_init(int terminal)
|
|||||||
|
|
||||||
install_default(CONFIG_NODE);
|
install_default(CONFIG_NODE);
|
||||||
|
|
||||||
thread_cmd_init();
|
event_cmd_init();
|
||||||
workqueue_cmd_init();
|
workqueue_cmd_init();
|
||||||
hash_cmd_init();
|
hash_cmd_init();
|
||||||
}
|
}
|
||||||
|
12
lib/event.c
12
lib/event.c
@ -516,7 +516,7 @@ DEFPY_NOSH (show_thread_timers,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void thread_cmd_init(void)
|
void event_cmd_init(void)
|
||||||
{
|
{
|
||||||
install_element(VIEW_NODE, &show_thread_cpu_cmd);
|
install_element(VIEW_NODE, &show_thread_cpu_cmd);
|
||||||
install_element(VIEW_NODE, &show_thread_poll_cmd);
|
install_element(VIEW_NODE, &show_thread_poll_cmd);
|
||||||
@ -737,7 +737,7 @@ unsigned long event_timer_remain_msec(struct event *thread)
|
|||||||
{
|
{
|
||||||
int64_t remain;
|
int64_t remain;
|
||||||
|
|
||||||
if (!thread_is_scheduled(thread))
|
if (!event_is_scheduled(thread))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
frr_with_mutex (&thread->mtx) {
|
frr_with_mutex (&thread->mtx) {
|
||||||
@ -780,7 +780,7 @@ static int time_hhmmss(char *buf, int buf_size, long sec)
|
|||||||
return wr != 8;
|
return wr != 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *thread_timer_to_hhmmss(char *buf, int buf_size, struct event *t_timer)
|
char *event_timer_to_hhmmss(char *buf, int buf_size, struct event *t_timer)
|
||||||
{
|
{
|
||||||
if (t_timer) {
|
if (t_timer) {
|
||||||
time_hhmmss(buf, buf_size, event_timer_remain_second(t_timer));
|
time_hhmmss(buf, buf_size, event_timer_remain_second(t_timer));
|
||||||
@ -1865,7 +1865,7 @@ static unsigned long timeval_elapsed(struct timeval a, struct timeval b)
|
|||||||
+ (a.tv_usec - b.tv_usec));
|
+ (a.tv_usec - b.tv_usec));
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long thread_consumed_time(RUSAGE_T *now, RUSAGE_T *start,
|
unsigned long event_consumed_time(RUSAGE_T *now, RUSAGE_T *start,
|
||||||
unsigned long *cputime)
|
unsigned long *cputime)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_CLOCK_THREAD_CPUTIME_ID
|
#ifdef HAVE_CLOCK_THREAD_CPUTIME_ID
|
||||||
@ -1927,7 +1927,7 @@ void event_set_yield_time(struct event *thread, unsigned long yield_time)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void thread_getrusage(RUSAGE_T *r)
|
void event_getrusage(RUSAGE_T *r)
|
||||||
{
|
{
|
||||||
monotime(&r->real);
|
monotime(&r->real);
|
||||||
if (!cputime_enabled) {
|
if (!cputime_enabled) {
|
||||||
@ -1993,7 +1993,7 @@ void event_call(struct event *thread)
|
|||||||
unsigned long walltime, cputime;
|
unsigned long walltime, cputime;
|
||||||
unsigned long exp;
|
unsigned long exp;
|
||||||
|
|
||||||
walltime = thread_consumed_time(&after, &before, &cputime);
|
walltime = event_consumed_time(&after, &before, &cputime);
|
||||||
|
|
||||||
/* update walltime */
|
/* update walltime */
|
||||||
atomic_fetch_add_explicit(&thread->hist->real.total, walltime,
|
atomic_fetch_add_explicit(&thread->hist->real.total, walltime,
|
||||||
|
14
lib/event.h
14
lib/event.h
@ -35,7 +35,7 @@ struct rusage_t {
|
|||||||
};
|
};
|
||||||
#define RUSAGE_T struct rusage_t
|
#define RUSAGE_T struct rusage_t
|
||||||
|
|
||||||
#define GETRUSAGE(X) thread_getrusage(X)
|
#define GETRUSAGE(X) event_getrusage(X)
|
||||||
|
|
||||||
PREDECL_LIST(thread_list);
|
PREDECL_LIST(thread_list);
|
||||||
PREDECL_HEAP(thread_timer_list);
|
PREDECL_HEAP(thread_timer_list);
|
||||||
@ -259,19 +259,19 @@ extern int event_should_yield(struct event *event);
|
|||||||
extern void event_set_yield_time(struct event *event, unsigned long);
|
extern void event_set_yield_time(struct event *event, unsigned long);
|
||||||
|
|
||||||
/* Internal libfrr exports */
|
/* Internal libfrr exports */
|
||||||
extern void thread_getrusage(RUSAGE_T *);
|
extern void event_getrusage(RUSAGE_T *);
|
||||||
extern void thread_cmd_init(void);
|
extern void event_cmd_init(void);
|
||||||
|
|
||||||
/* Returns elapsed real (wall clock) time. */
|
/* Returns elapsed real (wall clock) time. */
|
||||||
extern unsigned long thread_consumed_time(RUSAGE_T *after, RUSAGE_T *before,
|
extern unsigned long event_consumed_time(RUSAGE_T *after, RUSAGE_T *before,
|
||||||
unsigned long *cpu_time_elapsed);
|
unsigned long *cpu_time_elapsed);
|
||||||
|
|
||||||
/* only for use in logging functions! */
|
/* only for use in logging functions! */
|
||||||
extern pthread_key_t thread_current;
|
extern pthread_key_t thread_current;
|
||||||
extern char *thread_timer_to_hhmmss(char *buf, int buf_size,
|
extern char *event_timer_to_hhmmss(char *buf, int buf_size,
|
||||||
struct event *t_timer);
|
struct event *t_timer);
|
||||||
|
|
||||||
static inline bool thread_is_scheduled(struct event *thread)
|
static inline bool event_is_scheduled(struct event *thread)
|
||||||
{
|
{
|
||||||
if (thread)
|
if (thread)
|
||||||
return true;
|
return true;
|
||||||
@ -282,7 +282,7 @@ static inline bool thread_is_scheduled(struct event *thread)
|
|||||||
/* Debug signal mask */
|
/* Debug signal mask */
|
||||||
void debug_signals(const sigset_t *sigs);
|
void debug_signals(const sigset_t *sigs);
|
||||||
|
|
||||||
static inline void thread_ignore_late_timer(struct event *event)
|
static inline void event_ignore_late_timer(struct event *event)
|
||||||
{
|
{
|
||||||
event->ignore_timer_late = true;
|
event->ignore_timer_late = true;
|
||||||
}
|
}
|
||||||
|
@ -545,7 +545,7 @@ static int vty_command(struct vty *vty, char *buf)
|
|||||||
|
|
||||||
GETRUSAGE(&after);
|
GETRUSAGE(&after);
|
||||||
|
|
||||||
walltime = thread_consumed_time(&after, &before, &cputime);
|
walltime = event_consumed_time(&after, &before, &cputime);
|
||||||
|
|
||||||
if (cputime_enabled_here && cputime_enabled && cputime_threshold
|
if (cputime_enabled_here && cputime_enabled && cputime_threshold
|
||||||
&& cputime > cputime_threshold)
|
&& cputime > cputime_threshold)
|
||||||
|
@ -106,27 +106,27 @@ void work_queue_free_and_null(struct work_queue **wqp)
|
|||||||
|
|
||||||
bool work_queue_is_scheduled(struct work_queue *wq)
|
bool work_queue_is_scheduled(struct work_queue *wq)
|
||||||
{
|
{
|
||||||
return thread_is_scheduled(wq->thread);
|
return event_is_scheduled(wq->thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int work_queue_schedule(struct work_queue *wq, unsigned int delay)
|
static int work_queue_schedule(struct work_queue *wq, unsigned int delay)
|
||||||
{
|
{
|
||||||
/* if appropriate, schedule work queue thread */
|
/* if appropriate, schedule work queue thread */
|
||||||
if (CHECK_FLAG(wq->flags, WQ_UNPLUGGED) &&
|
if (CHECK_FLAG(wq->flags, WQ_UNPLUGGED) &&
|
||||||
!thread_is_scheduled(wq->thread) && !work_queue_empty(wq)) {
|
!event_is_scheduled(wq->thread) && !work_queue_empty(wq)) {
|
||||||
/* Schedule timer if there's a delay, otherwise just schedule
|
/* Schedule timer if there's a delay, otherwise just schedule
|
||||||
* as an 'event'
|
* as an 'event'
|
||||||
*/
|
*/
|
||||||
if (delay > 0) {
|
if (delay > 0) {
|
||||||
event_add_timer_msec(wq->master, work_queue_run, wq,
|
event_add_timer_msec(wq->master, work_queue_run, wq,
|
||||||
delay, &wq->thread);
|
delay, &wq->thread);
|
||||||
thread_ignore_late_timer(wq->thread);
|
event_ignore_late_timer(wq->thread);
|
||||||
} else
|
} else
|
||||||
event_add_event(wq->master, work_queue_run, wq, 0,
|
event_add_event(wq->master, work_queue_run, wq, 0,
|
||||||
&wq->thread);
|
&wq->thread);
|
||||||
|
|
||||||
/* set thread yield time, if needed */
|
/* set thread yield time, if needed */
|
||||||
if (thread_is_scheduled(wq->thread) &&
|
if (event_is_scheduled(wq->thread) &&
|
||||||
wq->spec.yield != EVENT_YIELD_TIME_SLOT)
|
wq->spec.yield != EVENT_YIELD_TIME_SLOT)
|
||||||
event_set_yield_time(wq->thread, wq->spec.yield);
|
event_set_yield_time(wq->thread, wq->spec.yield);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1104,7 +1104,7 @@ void ospf6_asbr_distribute_list_update(struct ospf6 *ospf6,
|
|||||||
{
|
{
|
||||||
SET_FLAG(red->flag, OSPF6_IS_RMAP_CHANGED);
|
SET_FLAG(red->flag, OSPF6_IS_RMAP_CHANGED);
|
||||||
|
|
||||||
if (thread_is_scheduled(ospf6->t_distribute_update))
|
if (event_is_scheduled(ospf6->t_distribute_update))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (IS_OSPF6_DEBUG_ASBR)
|
if (IS_OSPF6_DEBUG_ASBR)
|
||||||
@ -3363,7 +3363,7 @@ ospf6_start_asbr_summary_delay_timer(struct ospf6 *ospf6,
|
|||||||
{
|
{
|
||||||
aggr->action = operation;
|
aggr->action = operation;
|
||||||
|
|
||||||
if (thread_is_scheduled(ospf6->t_external_aggr)) {
|
if (event_is_scheduled(ospf6->t_external_aggr)) {
|
||||||
if (ospf6->aggr_action == OSPF6_ROUTE_AGGR_ADD) {
|
if (ospf6->aggr_action == OSPF6_ROUTE_AGGR_ADD) {
|
||||||
|
|
||||||
if (IS_OSPF6_DEBUG_AGGR)
|
if (IS_OSPF6_DEBUG_AGGR)
|
||||||
|
@ -1140,7 +1140,7 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
|
|||||||
|
|
||||||
if (use_json) {
|
if (use_json) {
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(oi->thread_send_lsupdate))
|
if (event_is_scheduled(oi->thread_send_lsupdate))
|
||||||
timersub(&oi->thread_send_lsupdate->u.sands, &now,
|
timersub(&oi->thread_send_lsupdate->u.sands, &now,
|
||||||
&res);
|
&res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
@ -1150,8 +1150,7 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
|
|||||||
duration);
|
duration);
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json_obj, "lsUpdateSendThread",
|
json_obj, "lsUpdateSendThread",
|
||||||
(thread_is_scheduled(oi->thread_send_lsupdate)
|
(event_is_scheduled(oi->thread_send_lsupdate) ? "on"
|
||||||
? "on"
|
|
||||||
: "off"));
|
: "off"));
|
||||||
|
|
||||||
json_arr = json_object_new_array();
|
json_arr = json_object_new_array();
|
||||||
@ -1162,7 +1161,7 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
|
|||||||
json_arr);
|
json_arr);
|
||||||
|
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(oi->thread_send_lsack))
|
if (event_is_scheduled(oi->thread_send_lsack))
|
||||||
timersub(&oi->thread_send_lsack->u.sands, &now, &res);
|
timersub(&oi->thread_send_lsack->u.sands, &now, &res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
|
|
||||||
@ -1172,7 +1171,7 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
|
|||||||
duration);
|
duration);
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json_obj, "lsAckSendThread",
|
json_obj, "lsAckSendThread",
|
||||||
(thread_is_scheduled(oi->thread_send_lsack) ? "on"
|
(event_is_scheduled(oi->thread_send_lsack) ? "on"
|
||||||
: "off"));
|
: "off"));
|
||||||
|
|
||||||
json_arr = json_object_new_array();
|
json_arr = json_object_new_array();
|
||||||
@ -1183,27 +1182,26 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(oi->thread_send_lsupdate))
|
if (event_is_scheduled(oi->thread_send_lsupdate))
|
||||||
timersub(&oi->thread_send_lsupdate->u.sands, &now,
|
timersub(&oi->thread_send_lsupdate->u.sands, &now,
|
||||||
&res);
|
&res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
" %d Pending LSAs for LSUpdate in Time %s [thread %s]\n",
|
" %d Pending LSAs for LSUpdate in Time %s [thread %s]\n",
|
||||||
oi->lsupdate_list->count, duration,
|
oi->lsupdate_list->count, duration,
|
||||||
(thread_is_scheduled(oi->thread_send_lsupdate)
|
(event_is_scheduled(oi->thread_send_lsupdate) ? "on"
|
||||||
? "on"
|
|
||||||
: "off"));
|
: "off"));
|
||||||
for (ALL_LSDB(oi->lsupdate_list, lsa, lsanext))
|
for (ALL_LSDB(oi->lsupdate_list, lsa, lsanext))
|
||||||
vty_out(vty, " %s\n", lsa->name);
|
vty_out(vty, " %s\n", lsa->name);
|
||||||
|
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(oi->thread_send_lsack))
|
if (event_is_scheduled(oi->thread_send_lsack))
|
||||||
timersub(&oi->thread_send_lsack->u.sands, &now, &res);
|
timersub(&oi->thread_send_lsack->u.sands, &now, &res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
" %d Pending LSAs for LSAck in Time %s [thread %s]\n",
|
" %d Pending LSAs for LSAck in Time %s [thread %s]\n",
|
||||||
oi->lsack_list->count, duration,
|
oi->lsack_list->count, duration,
|
||||||
(thread_is_scheduled(oi->thread_send_lsack) ? "on"
|
(event_is_scheduled(oi->thread_send_lsack) ? "on"
|
||||||
: "off"));
|
: "off"));
|
||||||
for (ALL_LSDB(oi->lsack_list, lsa, lsanext))
|
for (ALL_LSDB(oi->lsack_list, lsa, lsanext))
|
||||||
vty_out(vty, " %s\n", lsa->name);
|
vty_out(vty, " %s\n", lsa->name);
|
||||||
@ -2107,7 +2105,7 @@ DEFUN (ipv6_ospf6_hellointerval,
|
|||||||
/*
|
/*
|
||||||
* If the thread is scheduled, send the new hello now.
|
* If the thread is scheduled, send the new hello now.
|
||||||
*/
|
*/
|
||||||
if (thread_is_scheduled(oi->thread_send_hello)) {
|
if (event_is_scheduled(oi->thread_send_hello)) {
|
||||||
THREAD_OFF(oi->thread_send_hello);
|
THREAD_OFF(oi->thread_send_hello);
|
||||||
|
|
||||||
event_add_timer(master, ospf6_hello_send, oi, 0,
|
event_add_timer(master, ospf6_hello_send, oi, 0,
|
||||||
|
@ -815,7 +815,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
|
|||||||
|
|
||||||
|
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(on->thread_send_dbdesc))
|
if (event_is_scheduled(on->thread_send_dbdesc))
|
||||||
timersub(&on->thread_send_dbdesc->u.sands, &now, &res);
|
timersub(&on->thread_send_dbdesc->u.sands, &now, &res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
json_object_int_add(json_neighbor, "pendingLsaDbDescCount",
|
json_object_int_add(json_neighbor, "pendingLsaDbDescCount",
|
||||||
@ -824,7 +824,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
|
|||||||
duration);
|
duration);
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json_neighbor, "dbDescSendThread",
|
json_neighbor, "dbDescSendThread",
|
||||||
(thread_is_scheduled(on->thread_send_dbdesc) ? "on"
|
(event_is_scheduled(on->thread_send_dbdesc) ? "on"
|
||||||
: "off"));
|
: "off"));
|
||||||
json_array = json_object_new_array();
|
json_array = json_object_new_array();
|
||||||
for (ALL_LSDB(on->dbdesc_list, lsa, lsanext))
|
for (ALL_LSDB(on->dbdesc_list, lsa, lsanext))
|
||||||
@ -834,7 +834,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
|
|||||||
json_array);
|
json_array);
|
||||||
|
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(on->thread_send_lsreq))
|
if (event_is_scheduled(on->thread_send_lsreq))
|
||||||
timersub(&on->thread_send_lsreq->u.sands, &now, &res);
|
timersub(&on->thread_send_lsreq->u.sands, &now, &res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
json_object_int_add(json_neighbor, "pendingLsaLsReqCount",
|
json_object_int_add(json_neighbor, "pendingLsaLsReqCount",
|
||||||
@ -843,7 +843,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
|
|||||||
duration);
|
duration);
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json_neighbor, "lsReqSendThread",
|
json_neighbor, "lsReqSendThread",
|
||||||
(thread_is_scheduled(on->thread_send_lsreq) ? "on"
|
(event_is_scheduled(on->thread_send_lsreq) ? "on"
|
||||||
: "off"));
|
: "off"));
|
||||||
json_array = json_object_new_array();
|
json_array = json_object_new_array();
|
||||||
for (ALL_LSDB(on->request_list, lsa, lsanext))
|
for (ALL_LSDB(on->request_list, lsa, lsanext))
|
||||||
@ -854,7 +854,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
|
|||||||
|
|
||||||
|
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(on->thread_send_lsupdate))
|
if (event_is_scheduled(on->thread_send_lsupdate))
|
||||||
timersub(&on->thread_send_lsupdate->u.sands, &now,
|
timersub(&on->thread_send_lsupdate->u.sands, &now,
|
||||||
&res);
|
&res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
@ -864,8 +864,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
|
|||||||
duration);
|
duration);
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json_neighbor, "lsUpdateSendThread",
|
json_neighbor, "lsUpdateSendThread",
|
||||||
(thread_is_scheduled(on->thread_send_lsupdate)
|
(event_is_scheduled(on->thread_send_lsupdate) ? "on"
|
||||||
? "on"
|
|
||||||
: "off"));
|
: "off"));
|
||||||
json_array = json_object_new_array();
|
json_array = json_object_new_array();
|
||||||
for (ALL_LSDB(on->lsupdate_list, lsa, lsanext))
|
for (ALL_LSDB(on->lsupdate_list, lsa, lsanext))
|
||||||
@ -875,7 +874,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
|
|||||||
json_array);
|
json_array);
|
||||||
|
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(on->thread_send_lsack))
|
if (event_is_scheduled(on->thread_send_lsack))
|
||||||
timersub(&on->thread_send_lsack->u.sands, &now, &res);
|
timersub(&on->thread_send_lsack->u.sands, &now, &res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
json_object_int_add(json_neighbor, "pendingLsaLsAckCount",
|
json_object_int_add(json_neighbor, "pendingLsaLsAckCount",
|
||||||
@ -884,7 +883,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
|
|||||||
duration);
|
duration);
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json_neighbor, "lsAckSendThread",
|
json_neighbor, "lsAckSendThread",
|
||||||
(thread_is_scheduled(on->thread_send_lsack) ? "on"
|
(event_is_scheduled(on->thread_send_lsack) ? "on"
|
||||||
: "off"));
|
: "off"));
|
||||||
json_array = json_object_new_array();
|
json_array = json_object_new_array();
|
||||||
for (ALL_LSDB(on->lsack_list, lsa, lsanext))
|
for (ALL_LSDB(on->lsack_list, lsa, lsanext))
|
||||||
@ -973,51 +972,50 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
|
|||||||
vty_out(vty, " %s\n", lsa->name);
|
vty_out(vty, " %s\n", lsa->name);
|
||||||
|
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(on->thread_send_dbdesc))
|
if (event_is_scheduled(on->thread_send_dbdesc))
|
||||||
timersub(&on->thread_send_dbdesc->u.sands, &now, &res);
|
timersub(&on->thread_send_dbdesc->u.sands, &now, &res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
" %d Pending LSAs for DbDesc in Time %s [thread %s]\n",
|
" %d Pending LSAs for DbDesc in Time %s [thread %s]\n",
|
||||||
on->dbdesc_list->count, duration,
|
on->dbdesc_list->count, duration,
|
||||||
(thread_is_scheduled(on->thread_send_dbdesc) ? "on"
|
(event_is_scheduled(on->thread_send_dbdesc) ? "on"
|
||||||
: "off"));
|
: "off"));
|
||||||
for (ALL_LSDB(on->dbdesc_list, lsa, lsanext))
|
for (ALL_LSDB(on->dbdesc_list, lsa, lsanext))
|
||||||
vty_out(vty, " %s\n", lsa->name);
|
vty_out(vty, " %s\n", lsa->name);
|
||||||
|
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(on->thread_send_lsreq))
|
if (event_is_scheduled(on->thread_send_lsreq))
|
||||||
timersub(&on->thread_send_lsreq->u.sands, &now, &res);
|
timersub(&on->thread_send_lsreq->u.sands, &now, &res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
" %d Pending LSAs for LSReq in Time %s [thread %s]\n",
|
" %d Pending LSAs for LSReq in Time %s [thread %s]\n",
|
||||||
on->request_list->count, duration,
|
on->request_list->count, duration,
|
||||||
(thread_is_scheduled(on->thread_send_lsreq) ? "on"
|
(event_is_scheduled(on->thread_send_lsreq) ? "on"
|
||||||
: "off"));
|
: "off"));
|
||||||
for (ALL_LSDB(on->request_list, lsa, lsanext))
|
for (ALL_LSDB(on->request_list, lsa, lsanext))
|
||||||
vty_out(vty, " %s\n", lsa->name);
|
vty_out(vty, " %s\n", lsa->name);
|
||||||
|
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(on->thread_send_lsupdate))
|
if (event_is_scheduled(on->thread_send_lsupdate))
|
||||||
timersub(&on->thread_send_lsupdate->u.sands, &now,
|
timersub(&on->thread_send_lsupdate->u.sands, &now,
|
||||||
&res);
|
&res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
" %d Pending LSAs for LSUpdate in Time %s [thread %s]\n",
|
" %d Pending LSAs for LSUpdate in Time %s [thread %s]\n",
|
||||||
on->lsupdate_list->count, duration,
|
on->lsupdate_list->count, duration,
|
||||||
(thread_is_scheduled(on->thread_send_lsupdate)
|
(event_is_scheduled(on->thread_send_lsupdate) ? "on"
|
||||||
? "on"
|
|
||||||
: "off"));
|
: "off"));
|
||||||
for (ALL_LSDB(on->lsupdate_list, lsa, lsanext))
|
for (ALL_LSDB(on->lsupdate_list, lsa, lsanext))
|
||||||
vty_out(vty, " %s\n", lsa->name);
|
vty_out(vty, " %s\n", lsa->name);
|
||||||
|
|
||||||
timerclear(&res);
|
timerclear(&res);
|
||||||
if (thread_is_scheduled(on->thread_send_lsack))
|
if (event_is_scheduled(on->thread_send_lsack))
|
||||||
timersub(&on->thread_send_lsack->u.sands, &now, &res);
|
timersub(&on->thread_send_lsack->u.sands, &now, &res);
|
||||||
timerstring(&res, duration, sizeof(duration));
|
timerstring(&res, duration, sizeof(duration));
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
" %d Pending LSAs for LSAck in Time %s [thread %s]\n",
|
" %d Pending LSAs for LSAck in Time %s [thread %s]\n",
|
||||||
on->lsack_list->count, duration,
|
on->lsack_list->count, duration,
|
||||||
(thread_is_scheduled(on->thread_send_lsack) ? "on"
|
(event_is_scheduled(on->thread_send_lsack) ? "on"
|
||||||
: "off"));
|
: "off"));
|
||||||
for (ALL_LSDB(on->lsack_list, lsa, lsanext))
|
for (ALL_LSDB(on->lsack_list, lsa, lsanext))
|
||||||
vty_out(vty, " %s\n", lsa->name);
|
vty_out(vty, " %s\n", lsa->name);
|
||||||
|
@ -992,7 +992,7 @@ static void ospf6_abr_task_timer(struct event *thread)
|
|||||||
|
|
||||||
void ospf6_schedule_abr_task(struct ospf6 *ospf6)
|
void ospf6_schedule_abr_task(struct ospf6 *ospf6)
|
||||||
{
|
{
|
||||||
if (thread_is_scheduled(ospf6->t_abr_task)) {
|
if (event_is_scheduled(ospf6->t_abr_task)) {
|
||||||
if (IS_OSPF6_DEBUG_ABR)
|
if (IS_OSPF6_DEBUG_ABR)
|
||||||
zlog_debug("ABR task already scheduled");
|
zlog_debug("ABR task already scheduled");
|
||||||
return;
|
return;
|
||||||
|
@ -687,7 +687,7 @@ void ospf6_spf_schedule(struct ospf6 *ospf6, unsigned int reason)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* SPF calculation timer is already scheduled. */
|
/* SPF calculation timer is already scheduled. */
|
||||||
if (thread_is_scheduled(ospf6->t_spf_calc)) {
|
if (event_is_scheduled(ospf6->t_spf_calc)) {
|
||||||
if (IS_OSPF6_DEBUG_SPF(PROCESS) || IS_OSPF6_DEBUG_SPF(TIME))
|
if (IS_OSPF6_DEBUG_SPF(PROCESS) || IS_OSPF6_DEBUG_SPF(TIME))
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"SPF: calculation timer is already scheduled: %p",
|
"SPF: calculation timer is already scheduled: %p",
|
||||||
|
@ -1359,7 +1359,7 @@ static void ospf6_show(struct vty *vty, struct ospf6 *o, json_object *json,
|
|||||||
} else
|
} else
|
||||||
json_object_boolean_false_add(json, "spfHasRun");
|
json_object_boolean_false_add(json, "spfHasRun");
|
||||||
|
|
||||||
if (thread_is_scheduled(o->t_spf_calc)) {
|
if (event_is_scheduled(o->t_spf_calc)) {
|
||||||
long time_store;
|
long time_store;
|
||||||
|
|
||||||
json_object_boolean_true_add(json, "spfTimerActive");
|
json_object_boolean_true_add(json, "spfTimerActive");
|
||||||
@ -1452,8 +1452,7 @@ static void ospf6_show(struct vty *vty, struct ospf6 *o, json_object *json,
|
|||||||
|
|
||||||
threadtimer_string(now, o->t_spf_calc, buf, sizeof(buf));
|
threadtimer_string(now, o->t_spf_calc, buf, sizeof(buf));
|
||||||
vty_out(vty, " SPF timer %s%s\n",
|
vty_out(vty, " SPF timer %s%s\n",
|
||||||
(thread_is_scheduled(o->t_spf_calc) ? "due in "
|
(event_is_scheduled(o->t_spf_calc) ? "due in " : "is "),
|
||||||
: "is "),
|
|
||||||
buf);
|
buf);
|
||||||
|
|
||||||
if (CHECK_FLAG(o->flag, OSPF6_STUB_ROUTER))
|
if (CHECK_FLAG(o->flag, OSPF6_STUB_ROUTER))
|
||||||
|
@ -98,7 +98,7 @@ static void if_zebra_speed_update(struct event *thread)
|
|||||||
zif->speed_update_count++;
|
zif->speed_update_count++;
|
||||||
event_add_timer(zrouter.master, if_zebra_speed_update, ifp,
|
event_add_timer(zrouter.master, if_zebra_speed_update, ifp,
|
||||||
SPEED_UPDATE_SLEEP_TIME, &zif->speed_update);
|
SPEED_UPDATE_SLEEP_TIME, &zif->speed_update);
|
||||||
thread_ignore_late_timer(zif->speed_update);
|
event_ignore_late_timer(zif->speed_update);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ static int if_zebra_new_hook(struct interface *ifp)
|
|||||||
zebra_if->speed_update_count = 0;
|
zebra_if->speed_update_count = 0;
|
||||||
event_add_timer(zrouter.master, if_zebra_speed_update, ifp, 15,
|
event_add_timer(zrouter.master, if_zebra_speed_update, ifp, 15,
|
||||||
&zebra_if->speed_update);
|
&zebra_if->speed_update);
|
||||||
thread_ignore_late_timer(zebra_if->speed_update);
|
event_ignore_late_timer(zebra_if->speed_update);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1040,7 +1040,7 @@ void if_up(struct interface *ifp, bool install_connected)
|
|||||||
|
|
||||||
event_add_timer(zrouter.master, if_zebra_speed_update, ifp, 0,
|
event_add_timer(zrouter.master, if_zebra_speed_update, ifp, 0,
|
||||||
&zif->speed_update);
|
&zif->speed_update);
|
||||||
thread_ignore_late_timer(zif->speed_update);
|
event_ignore_late_timer(zif->speed_update);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Interface goes down. We have to manage different behavior of based
|
/* Interface goes down. We have to manage different behavior of based
|
||||||
|
@ -692,7 +692,7 @@ void zebra_evpn_print_mac(struct zebra_mac *mac, void *ctxt, json_object *json)
|
|||||||
if (mac->hold_timer)
|
if (mac->hold_timer)
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json_mac, "peerActiveHold",
|
json_mac, "peerActiveHold",
|
||||||
thread_timer_to_hhmmss(thread_buf,
|
event_timer_to_hhmmss(thread_buf,
|
||||||
sizeof(thread_buf),
|
sizeof(thread_buf),
|
||||||
mac->hold_timer));
|
mac->hold_timer));
|
||||||
if (mac->es)
|
if (mac->es)
|
||||||
@ -784,7 +784,7 @@ void zebra_evpn_print_mac(struct zebra_mac *mac, void *ctxt, json_object *json)
|
|||||||
vty_out(vty, " peer-active");
|
vty_out(vty, " peer-active");
|
||||||
if (mac->hold_timer)
|
if (mac->hold_timer)
|
||||||
vty_out(vty, " (ht: %s)",
|
vty_out(vty, " (ht: %s)",
|
||||||
thread_timer_to_hhmmss(thread_buf,
|
event_timer_to_hhmmss(thread_buf,
|
||||||
sizeof(thread_buf),
|
sizeof(thread_buf),
|
||||||
mac->hold_timer));
|
mac->hold_timer));
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
|
@ -3181,7 +3181,7 @@ static void zebra_evpn_es_show_entry_detail(struct vty *vty,
|
|||||||
if (es->df_delay_timer)
|
if (es->df_delay_timer)
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json, "dfDelayTimer",
|
json, "dfDelayTimer",
|
||||||
thread_timer_to_hhmmss(thread_buf,
|
event_timer_to_hhmmss(thread_buf,
|
||||||
sizeof(thread_buf),
|
sizeof(thread_buf),
|
||||||
es->df_delay_timer));
|
es->df_delay_timer));
|
||||||
json_object_int_add(json, "nexthopGroup", es->nhg_id);
|
json_object_int_add(json, "nexthopGroup", es->nhg_id);
|
||||||
@ -3226,7 +3226,7 @@ static void zebra_evpn_es_show_entry_detail(struct vty *vty,
|
|||||||
: "df");
|
: "df");
|
||||||
if (es->df_delay_timer)
|
if (es->df_delay_timer)
|
||||||
vty_out(vty, " DF delay: %s\n",
|
vty_out(vty, " DF delay: %s\n",
|
||||||
thread_timer_to_hhmmss(thread_buf,
|
event_timer_to_hhmmss(thread_buf,
|
||||||
sizeof(thread_buf),
|
sizeof(thread_buf),
|
||||||
es->df_delay_timer));
|
es->df_delay_timer));
|
||||||
vty_out(vty, " DF preference: %u\n", es->df_pref);
|
vty_out(vty, " DF preference: %u\n", es->df_pref);
|
||||||
@ -3529,7 +3529,7 @@ void zebra_evpn_mh_json(json_object *json)
|
|||||||
json_object_int_add(json, "startupDelay", zmh_info->startup_delay_time);
|
json_object_int_add(json, "startupDelay", zmh_info->startup_delay_time);
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json, "startupDelayTimer",
|
json, "startupDelayTimer",
|
||||||
thread_timer_to_hhmmss(thread_buf, sizeof(thread_buf),
|
event_timer_to_hhmmss(thread_buf, sizeof(thread_buf),
|
||||||
zmh_info->startup_delay_timer));
|
zmh_info->startup_delay_timer));
|
||||||
json_object_int_add(json, "uplinkConfigCount",
|
json_object_int_add(json, "uplinkConfigCount",
|
||||||
zmh_info->uplink_cfg_cnt);
|
zmh_info->uplink_cfg_cnt);
|
||||||
@ -3562,7 +3562,7 @@ void zebra_evpn_mh_print(struct vty *vty)
|
|||||||
zmh_info->mac_hold_time, zmh_info->neigh_hold_time);
|
zmh_info->mac_hold_time, zmh_info->neigh_hold_time);
|
||||||
vty_out(vty, " startup-delay: %ds, start-delay-timer: %s\n",
|
vty_out(vty, " startup-delay: %ds, start-delay-timer: %s\n",
|
||||||
zmh_info->startup_delay_time,
|
zmh_info->startup_delay_time,
|
||||||
thread_timer_to_hhmmss(thread_buf, sizeof(thread_buf),
|
event_timer_to_hhmmss(thread_buf, sizeof(thread_buf),
|
||||||
zmh_info->startup_delay_timer));
|
zmh_info->startup_delay_timer));
|
||||||
vty_out(vty, " uplink-cfg-cnt: %u, uplink-active-cnt: %u\n",
|
vty_out(vty, " uplink-cfg-cnt: %u, uplink-active-cnt: %u\n",
|
||||||
zmh_info->uplink_cfg_cnt, zmh_info->uplink_oper_up_cnt);
|
zmh_info->uplink_cfg_cnt, zmh_info->uplink_oper_up_cnt);
|
||||||
|
@ -1746,7 +1746,7 @@ void zebra_evpn_print_neigh(struct zebra_neigh *n, void *ctxt,
|
|||||||
}
|
}
|
||||||
if (n->hold_timer) {
|
if (n->hold_timer) {
|
||||||
vty_out(vty, " (ht: %s)",
|
vty_out(vty, " (ht: %s)",
|
||||||
thread_timer_to_hhmmss(thread_buf,
|
event_timer_to_hhmmss(thread_buf,
|
||||||
sizeof(thread_buf),
|
sizeof(thread_buf),
|
||||||
n->hold_timer));
|
n->hold_timer));
|
||||||
sync_info = true;
|
sync_info = true;
|
||||||
@ -1769,7 +1769,7 @@ void zebra_evpn_print_neigh(struct zebra_neigh *n, void *ctxt,
|
|||||||
if (n->hold_timer)
|
if (n->hold_timer)
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json, "peerActiveHold",
|
json, "peerActiveHold",
|
||||||
thread_timer_to_hhmmss(thread_buf,
|
event_timer_to_hhmmss(thread_buf,
|
||||||
sizeof(thread_buf),
|
sizeof(thread_buf),
|
||||||
n->hold_timer));
|
n->hold_timer));
|
||||||
}
|
}
|
||||||
|
@ -1727,7 +1727,7 @@ void zebra_nhg_increment_ref(struct nhg_hash_entry *nhe)
|
|||||||
|
|
||||||
nhe->refcnt++;
|
nhe->refcnt++;
|
||||||
|
|
||||||
if (thread_is_scheduled(nhe->timer)) {
|
if (event_is_scheduled(nhe->timer)) {
|
||||||
THREAD_OFF(nhe->timer);
|
THREAD_OFF(nhe->timer);
|
||||||
nhe->refcnt--;
|
nhe->refcnt--;
|
||||||
UNSET_FLAG(nhe->flags, NEXTHOP_GROUP_KEEP_AROUND);
|
UNSET_FLAG(nhe->flags, NEXTHOP_GROUP_KEEP_AROUND);
|
||||||
|
@ -4415,7 +4415,7 @@ void rib_update(enum rib_update_event event)
|
|||||||
{
|
{
|
||||||
struct rib_update_ctx *ctx;
|
struct rib_update_ctx *ctx;
|
||||||
|
|
||||||
if (thread_is_scheduled(t_rib_update_threads[event]))
|
if (event_is_scheduled(t_rib_update_threads[event]))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ctx = rib_update_ctx_init(0, event);
|
ctx = rib_update_ctx_init(0, event);
|
||||||
|
@ -1179,10 +1179,10 @@ static void show_nexthop_group_out(struct vty *vty, struct nhg_hash_entry *nhe,
|
|||||||
json_object_string_add(json, "type",
|
json_object_string_add(json, "type",
|
||||||
zebra_route_string(nhe->type));
|
zebra_route_string(nhe->type));
|
||||||
json_object_int_add(json, "refCount", nhe->refcnt);
|
json_object_int_add(json, "refCount", nhe->refcnt);
|
||||||
if (thread_is_scheduled(nhe->timer))
|
if (event_is_scheduled(nhe->timer))
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json, "timeToDeletion",
|
json, "timeToDeletion",
|
||||||
thread_timer_to_hhmmss(time_left,
|
event_timer_to_hhmmss(time_left,
|
||||||
sizeof(time_left),
|
sizeof(time_left),
|
||||||
nhe->timer));
|
nhe->timer));
|
||||||
json_object_string_add(json, "uptime", up_str);
|
json_object_string_add(json, "uptime", up_str);
|
||||||
@ -1193,9 +1193,9 @@ static void show_nexthop_group_out(struct vty *vty, struct nhg_hash_entry *nhe,
|
|||||||
vty_out(vty, "ID: %u (%s)\n", nhe->id,
|
vty_out(vty, "ID: %u (%s)\n", nhe->id,
|
||||||
zebra_route_string(nhe->type));
|
zebra_route_string(nhe->type));
|
||||||
vty_out(vty, " RefCnt: %u", nhe->refcnt);
|
vty_out(vty, " RefCnt: %u", nhe->refcnt);
|
||||||
if (thread_is_scheduled(nhe->timer))
|
if (event_is_scheduled(nhe->timer))
|
||||||
vty_out(vty, " Time to Deletion: %s",
|
vty_out(vty, " Time to Deletion: %s",
|
||||||
thread_timer_to_hhmmss(time_left,
|
event_timer_to_hhmmss(time_left,
|
||||||
sizeof(time_left),
|
sizeof(time_left),
|
||||||
nhe->timer));
|
nhe->timer));
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user