mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 14:29:47 +00:00
isisd: Convert thread_cancel to THREAD_OFF
Just convert all uses of thread_cancel to THREAD_OFF Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
146bcb9b92
commit
fa935aa7e8
@ -238,11 +238,11 @@ struct fabricd *fabricd_new(struct isis_area *area)
|
||||
|
||||
void fabricd_finish(struct fabricd *f)
|
||||
{
|
||||
thread_cancel(&(f->initial_sync_timeout));
|
||||
THREAD_OFF(f->initial_sync_timeout);
|
||||
|
||||
thread_cancel(&(f->tier_calculation_timer));
|
||||
THREAD_OFF(f->tier_calculation_timer);
|
||||
|
||||
thread_cancel(&(f->tier_set_timer));
|
||||
THREAD_OFF(f->tier_set_timer);
|
||||
|
||||
isis_spftree_del(f->spftree);
|
||||
neighbor_lists_clear(f);
|
||||
@ -334,7 +334,7 @@ void fabricd_initial_sync_finish(struct isis_area *area)
|
||||
f->initial_sync_circuit->interface->name);
|
||||
f->initial_sync_state = FABRICD_SYNC_COMPLETE;
|
||||
f->initial_sync_circuit = NULL;
|
||||
thread_cancel(&(f->initial_sync_timeout));
|
||||
THREAD_OFF(f->initial_sync_timeout);
|
||||
}
|
||||
|
||||
static void fabricd_bump_tier_calculation_timer(struct fabricd *f);
|
||||
@ -427,14 +427,14 @@ static void fabricd_bump_tier_calculation_timer(struct fabricd *f)
|
||||
{
|
||||
/* Cancel timer if we already know our tier */
|
||||
if (f->tier != ISIS_TIER_UNDEFINED || f->tier_set_timer) {
|
||||
thread_cancel(&(f->tier_calculation_timer));
|
||||
THREAD_OFF(f->tier_calculation_timer);
|
||||
return;
|
||||
}
|
||||
|
||||
/* If we need to calculate the tier, wait some
|
||||
* time for the topology to settle before running
|
||||
* the calculation */
|
||||
thread_cancel(&(f->tier_calculation_timer));
|
||||
THREAD_OFF(f->tier_calculation_timer);
|
||||
|
||||
thread_add_timer(master, fabricd_tier_calculation_cb, f,
|
||||
2 * f->area->lsp_gen_interval[ISIS_LEVEL2 - 1],
|
||||
@ -719,7 +719,7 @@ void fabricd_trigger_csnp(struct isis_area *area, bool circuit_scoped)
|
||||
if (!circuit->t_send_csnp[1])
|
||||
continue;
|
||||
|
||||
thread_cancel(&(circuit->t_send_csnp[ISIS_LEVEL2 - 1]));
|
||||
THREAD_OFF(circuit->t_send_csnp[ISIS_LEVEL2 - 1]);
|
||||
thread_add_timer_msec(master, send_l2_csnp, circuit,
|
||||
isis_jitter(f->csnp_delay, CSNP_JITTER),
|
||||
&circuit->t_send_csnp[ISIS_LEVEL2 - 1]);
|
||||
|
@ -161,7 +161,7 @@ void isis_delete_adj(void *arg)
|
||||
/* Remove self from snmp list without walking the list*/
|
||||
list_delete_node(adj->circuit->snmp_adj_list, adj->snmp_list_node);
|
||||
|
||||
thread_cancel(&adj->t_expire);
|
||||
THREAD_OFF(adj->t_expire);
|
||||
if (adj->adj_state != ISIS_ADJ_DOWN)
|
||||
adj->adj_state = ISIS_ADJ_DOWN;
|
||||
|
||||
|
@ -845,12 +845,12 @@ void isis_circuit_down(struct isis_circuit *circuit)
|
||||
memset(circuit->u.bc.l2_desig_is, 0, ISIS_SYS_ID_LEN + 1);
|
||||
memset(circuit->u.bc.snpa, 0, ETH_ALEN);
|
||||
|
||||
thread_cancel(&circuit->u.bc.t_send_lan_hello[0]);
|
||||
thread_cancel(&circuit->u.bc.t_send_lan_hello[1]);
|
||||
thread_cancel(&circuit->u.bc.t_run_dr[0]);
|
||||
thread_cancel(&circuit->u.bc.t_run_dr[1]);
|
||||
thread_cancel(&circuit->u.bc.t_refresh_pseudo_lsp[0]);
|
||||
thread_cancel(&circuit->u.bc.t_refresh_pseudo_lsp[1]);
|
||||
THREAD_OFF(circuit->u.bc.t_send_lan_hello[0]);
|
||||
THREAD_OFF(circuit->u.bc.t_send_lan_hello[1]);
|
||||
THREAD_OFF(circuit->u.bc.t_run_dr[0]);
|
||||
THREAD_OFF(circuit->u.bc.t_run_dr[1]);
|
||||
THREAD_OFF(circuit->u.bc.t_refresh_pseudo_lsp[0]);
|
||||
THREAD_OFF(circuit->u.bc.t_refresh_pseudo_lsp[1]);
|
||||
circuit->lsp_regenerate_pending[0] = 0;
|
||||
circuit->lsp_regenerate_pending[1] = 0;
|
||||
|
||||
@ -860,7 +860,7 @@ void isis_circuit_down(struct isis_circuit *circuit)
|
||||
} else if (circuit->circ_type == CIRCUIT_T_P2P) {
|
||||
isis_delete_adj(circuit->u.p2p.neighbor);
|
||||
circuit->u.p2p.neighbor = NULL;
|
||||
thread_cancel(&circuit->u.p2p.t_send_p2p_hello);
|
||||
THREAD_OFF(circuit->u.p2p.t_send_p2p_hello);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -873,11 +873,11 @@ void isis_circuit_down(struct isis_circuit *circuit)
|
||||
circuit->snmp_adj_idx_gen = 0;
|
||||
|
||||
/* Cancel all active threads */
|
||||
thread_cancel(&circuit->t_send_csnp[0]);
|
||||
thread_cancel(&circuit->t_send_csnp[1]);
|
||||
thread_cancel(&circuit->t_send_psnp[0]);
|
||||
thread_cancel(&circuit->t_send_psnp[1]);
|
||||
thread_cancel(&circuit->t_read);
|
||||
THREAD_OFF(circuit->t_send_csnp[0]);
|
||||
THREAD_OFF(circuit->t_send_csnp[1]);
|
||||
THREAD_OFF(circuit->t_send_psnp[0]);
|
||||
THREAD_OFF(circuit->t_send_psnp[1]);
|
||||
THREAD_OFF(circuit->t_read);
|
||||
|
||||
if (circuit->tx_queue) {
|
||||
isis_tx_queue_free(circuit->tx_queue);
|
||||
|
@ -222,8 +222,8 @@ int isis_dr_resign(struct isis_circuit *circuit, int level)
|
||||
|
||||
circuit->u.bc.is_dr[level - 1] = 0;
|
||||
circuit->u.bc.run_dr_elect[level - 1] = 0;
|
||||
thread_cancel(&circuit->u.bc.t_run_dr[level - 1]);
|
||||
thread_cancel(&circuit->u.bc.t_refresh_pseudo_lsp[level - 1]);
|
||||
THREAD_OFF(circuit->u.bc.t_run_dr[level - 1]);
|
||||
THREAD_OFF(circuit->u.bc.t_refresh_pseudo_lsp[level - 1]);
|
||||
circuit->lsp_regenerate_pending[level - 1] = 0;
|
||||
|
||||
memcpy(id, circuit->isis->sysid, ISIS_SYS_ID_LEN);
|
||||
@ -247,7 +247,7 @@ int isis_dr_resign(struct isis_circuit *circuit, int level)
|
||||
&circuit->t_send_psnp[1]);
|
||||
}
|
||||
|
||||
thread_cancel(&circuit->t_send_csnp[level - 1]);
|
||||
THREAD_OFF(circuit->t_send_csnp[level - 1]);
|
||||
|
||||
thread_add_timer(master, isis_run_dr,
|
||||
&circuit->level_arg[level - 1],
|
||||
@ -285,8 +285,6 @@ int isis_dr_commence(struct isis_circuit *circuit, int level)
|
||||
circuit->circuit_id;
|
||||
|
||||
assert(circuit->circuit_id); /* must be non-zero */
|
||||
/* if (circuit->t_send_l1_psnp)
|
||||
thread_cancel (circuit->t_send_l1_psnp); */
|
||||
lsp_generate_pseudo(circuit, 1);
|
||||
|
||||
thread_add_timer(master, send_l1_csnp, circuit,
|
||||
@ -307,8 +305,6 @@ int isis_dr_commence(struct isis_circuit *circuit, int level)
|
||||
circuit->circuit_id;
|
||||
|
||||
assert(circuit->circuit_id); /* must be non-zero */
|
||||
/* if (circuit->t_send_l1_psnp)
|
||||
thread_cancel (circuit->t_send_l1_psnp); */
|
||||
lsp_generate_pseudo(circuit, 2);
|
||||
|
||||
thread_add_timer(master, send_l2_csnp, circuit,
|
||||
|
@ -57,7 +57,7 @@ void dyn_cache_finish(struct isis *isis)
|
||||
struct listnode *node, *nnode;
|
||||
struct isis_dynhn *dyn;
|
||||
|
||||
thread_cancel(&isis->t_dync_clean);
|
||||
THREAD_OFF(isis->t_dync_clean);
|
||||
|
||||
for (ALL_LIST_ELEMENTS(isis->dyn_cache, node, nnode, dyn)) {
|
||||
list_delete_node(isis->dyn_cache, node);
|
||||
|
@ -109,13 +109,13 @@ static void circuit_resign_level(struct isis_circuit *circuit, int level)
|
||||
circuit->area->area_tag, circuit->circuit_id,
|
||||
circuit->interface->name, level);
|
||||
|
||||
thread_cancel(&circuit->t_send_csnp[idx]);
|
||||
thread_cancel(&circuit->t_send_psnp[idx]);
|
||||
THREAD_OFF(circuit->t_send_csnp[idx]);
|
||||
THREAD_OFF(circuit->t_send_psnp[idx]);
|
||||
|
||||
if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
|
||||
thread_cancel(&circuit->u.bc.t_send_lan_hello[idx]);
|
||||
thread_cancel(&circuit->u.bc.t_run_dr[idx]);
|
||||
thread_cancel(&circuit->u.bc.t_refresh_pseudo_lsp[idx]);
|
||||
THREAD_OFF(circuit->u.bc.t_send_lan_hello[idx]);
|
||||
THREAD_OFF(circuit->u.bc.t_run_dr[idx]);
|
||||
THREAD_OFF(circuit->u.bc.t_refresh_pseudo_lsp[idx]);
|
||||
circuit->lsp_regenerate_pending[idx] = 0;
|
||||
circuit->u.bc.run_dr_elect[idx] = 0;
|
||||
circuit->u.bc.is_dr[idx] = 0;
|
||||
|
@ -1519,7 +1519,7 @@ int isis_rlfa_activate(struct isis_spftree *spftree, struct rlfa *rlfa,
|
||||
spftree->route_table_backup);
|
||||
spftree->lfa.protection_counters.rlfa[vertex->N.ip.priority] += 1;
|
||||
|
||||
thread_cancel(&area->t_rlfa_rib_update);
|
||||
THREAD_OFF(area->t_rlfa_rib_update);
|
||||
thread_add_timer(master, isis_area_verify_routes_cb, area, 2,
|
||||
&area->t_rlfa_rib_update);
|
||||
|
||||
@ -1538,7 +1538,7 @@ void isis_rlfa_deactivate(struct isis_spftree *spftree, struct rlfa *rlfa)
|
||||
isis_route_delete(area, rn, spftree->route_table_backup);
|
||||
spftree->lfa.protection_counters.rlfa[vertex->N.ip.priority] -= 1;
|
||||
|
||||
thread_cancel(&area->t_rlfa_rib_update);
|
||||
THREAD_OFF(area->t_rlfa_rib_update);
|
||||
thread_add_timer(master, isis_area_verify_routes_cb, area, 2,
|
||||
&area->t_rlfa_rib_update);
|
||||
}
|
||||
|
@ -1390,7 +1390,7 @@ int lsp_generate(struct isis_area *area, int level)
|
||||
|
||||
refresh_time = lsp_refresh_time(newlsp, rem_lifetime);
|
||||
|
||||
thread_cancel(&area->t_lsp_refresh[level - 1]);
|
||||
THREAD_OFF(area->t_lsp_refresh[level - 1]);
|
||||
area->lsp_regenerate_pending[level - 1] = 0;
|
||||
thread_add_timer(master, lsp_refresh,
|
||||
&area->lsp_refresh_arg[level - 1], refresh_time,
|
||||
@ -1601,7 +1601,7 @@ int _lsp_regenerate_schedule(struct isis_area *area, int level,
|
||||
"ISIS (%s): Will schedule regen timer. Last run was: %lld, Now is: %lld",
|
||||
area->area_tag, (long long)lsp->last_generated,
|
||||
(long long)now);
|
||||
thread_cancel(&area->t_lsp_refresh[lvl - 1]);
|
||||
THREAD_OFF(area->t_lsp_refresh[lvl - 1]);
|
||||
diff = now - lsp->last_generated;
|
||||
if (diff < area->lsp_gen_interval[lvl - 1]
|
||||
&& !(area->bfd_signalled_down)) {
|
||||
@ -1794,7 +1794,7 @@ int lsp_generate_pseudo(struct isis_circuit *circuit, int level)
|
||||
lsp_flood(lsp, NULL);
|
||||
|
||||
refresh_time = lsp_refresh_time(lsp, rem_lifetime);
|
||||
thread_cancel(&circuit->u.bc.t_refresh_pseudo_lsp[level - 1]);
|
||||
THREAD_OFF(circuit->u.bc.t_refresh_pseudo_lsp[level - 1]);
|
||||
circuit->lsp_regenerate_pending[level - 1] = 0;
|
||||
if (level == IS_LEVEL_1)
|
||||
thread_add_timer(
|
||||
@ -1985,7 +1985,7 @@ int lsp_regenerate_schedule_pseudo(struct isis_circuit *circuit, int level)
|
||||
"ISIS (%s): Will schedule PSN regen timer. Last run was: %lld, Now is: %lld",
|
||||
area->area_tag, (long long)lsp->last_generated,
|
||||
(long long)now);
|
||||
thread_cancel(&circuit->u.bc.t_refresh_pseudo_lsp[lvl - 1]);
|
||||
THREAD_OFF(circuit->u.bc.t_refresh_pseudo_lsp[lvl - 1]);
|
||||
diff = now - lsp->last_generated;
|
||||
if (diff < circuit->area->lsp_gen_interval[lvl - 1]) {
|
||||
timeout =
|
||||
|
@ -205,7 +205,7 @@ static int process_p2p_hello(struct iih_info *iih)
|
||||
adj);
|
||||
|
||||
/* lets take care of the expiry */
|
||||
thread_cancel(&adj->t_expire);
|
||||
THREAD_OFF(adj->t_expire);
|
||||
thread_add_timer(master, isis_adj_expire, adj, (long)adj->hold_time,
|
||||
&adj->t_expire);
|
||||
|
||||
@ -497,7 +497,7 @@ static int process_lan_hello(struct iih_info *iih)
|
||||
adj);
|
||||
|
||||
/* lets take care of the expiry */
|
||||
thread_cancel(&adj->t_expire);
|
||||
THREAD_OFF(adj->t_expire);
|
||||
thread_add_timer(master, isis_adj_expire, adj, (long)adj->hold_time,
|
||||
&adj->t_expire);
|
||||
|
||||
@ -2064,7 +2064,7 @@ static void _send_hello_sched(struct isis_circuit *circuit,
|
||||
if (thread_timer_remain_msec(*threadp) < (unsigned long)delay)
|
||||
return;
|
||||
|
||||
thread_cancel(threadp);
|
||||
THREAD_OFF(*threadp);
|
||||
}
|
||||
|
||||
thread_add_timer_msec(master, send_hello_cb,
|
||||
|
@ -1938,7 +1938,7 @@ int _isis_spf_schedule(struct isis_area *area, int level,
|
||||
area->area_tag, level, diff, func, file, line);
|
||||
}
|
||||
|
||||
thread_cancel(&area->t_rlfa_rib_update);
|
||||
THREAD_OFF(area->t_rlfa_rib_update);
|
||||
if (area->spf_delay_ietf[level - 1]) {
|
||||
/* Need to call schedule function also if spf delay is running
|
||||
* to
|
||||
|
@ -1180,7 +1180,7 @@ void isis_sr_stop(struct isis_area *area)
|
||||
area->area_tag);
|
||||
|
||||
/* Disable any re-attempt to connect to Label Manager */
|
||||
thread_cancel(&srdb->t_start_lm);
|
||||
THREAD_OFF(srdb->t_start_lm);
|
||||
|
||||
/* Uninstall all local Adjacency-SIDs. */
|
||||
for (ALL_LIST_ELEMENTS(area->srdb.adj_sids, node, nnode, sra))
|
||||
|
@ -92,7 +92,7 @@ static void tx_queue_element_free(void *element)
|
||||
{
|
||||
struct isis_tx_queue_entry *e = element;
|
||||
|
||||
thread_cancel(&(e->retry));
|
||||
THREAD_OFF(e->retry);
|
||||
|
||||
XFREE(MTYPE_TX_QUEUE_ENTRY, e);
|
||||
}
|
||||
@ -161,7 +161,7 @@ void _isis_tx_queue_add(struct isis_tx_queue *queue,
|
||||
|
||||
e->type = type;
|
||||
|
||||
thread_cancel(&(e->retry));
|
||||
THREAD_OFF(e->retry);
|
||||
thread_add_event(master, tx_queue_send_event, e, 0, &e->retry);
|
||||
|
||||
e->is_retry = false;
|
||||
@ -184,7 +184,7 @@ void _isis_tx_queue_del(struct isis_tx_queue *queue, struct isis_lsp *lsp,
|
||||
func, file, line);
|
||||
}
|
||||
|
||||
thread_cancel(&(e->retry));
|
||||
THREAD_OFF(e->retry);
|
||||
|
||||
hash_release(queue->hash, e);
|
||||
XFREE(MTYPE_TX_QUEUE_ENTRY, e);
|
||||
|
@ -514,10 +514,10 @@ void isis_area_destroy(struct isis_area *area)
|
||||
|
||||
if (area->spf_timer[0])
|
||||
isis_spf_timer_free(THREAD_ARG(area->spf_timer[0]));
|
||||
thread_cancel(&area->spf_timer[0]);
|
||||
THREAD_OFF(area->spf_timer[0]);
|
||||
if (area->spf_timer[1])
|
||||
isis_spf_timer_free(THREAD_ARG(area->spf_timer[1]));
|
||||
thread_cancel(&area->spf_timer[1]);
|
||||
THREAD_OFF(area->spf_timer[1]);
|
||||
|
||||
spf_backoff_free(area->spf_delay_ietf[0]);
|
||||
spf_backoff_free(area->spf_delay_ietf[1]);
|
||||
@ -541,10 +541,10 @@ void isis_area_destroy(struct isis_area *area)
|
||||
isis_lfa_tiebreakers_clear(area, ISIS_LEVEL1);
|
||||
isis_lfa_tiebreakers_clear(area, ISIS_LEVEL2);
|
||||
|
||||
thread_cancel(&area->t_tick);
|
||||
thread_cancel(&area->t_lsp_refresh[0]);
|
||||
thread_cancel(&area->t_lsp_refresh[1]);
|
||||
thread_cancel(&area->t_rlfa_rib_update);
|
||||
THREAD_OFF(area->t_tick);
|
||||
THREAD_OFF(area->t_lsp_refresh[0]);
|
||||
THREAD_OFF(area->t_lsp_refresh[1]);
|
||||
THREAD_OFF(area->t_rlfa_rib_update);
|
||||
|
||||
thread_cancel_event(master, area);
|
||||
|
||||
@ -3094,12 +3094,12 @@ static void area_resign_level(struct isis_area *area, int level)
|
||||
if (area->spf_timer[level - 1])
|
||||
isis_spf_timer_free(THREAD_ARG(area->spf_timer[level - 1]));
|
||||
|
||||
thread_cancel(&area->spf_timer[level - 1]);
|
||||
THREAD_OFF(area->spf_timer[level - 1]);
|
||||
|
||||
sched_debug(
|
||||
"ISIS (%s): Resigned from L%d - canceling LSP regeneration timer.",
|
||||
area->area_tag, level);
|
||||
thread_cancel(&area->t_lsp_refresh[level - 1]);
|
||||
THREAD_OFF(area->t_lsp_refresh[level - 1]);
|
||||
area->lsp_regenerate_pending[level - 1] = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user