return 0;
/* Cancel reuse event. */
- thread_cancel(&(bdc->t_reuse));
+ THREAD_OFF(bdc->t_reuse);
/* Clean BGP dampening information. */
bgp_damp_info_clean(afi, safi);
}
/* Removing interval event. */
- thread_cancel(&bgp_dump->t_interval);
+ THREAD_OFF(bgp_dump->t_interval);
bgp_dump->interval = 0;
bgp_evpn_es_local_info_clear(es, true);
}
if (bgp_mh_info->t_cons_check)
- thread_cancel(&bgp_mh_info->t_cons_check);
+ THREAD_OFF(bgp_mh_info->t_cons_check);
list_delete(&bgp_mh_info->local_es_list);
list_delete(&bgp_mh_info->pend_es_list);
list_delete(&bgp_mh_info->ead_es_export_rtl);
if (!paf->t_announce_route)
return;
- thread_cancel(&paf->t_announce_route);
+ THREAD_OFF(paf->t_announce_route);
}
/*
bgp = THREAD_ARG(thread);
update_group_walk(bgp, update_group_default_originate_route_map_walkcb,
reason);
- thread_cancel(&bgp->t_rmap_def_originate_eval);
+ THREAD_OFF(bgp->t_rmap_def_originate_eval);
bgp_unlock(bgp);
}
/* Cancel max-med onstartup if its on */
if (bgp->t_maxmed_onstartup) {
- thread_cancel(&bgp->t_maxmed_onstartup);
+ THREAD_OFF(bgp->t_maxmed_onstartup);
bgp->maxmed_onstartup_over = 1;
}
*/
if (CHECK_FLAG(bpi->flags, BGP_PATH_REMOVED)
&& bpi->extra->vnc.import.timer) {
-
- struct thread **t =
- &(bpi->extra->vnc.import.timer);
- struct rfapi_withdraw *wcb = (*t)->arg;
+ struct rfapi_withdraw *wcb =
+ THREAD_ARG(bpi->extra->vnc.import.timer);
XFREE(MTYPE_RFAPI_WITHDRAW, wcb);
- thread_cancel(t);
+ THREAD_OFF(bpi->extra->vnc.import.timer);
}
next = bpi->next;
*/
static void rfapiWithdrawTimerVPN(struct thread *t)
{
- struct rfapi_withdraw *wcb = t->arg;
+ struct rfapi_withdraw *wcb = THREAD_ARG(t);
struct bgp_path_info *bpi = wcb->info;
struct bgp *bgp = bgp_get_default();
const struct prefix *p;
static void rfapiWithdrawTimerEncap(struct thread *t)
{
- struct rfapi_withdraw *wcb = t->arg;
+ struct rfapi_withdraw *wcb = THREAD_ARG(t);
struct bgp_path_info *bpi = wcb->info;
int was_first_route = 0;
struct rfapi_monitor_encap *em;
*/
if (CHECK_FLAG(bpi->flags, BGP_PATH_REMOVED)
&& bpi->extra->vnc.import.timer) {
-
- struct thread **t =
- &(bpi->extra->vnc.import.timer);
- struct rfapi_withdraw *wcb = (*t)->arg;
+ struct rfapi_withdraw *wcb = THREAD_ARG(
+ bpi->extra->vnc.import.timer);
XFREE(MTYPE_RFAPI_WITHDRAW, wcb);
- thread_cancel(t);
+ THREAD_OFF(
+ bpi->extra->vnc.import.timer);
}
if (action == FIF_ACTION_UPDATE) {
"%s: removing holddown bpi matching NVE of new route",
__func__);
if (bpi->extra->vnc.import.timer) {
- struct thread **t =
- &(bpi->extra->vnc.import.timer);
- struct rfapi_withdraw *wcb = (*t)->arg;
+ struct rfapi_withdraw *wcb =
+ THREAD_ARG(bpi->extra->vnc.import.timer);
XFREE(MTYPE_RFAPI_WITHDRAW, wcb);
- thread_cancel(t);
+ THREAD_OFF(bpi->extra->vnc.import.timer);
}
rfapiExpireEncapNow(import_table, rn, bpi);
}
*/
if (CHECK_FLAG(bpi->flags, BGP_PATH_REMOVED)
&& bpi->extra->vnc.import.timer) {
-
- struct thread **t =
- &(bpi->extra->vnc.import.timer);
- struct rfapi_withdraw *wcb = (*t)->arg;
+ struct rfapi_withdraw *wcb = THREAD_ARG(
+ bpi->extra->vnc.import.timer);
XFREE(MTYPE_RFAPI_WITHDRAW, wcb);
- thread_cancel(t);
+ THREAD_OFF(
+ bpi->extra->vnc.import.timer);
import_table->holddown_count[afi] -= 1;
RFAPI_UPDATE_ITABLE_COUNT(
"%s: removing holddown bpi matching NVE of new route",
__func__);
if (bpi->extra->vnc.import.timer) {
- struct thread **t =
- &(bpi->extra->vnc.import.timer);
- struct rfapi_withdraw *wcb = (*t)->arg;
+ struct rfapi_withdraw *wcb =
+ THREAD_ARG(bpi->extra->vnc.import.timer);
XFREE(MTYPE_RFAPI_WITHDRAW, wcb);
- thread_cancel(t);
+ THREAD_OFF(bpi->extra->vnc.import.timer);
}
rfapiExpireVpnNow(import_table, rn, bpi, 0);
}
if (!delete_holddown)
continue;
if (bpi->extra->vnc.import.timer) {
-
- struct thread **t =
- &(bpi->extra->vnc
- .import.timer);
struct rfapi_withdraw *wcb =
- (*t)->arg;
+ THREAD_ARG(
+ bpi->extra->vnc
+ .import
+ .timer);
wcb->import_table
->holddown_count[afi] -=
afi, 1);
XFREE(MTYPE_RFAPI_WITHDRAW,
wcb);
- thread_cancel(t);
+ THREAD_OFF(
+ bpi->extra->vnc.import
+ .timer);
}
} else {
if (!delete_active)
rfapiMonitorDetachImport(m);
}
- thread_cancel(&m->timer);
+ THREAD_OFF(m->timer);
/*
* remove from rfd list
rfapiMonitorDetachImport(m);
}
- thread_cancel(&m->timer);
+ THREAD_OFF(m->timer);
XFREE(MTYPE_RFAPI_MONITOR, m);
rn->info = NULL;
#endif
}
- thread_cancel(&mon_eth->timer);
+ THREAD_OFF(mon_eth->timer);
/*
* remove from rfd list
static void rfapiMonitorTimerExpire(struct thread *t)
{
- struct rfapi_monitor_vpn *m = t->arg;
+ struct rfapi_monitor_vpn *m = THREAD_ARG(t);
/* forget reference to thread, it's gone */
m->timer = NULL;
static void rfapiMonitorEthTimerExpire(struct thread *t)
{
- struct rfapi_monitor_eth *m = t->arg;
+ struct rfapi_monitor_eth *m = THREAD_ARG(t);
/* forget reference to thread, it's gone */
m->timer = NULL;
rfapiMonitorEthDetachImport(bgp, val);
}
- thread_cancel(&val->timer);
+ THREAD_OFF(val->timer);
/*
* remove from rfd list
if (goner->timer) {
struct rfapi_rib_tcb *tcb;
- tcb = goner->timer->arg;
- thread_cancel(&goner->timer);
+ tcb = THREAD_ARG(goner->timer);
+ THREAD_OFF(goner->timer);
XFREE(MTYPE_RFAPI_RECENT_DELETE, tcb);
}
XFREE(MTYPE_RFAPI_INFO, goner);
*/
static void rfapiRibExpireTimer(struct thread *t)
{
- struct rfapi_rib_tcb *tcb = t->arg;
+ struct rfapi_rib_tcb *tcb = THREAD_ARG(t);
RFAPI_RIB_CHECK_COUNTS(1, 0);
struct rfapi_rib_tcb *tcb = NULL;
if (ri->timer) {
- tcb = ri->timer->arg;
- thread_cancel(&ri->timer);
+ tcb = THREAD_ARG(ri->timer);
+ THREAD_OFF(ri->timer);
} else {
tcb = XCALLOC(MTYPE_RFAPI_RECENT_DELETE,
sizeof(struct rfapi_rib_tcb));
if (ri->timer) {
struct rfapi_rib_tcb *tcb;
- tcb = ri->timer->arg;
- thread_cancel(&ri->timer);
+ tcb = THREAD_ARG(ri->timer);
+ THREAD_OFF(ri->timer);
XFREE(MTYPE_RFAPI_RECENT_DELETE, tcb);
}
if (ori->timer) {
struct rfapi_rib_tcb *tcb;
- tcb = ori->timer->arg;
- thread_cancel(&ori->timer);
+ tcb = THREAD_ARG(ori->timer);
+ THREAD_OFF(ori->timer);
XFREE(MTYPE_RFAPI_RECENT_DELETE, tcb);
}
if (ri->timer) {
struct rfapi_rib_tcb *tcb;
- tcb = ri->timer->arg;
- thread_cancel(&ri->timer);
+ tcb = THREAD_ARG(ri->timer);
+ THREAD_OFF(ri->timer);
XFREE(MTYPE_RFAPI_RECENT_DELETE, tcb);
}
RFAPI_RIB_CHECK_COUNTS(0, delete_list->count);
* export expiration timer is already running on
* this route: cancel it
*/
- thread_cancel(&eti->timer);
+ THREAD_OFF(eti->timer);
bgp_update(peer, prefix, /* prefix */
0, /* addpath_id */
static void vncExportWithdrawTimer(struct thread *t)
{
- struct vnc_export_info *eti = t->arg;
+ struct vnc_export_info *eti = THREAD_ARG(t);
const struct prefix *p = agg_node_get_prefix(eti->node);
/*
* already running on
* this route: cancel it
*/
- thread_cancel(&eti->timer);
+ THREAD_OFF(eti->timer);
vnc_zlog_debug_verbose(
"%s: calling bgp_update",
ZEBRA_ROUTE_VNC_DIRECT_RH,
BGP_ROUTE_REDISTRIBUTE);
if (eti) {
- thread_cancel(&eti->timer);
+ THREAD_OFF(eti->timer);
vnc_eti_delete(eti);
}