Replace use of deprecated macro with direct api call.
Signed-off-by: Mark Stapp <mjs@cisco.com>
struct bmp_queue_entry *bqe;
struct bmp_mirrorq *bmq;
- EVENT_OFF(bmp->t_read);
+ event_cancel(&bmp->t_read);
if (bmp->active)
bmp_active_disconnected(bmp->active);
if (!bqe->refcount)
XFREE(MTYPE_BMP_QUEUE, bqe);
- EVENT_OFF(bmp->t_read);
+ event_cancel(&bmp->t_read);
pullwr_del(bmp->pullwr);
close(bmp->socket);
}
struct bmp_active *ba;
struct bmp_imported_bgp *bib;
- EVENT_OFF(bt->t_stats);
+ event_cancel(&bt->t_stats);
frr_each_safe (bmp_actives, &bt->actives, ba)
bmp_active_put(ba);
static void bmp_listener_stop(struct bmp_listener *bl)
{
- EVENT_OFF(bl->t_accept);
+ event_cancel(&bl->t_accept);
if (bl->sock != -1)
close(bl->sock);
static void bmp_active_put(struct bmp_active *ba)
{
- EVENT_OFF(ba->t_timer);
- EVENT_OFF(ba->t_read);
- EVENT_OFF(ba->t_write);
+ event_cancel(&ba->t_timer);
+ event_cancel(&ba->t_read);
+ event_cancel(&ba->t_write);
bmp_actives_del(&ba->targets->actives, ba);
/* all 3 end up here, though only timer or read+write are active
* at a time */
- EVENT_OFF(ba->t_timer);
- EVENT_OFF(ba->t_read);
- EVENT_OFF(ba->t_write);
+ event_cancel(&ba->t_timer);
+ event_cancel(&ba->t_read);
+ event_cancel(&ba->t_write);
ba->last_err = NULL;
static void bmp_active_setup(struct bmp_active *ba)
{
- EVENT_OFF(ba->t_timer);
- EVENT_OFF(ba->t_read);
- EVENT_OFF(ba->t_write);
+ event_cancel(&ba->t_timer);
+ event_cancel(&ba->t_read);
+ event_cancel(&ba->t_write);
if (ba->bmp)
return;
{
VTY_DECLVAR_CONTEXT_SUB(bmp_targets, bt);
- EVENT_OFF(bt->t_stats);
+ event_cancel(&bt->t_stats);
if (no)
bt->stat_msec = 0;
else if (interval_str)
}
/* Last filter removed. So cancel conditional routes polling thread. */
- EVENT_OFF(bgp->t_condition_check);
+ event_cancel(&bgp->t_condition_check);
}
static void peer_advertise_map_filter_update(struct peer *peer, afi_t afi,
XFREE(MTYPE_BGP_DAMP_ARRAY, bdc->reuse_list);
bdc->reuse_list_size = 0;
- EVENT_OFF(bdc->t_reuse);
+ event_cancel(&bdc->t_reuse);
}
/* Disable route flap dampening for a bgp instance.
return 0;
/* Cancel reuse event. */
- EVENT_OFF(bdc->t_reuse);
+ event_cancel(&bdc->t_reuse);
/* Clean BGP dampening information. */
bgp_damp_info_clean(bgp, bdc, afi, safi);
}
/* Removing interval event. */
- EVENT_OFF(bgp_dump->t_interval);
+ event_cancel(&bgp_dump->t_interval);
bgp_dump->interval = 0;
bgp_evpn_es_local_info_clear(es, true);
}
if (bgp_mh_info->t_cons_check)
- EVENT_OFF(bgp_mh_info->t_cons_check);
+ event_cancel(&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);
*/
bgp_keepalives_off(keeper);
- EVENT_OFF(going_away->t_routeadv);
- EVENT_OFF(going_away->t_connect);
- EVENT_OFF(going_away->t_delayopen);
- EVENT_OFF(going_away->t_connect_check_r);
- EVENT_OFF(going_away->t_connect_check_w);
- EVENT_OFF(going_away->t_stop_with_notify);
- EVENT_OFF(keeper->t_routeadv);
- EVENT_OFF(keeper->t_connect);
- EVENT_OFF(keeper->t_delayopen);
- EVENT_OFF(keeper->t_connect_check_r);
- EVENT_OFF(keeper->t_connect_check_w);
+ event_cancel(&going_away->t_routeadv);
+ event_cancel(&going_away->t_connect);
+ event_cancel(&going_away->t_delayopen);
+ event_cancel(&going_away->t_connect_check_r);
+ event_cancel(&going_away->t_connect_check_w);
+ event_cancel(&going_away->t_stop_with_notify);
+ event_cancel(&keeper->t_routeadv);
+ event_cancel(&keeper->t_connect);
+ event_cancel(&keeper->t_delayopen);
+ event_cancel(&keeper->t_connect_check_r);
+ event_cancel(&keeper->t_connect_check_w);
frr_with_mutex (&bm->peer_connection_mtx) {
if (peer_connection_fifo_member(&bm->connection_fifo, keeper))
inactive. All other timer must be turned off */
if (BGP_PEER_START_SUPPRESSED(peer) || peer_active(connection) != BGP_PEER_ACTIVE ||
peer->bgp->vrf_id == VRF_UNKNOWN) {
- EVENT_OFF(connection->t_start);
+ event_cancel(&connection->t_start);
} else {
BGP_TIMER_ON(connection->t_start, bgp_start_timer,
peer->v_start);
}
- EVENT_OFF(connection->t_connect);
- EVENT_OFF(connection->t_holdtime);
+ event_cancel(&connection->t_connect);
+ event_cancel(&connection->t_holdtime);
bgp_keepalives_off(connection);
- EVENT_OFF(connection->t_routeadv);
- EVENT_OFF(connection->t_delayopen);
+ event_cancel(&connection->t_routeadv);
+ event_cancel(&connection->t_delayopen);
break;
case Connect:
/* After start timer is expired, the peer moves to Connect
status. Make sure start timer is off and connect timer is
on. */
- EVENT_OFF(connection->t_start);
+ event_cancel(&connection->t_start);
if (CHECK_FLAG(peer->flags, PEER_FLAG_TIMER_DELAYOPEN))
BGP_TIMER_ON(connection->t_connect, bgp_connect_timer,
(peer->v_delayopen + peer->v_connect));
BGP_TIMER_ON(connection->t_connect, bgp_connect_timer,
peer->v_connect);
- EVENT_OFF(connection->t_holdtime);
+ event_cancel(&connection->t_holdtime);
bgp_keepalives_off(connection);
- EVENT_OFF(connection->t_routeadv);
+ event_cancel(&connection->t_routeadv);
break;
case Active:
/* Active is waiting connection from remote peer. And if
connect timer is expired, change status to Connect. */
- EVENT_OFF(connection->t_start);
+ event_cancel(&connection->t_start);
/* If peer is passive mode, do not set connect timer. */
if (CHECK_FLAG(peer->flags, PEER_FLAG_PASSIVE)
|| CHECK_FLAG(peer->sflags, PEER_STATUS_NSF_WAIT)) {
- EVENT_OFF(connection->t_connect);
+ event_cancel(&connection->t_connect);
} else {
if (CHECK_FLAG(peer->flags, PEER_FLAG_TIMER_DELAYOPEN))
BGP_TIMER_ON(connection->t_connect,
BGP_TIMER_ON(connection->t_connect,
bgp_connect_timer, peer->v_connect);
}
- EVENT_OFF(connection->t_holdtime);
+ event_cancel(&connection->t_holdtime);
bgp_keepalives_off(connection);
- EVENT_OFF(connection->t_routeadv);
+ event_cancel(&connection->t_routeadv);
break;
case OpenSent:
/* OpenSent status. */
- EVENT_OFF(connection->t_start);
- EVENT_OFF(connection->t_connect);
+ event_cancel(&connection->t_start);
+ event_cancel(&connection->t_connect);
if (peer->v_holdtime != 0) {
BGP_TIMER_ON(connection->t_holdtime, bgp_holdtime_timer,
peer->v_holdtime);
} else {
- EVENT_OFF(connection->t_holdtime);
+ event_cancel(&connection->t_holdtime);
}
bgp_keepalives_off(connection);
- EVENT_OFF(connection->t_routeadv);
- EVENT_OFF(connection->t_delayopen);
+ event_cancel(&connection->t_routeadv);
+ event_cancel(&connection->t_delayopen);
break;
case OpenConfirm:
/* OpenConfirm status. */
- EVENT_OFF(connection->t_start);
- EVENT_OFF(connection->t_connect);
+ event_cancel(&connection->t_start);
+ event_cancel(&connection->t_connect);
/*
* If the negotiated Hold Time value is zero, then the Hold Time
* Additionally if a different hold timer has been negotiated
* than we must stop then start the timer again
*/
- EVENT_OFF(connection->t_holdtime);
+ event_cancel(&connection->t_holdtime);
if (peer->v_holdtime == 0)
bgp_keepalives_off(connection);
else {
peer->v_holdtime);
bgp_keepalives_on(connection);
}
- EVENT_OFF(connection->t_routeadv);
- EVENT_OFF(connection->t_delayopen);
+ event_cancel(&connection->t_routeadv);
+ event_cancel(&connection->t_delayopen);
break;
case Established:
/* In Established status start and connect timer is turned
off. */
- EVENT_OFF(connection->t_start);
- EVENT_OFF(connection->t_connect);
- EVENT_OFF(connection->t_delayopen);
+ event_cancel(&connection->t_start);
+ event_cancel(&connection->t_connect);
+ event_cancel(&connection->t_delayopen);
/*
* Same as OpenConfirm, if holdtime is zero then both holdtime
* Additionally if a different hold timer has been negotiated
* then we must stop then start the timer again
*/
- EVENT_OFF(connection->t_holdtime);
+ event_cancel(&connection->t_holdtime);
if (peer->v_holdtime == 0)
bgp_keepalives_off(connection);
else {
}
break;
case Deleted:
- EVENT_OFF(peer->connection->t_gr_restart);
- EVENT_OFF(peer->connection->t_gr_stale);
+ event_cancel(&peer->connection->t_gr_restart);
+ event_cancel(&peer->connection->t_gr_stale);
FOREACH_AFI_SAFI (afi, safi)
- EVENT_OFF(peer->t_llgr_stale[afi][safi]);
+ event_cancel(&peer->t_llgr_stale[afi][safi]);
- EVENT_OFF(peer->connection->t_pmax_restart);
- EVENT_OFF(peer->t_refresh_stalepath);
+ event_cancel(&peer->connection->t_pmax_restart);
+ event_cancel(&peer->t_refresh_stalepath);
fallthrough;
case Clearing:
- EVENT_OFF(connection->t_start);
- EVENT_OFF(connection->t_connect);
- EVENT_OFF(connection->t_holdtime);
+ event_cancel(&connection->t_start);
+ event_cancel(&connection->t_connect);
+ event_cancel(&connection->t_holdtime);
bgp_keepalives_off(connection);
- EVENT_OFF(connection->t_routeadv);
- EVENT_OFF(connection->t_delayopen);
+ event_cancel(&connection->t_routeadv);
+ event_cancel(&connection->t_delayopen);
break;
case BGP_STATUS_MAX:
flog_err(EC_LIB_DEVELOPMENT,
struct peer *peer = connection->peer;
/* stop the DelayOpenTimer if it is running */
- EVENT_OFF(connection->t_delayopen);
+ event_cancel(&connection->t_delayopen);
assert(!connection->t_write);
assert(!connection->t_read);
return;
UNSET_FLAG(peer->sflags, PEER_STATUS_NSF_WAIT);
- EVENT_OFF(connection->t_gr_stale);
+ event_cancel(&connection->t_gr_stale);
if (peer_dynamic_neighbor(peer) &&
!(CHECK_FLAG(peer->flags, PEER_FLAG_DELETE))) {
on ending the update delay. */
void bgp_update_delay_end(struct bgp *bgp)
{
- EVENT_OFF(bgp->t_update_delay);
- EVENT_OFF(bgp->t_establish_wait);
+ event_cancel(&bgp->t_update_delay);
+ event_cancel(&bgp->t_establish_wait);
/* Reset update-delay related state */
bgp->update_delay_over = 1;
if (!peer_established(connection))
continue;
- EVENT_OFF(connection->t_routeadv);
+ event_cancel(&connection->t_routeadv);
BGP_TIMER_ON(connection->t_routeadv, bgp_routeadv_timer, 0);
}
}
* different
* duration and schedule write thread immediately.
*/
- EVENT_OFF(connection->t_routeadv);
+ event_cancel(&connection->t_routeadv);
peer->synctime = monotime(NULL);
/* If suppress fib pending is enabled, route is advertised to
*/
diff = difftime(nowtime, peer->last_update);
if (diff > (double)peer->v_routeadv) {
- EVENT_OFF(connection->t_routeadv);
+ event_cancel(&connection->t_routeadv);
BGP_TIMER_ON(connection->t_routeadv, bgp_routeadv_timer, 0);
return;
}
remain = peer->v_routeadv;
diff = peer->v_routeadv - diff;
if (diff <= (double)remain) {
- EVENT_OFF(connection->t_routeadv);
+ event_cancel(&connection->t_routeadv);
BGP_TIMER_ON(connection->t_routeadv, bgp_routeadv_timer, diff);
}
}
zlog_info("Max med on startup ended - timer expired.");
bgp = EVENT_ARG(thread);
- EVENT_OFF(bgp->t_maxmed_onstartup);
+ event_cancel(&bgp->t_maxmed_onstartup);
bgp->maxmed_onstartup_over = 1;
bgp_maxmed_update(bgp);
zlog_info("Update delay ended - timer expired.");
bgp = EVENT_ARG(thread);
- EVENT_OFF(bgp->t_update_delay);
+ event_cancel(&bgp->t_update_delay);
bgp_update_delay_end(bgp);
}
zlog_info("Establish wait - timer expired.");
bgp = EVENT_ARG(thread);
- EVENT_OFF(bgp->t_establish_wait);
+ event_cancel(&bgp->t_establish_wait);
bgp_check_update_delay(bgp);
}
/* graceful restart */
if (connection->t_gr_stale) {
- EVENT_OFF(connection->t_gr_stale);
+ event_cancel(&connection->t_gr_stale);
if (bgp_debug_neighbor_events(peer))
zlog_debug("%pBP graceful restart stalepath timer stopped for %s",
peer, bgp_peer_get_connection_direction(connection));
/* Stop route-refresh stalepath timer */
if (peer->t_refresh_stalepath) {
- EVENT_OFF(peer->t_refresh_stalepath);
+ event_cancel(&peer->t_refresh_stalepath);
if (bgp_debug_neighbor_events(peer))
zlog_debug("%pBP route-refresh restart stalepath timer stopped for %s",
gr_info->t_select_deferral);
XFREE(MTYPE_TMP, info);
}
- EVENT_OFF(gr_info->t_select_deferral);
+ event_cancel(&gr_info->t_select_deferral);
gr_info->eor_received = 0;
}
}
bgp_writes_off(connection);
bgp_reads_off(connection);
- EVENT_OFF(connection->t_connect_check_r);
- EVENT_OFF(connection->t_connect_check_w);
+ event_cancel(&connection->t_connect_check_r);
+ event_cancel(&connection->t_connect_check_w);
- EVENT_OFF(connection->t_stop_with_notify);
+ event_cancel(&connection->t_stop_with_notify);
/* Stop all timers. */
- EVENT_OFF(connection->t_start);
- EVENT_OFF(connection->t_connect);
- EVENT_OFF(connection->t_holdtime);
- EVENT_OFF(connection->t_routeadv);
- EVENT_OFF(connection->t_delayopen);
+ event_cancel(&connection->t_start);
+ event_cancel(&connection->t_connect);
+ event_cancel(&connection->t_holdtime);
+ event_cancel(&connection->t_routeadv);
+ event_cancel(&connection->t_delayopen);
/* Clear input and output buffer. */
frr_with_mutex (&connection->io_mtx) {
assert(!connection->t_read);
assert(!connection->t_write);
- EVENT_OFF(connection->t_connect_check_r);
- EVENT_OFF(connection->t_connect_check_w);
+ event_cancel(&connection->t_connect_check_r);
+ event_cancel(&connection->t_connect_check_w);
/* Check file descriptor. */
slen = sizeof(status);
bgp_fsm_delayopen_timer_expire(struct peer_connection *connection)
{
/* Stop the DelayOpenTimer */
- EVENT_OFF(connection->t_delayopen);
+ event_cancel(&connection->t_delayopen);
/* Send open message to peer */
bgp_open_send(connection);
else {
UNSET_FLAG(peer->sflags, PEER_STATUS_NSF_MODE);
if (connection->t_gr_stale) {
- EVENT_OFF(connection->t_gr_stale);
+ event_cancel(&connection->t_gr_stale);
if (bgp_debug_neighbor_events(peer))
zlog_debug("%pBP graceful restart stalepath timer stopped for %s",
peer, bgp_peer_get_connection_direction(connection));
}
if (connection->t_gr_restart) {
- EVENT_OFF(connection->t_gr_restart);
+ event_cancel(&connection->t_gr_restart);
if (bgp_debug_neighbor_events(peer))
zlog_debug("%pBP graceful restart timer stopped for %s", peer,
bgp_peer_get_connection_direction(connection));
*/
FOREACH_AFI_SAFI (afi, safi) {
if (peer->t_llgr_stale[afi][safi]) {
- EVENT_OFF(peer->t_llgr_stale[afi][safi]);
+ event_cancel(&peer->t_llgr_stale[afi][safi]);
if (bgp_debug_neighbor_events(peer))
zlog_debug("%pBP Long-lived stale timer stopped for afi/safi: %d/%d for %s",
peer, afi, safi,
* of read-only mode.
*/
if (!bgp_update_delay_active(peer->bgp)) {
- EVENT_OFF(peer->connection->t_routeadv);
+ event_cancel(&peer->connection->t_routeadv);
BGP_TIMER_ON(peer->connection->t_routeadv, bgp_routeadv_timer,
0);
}
static enum bgp_fsm_state_progress
bgp_fsm_keepalive(struct peer_connection *connection)
{
- EVENT_OFF(connection->t_holdtime);
+ event_cancel(&connection->t_holdtime);
return BGP_FSM_SUCCESS;
}
static enum bgp_fsm_state_progress
bgp_fsm_update(struct peer_connection *connection)
{
- EVENT_OFF(connection->t_holdtime);
+ event_cancel(&connection->t_holdtime);
return BGP_FSM_SUCCESS;
}
break;
case Connect:
if (!has_valid_nexthops) {
- EVENT_OFF(connection->t_connect);
+ event_cancel(&connection->t_connect);
BGP_EVENT_ADD(connection, TCP_fatal_error);
}
break;
case Active:
if (has_valid_nexthops) {
- EVENT_OFF(connection->t_connect);
+ event_cancel(&connection->t_connect);
BGP_EVENT_ADD(connection, ConnectRetry_timer_expired);
}
break;
#include "network.h" // for ERRNO_IO_RETRY
#include "stream.h" // for stream_get_endp, stream_getw_from, str...
#include "ringbuf.h" // for ringbuf_remain, ringbuf_peek, ringbuf_...
-#include "frrevent.h" // for EVENT_OFF, EVENT_ARG, thread...
+#include "frrevent.h" // for event, EVENT_ARG, thread...
#include "bgpd/bgp_io.h"
#include "bgpd/bgp_debug.h" // for bgp_debug_neighbor_events, bgp_type_str
assert(fpt->running);
event_cancel_async(fpt->master, &connection->t_write, NULL);
- EVENT_OFF(connection->t_generate_updgrp_packets);
+ event_cancel(&connection->t_generate_updgrp_packets);
UNSET_FLAG(peer->connection->thread_flags, PEER_THREAD_WRITES_ON);
}
* from the connection_fifo
*/
peer_connection_fifo_fini(&bm->connection_fifo);
- EVENT_OFF(bm->e_process_packet);
+ event_cancel(&bm->e_process_packet);
pthread_mutex_destroy(&bm->peer_connection_mtx);
exit(0);
"[Error] accept() failed with error \"%s\" on BGP listener socket %d for BGP instance in VRF \"%s\"; refreshing socket",
safe_strerror(save_errno), accept_sock,
VRF_LOGNAME(vrf));
- EVENT_OFF(listener->thread);
+ event_cancel(&listener->thread);
} else {
flog_err_sys(
EC_LIB_SOCKET,
}
bgp_peer_reg_with_nht(dynamic_peer);
bgp_fsm_change_status(incoming, Active);
- EVENT_OFF(incoming->t_start);
+ event_cancel(&incoming->t_start);
if (peer_active(incoming) == BGP_PEER_ACTIVE) {
if (CHECK_FLAG(dynamic_peer->flags, PEER_FLAG_TIMER_DELAYOPEN))
}
bgp_peer_reg_with_nht(doppelganger);
bgp_fsm_change_status(incoming, Active);
- EVENT_OFF(incoming->t_start); /* created in peer_create() */
+ event_cancel(&incoming->t_start); /* created in peer_create() */
SET_FLAG(doppelganger->sflags, PEER_STATUS_ACCEPT_PEER);
/* Make dummy peer until read Open packet. */
for (ALL_LIST_ELEMENTS(bm->listen_sockets, node, next, listener)) {
if (listener->bgp == bgp) {
- EVENT_OFF(listener->thread);
+ event_cancel(&listener->thread);
close(listener->fd);
listnode_delete(bm->listen_sockets, listener);
XFREE(MTYPE_BGP_LISTENER, listener->name);
for (ALL_LIST_ELEMENTS(bm->listen_sockets, node, next, listener)) {
if (listener->bgp)
continue;
- EVENT_OFF(listener->thread);
+ event_cancel(&listener->thread);
close(listener->fd);
listnode_delete(bm->listen_sockets, listener);
XFREE(MTYPE_BGP_LISTENER, listener->name);
gr_info->t_select_deferral);
XFREE(MTYPE_TMP, info);
}
- EVENT_OFF(gr_info->t_select_deferral);
+ event_cancel(&gr_info->t_select_deferral);
gr_info->eor_required = 0;
gr_info->eor_received = 0;
/* Best path selection */
return BGP_PACKET_NOOP;
}
- EVENT_OFF(peer->t_refresh_stalepath);
+ event_cancel(&peer->t_refresh_stalepath);
SET_FLAG(peer->af_sflags[afi][safi], PEER_STATUS_EORR_RECEIVED);
UNSET_FLAG(peer->af_sflags[afi][safi],
thread_info = EVENT_ARG(t);
XFREE(MTYPE_TMP, thread_info);
- EVENT_OFF(bgp->gr_info[afi][safi].t_route_select);
+ event_cancel(&bgp->gr_info[afi][safi].t_route_select);
}
if (BGP_DEBUG(graceful_restart, GRACEFUL_RESTART)) {
if (!paf->t_announce_route)
return;
- EVENT_OFF(paf->t_announce_route);
+ event_cancel(&paf->t_announce_route);
}
/*
list_delete(&ntable->soft_reconfig_peers);
bgp_soft_reconfig_table_flag(ntable, false);
- EVENT_OFF(ntable->soft_reconfig_thread);
+ event_cancel(&ntable->soft_reconfig_thread);
}
}
/* If new update is received before the current timer timed out,
* turn it off and start a new timer.
*/
- EVENT_OFF(bm->t_rmap_update);
+ event_cancel(&bm->t_rmap_update);
/* rmap_update_timer of 0 means don't do route updates */
if (bm->rmap_update_timer) {
{
rpki_vrf->rtr_is_stopping = true;
if (is_running(rpki_vrf)) {
- EVENT_OFF(rpki_vrf->t_rpki_sync);
+ event_cancel(&rpki_vrf->t_rpki_sync);
rtr_mgr_stop(rpki_vrf->rtr_config);
rtr_mgr_free(rpki_vrf->rtr_config);
rpki_vrf->rtr_is_running = false;
if (subgrp->update_group)
UPDGRP_INCR_STAT(subgrp->update_group, subgrps_deleted);
- EVENT_OFF(subgrp->t_merge_check);
- EVENT_OFF(subgrp->t_coalesce);
+ event_cancel(&subgrp->t_merge_check);
+ event_cancel(&subgrp->t_coalesce);
bpacket_queue_cleanup(SUBGRP_PKTQ(subgrp));
subgroup_clear_table(subgrp);
bgp = EVENT_ARG(thread);
update_group_walk(bgp, update_group_default_originate_route_map_walkcb,
reason);
- EVENT_OFF(bgp->t_rmap_def_originate_eval);
+ event_cancel(&bgp->t_rmap_def_originate_eval);
}
/*
peer = PAF_PEER(paf);
struct peer_connection *connection = peer->connection;
- EVENT_OFF(connection->t_routeadv);
+ event_cancel(&connection->t_routeadv);
BGP_TIMER_ON(connection->t_routeadv, bgp_routeadv_timer,
0);
}
/* Cancel max-med onstartup if its on */
if (bgp->t_maxmed_onstartup) {
- EVENT_OFF(bgp->t_maxmed_onstartup);
+ event_cancel(&bgp->t_maxmed_onstartup);
bgp->maxmed_onstartup_over = 1;
}
* fired.
*/
if (!rmap_delay_timer && bm->t_rmap_update) {
- EVENT_OFF(bm->t_rmap_update);
+ event_cancel(&bm->t_rmap_update);
event_execute(bm->master, bgp_route_map_update_timer,
NULL, 0, NULL);
}
bgp->rmap_def_originate_eval_timer = no ? 0 : timer;
if (bgp->t_rmap_def_originate_eval)
- EVENT_OFF(bgp->t_rmap_def_originate_eval);
+ event_cancel(&bgp->t_rmap_def_originate_eval);
return CMD_SUCCESS;
}
static void bgp_config_start(void)
{
- EVENT_OFF(t_bgp_cfg);
+ event_cancel(&t_bgp_cfg);
event_add_timer(bm->master, bgp_config_end_timeout, NULL,
BGP_PRE_CONFIG_MAX_WAIT_SECONDS, &t_bgp_cfg);
}
if (!bgp_config_inprocess())
return;
- EVENT_OFF(t_bgp_cfg);
+ event_cancel(&t_bgp_cfg);
/* Start a new timer to make sure we don't send EoR
* before route-maps are processed.
FOREACH_AFI_SAFI_NSF (afi, safi) {
peer->nsf[afi][safi] = 0;
- EVENT_OFF(peer->t_llgr_stale[afi][safi]);
+ event_cancel(&peer->t_llgr_stale[afi][safi]);
}
if (peer->connection->t_gr_restart) {
- EVENT_OFF(peer->connection->t_gr_restart);
+ event_cancel(&peer->connection->t_gr_restart);
if (bgp_debug_neighbor_events(peer))
zlog_debug("%pBP graceful restart timer stopped", peer);
}
if (peer->connection->t_gr_stale) {
- EVENT_OFF(peer->connection->t_gr_stale);
+ event_cancel(&peer->connection->t_gr_stale);
if (bgp_debug_neighbor_events(peer))
zlog_debug(
"%pBP graceful restart stalepath timer stopped",
/* Stop timers. */
if (bgp->t_rmap_def_originate_eval)
- EVENT_OFF(bgp->t_rmap_def_originate_eval);
+ event_cancel(&bgp->t_rmap_def_originate_eval);
/* Bring down peers, so corresponding routes are purged. */
for (ALL_LIST_ELEMENTS(bgp->peer, node, next, peer)) {
hook_call(bgp_inst_delete, bgp);
FOREACH_AFI_SAFI (afi, safi)
- EVENT_OFF(bgp->t_revalidate[afi][safi]);
+ event_cancel(&bgp->t_revalidate[afi][safi]);
- EVENT_OFF(bgp->t_condition_check);
- EVENT_OFF(bgp->t_startup);
- EVENT_OFF(bgp->t_maxmed_onstartup);
- EVENT_OFF(bgp->t_update_delay);
- EVENT_OFF(bgp->t_establish_wait);
- EVENT_OFF(bgp->clearing_end);
+ event_cancel(&bgp->t_condition_check);
+ event_cancel(&bgp->t_startup);
+ event_cancel(&bgp->t_maxmed_onstartup);
+ event_cancel(&bgp->t_update_delay);
+ event_cancel(&bgp->t_establish_wait);
+ event_cancel(&bgp->clearing_end);
/* Set flag indicating bgp instance delete in progress */
SET_FLAG(bgp->flags, BGP_FLAG_DELETE_IN_PROGRESS);
XFREE(MTYPE_TMP, info);
}
- EVENT_OFF(gr_info->t_select_deferral);
+ event_cancel(&gr_info->t_select_deferral);
t = gr_info->t_route_select;
if (t) {
XFREE(MTYPE_TMP, info);
}
- EVENT_OFF(gr_info->t_route_select);
+ event_cancel(&gr_info->t_route_select);
}
/* Delete route flap dampening configuration */
/* Stop timers. */
if (bgp->t_rmap_def_originate_eval)
- EVENT_OFF(bgp->t_rmap_def_originate_eval);
+ event_cancel(&bgp->t_rmap_def_originate_eval);
/* Inform peers we're going down. */
for (ALL_LIST_ELEMENTS(bgp->peer, node, next, peer))
update_bgp_group_free(bgp);
/* Cancel peer connection errors event */
- EVENT_OFF(bgp->t_conn_errors);
+ event_cancel(&bgp->t_conn_errors);
/* Cleanup for peer connection batching */
while ((cinfo = bgp_clearing_info_pop(&bgp->clearing_list)) != NULL)
UNSET_FLAG(peer->sflags, PEER_STATUS_PREFIX_OVERFLOW);
if (peer->connection->t_pmax_restart) {
- EVENT_OFF(peer->connection->t_pmax_restart);
+ event_cancel(&peer->connection->t_pmax_restart);
if (bgp_debug_neighbor_events(peer))
zlog_debug(
"%pBP Maximum-prefix restart timer canceled",
UNSET_FLAG(peer->sflags, PEER_STATUS_PREFIX_OVERFLOW);
if (peer->connection->t_pmax_restart) {
- EVENT_OFF(peer->connection->t_pmax_restart);
+ event_cancel(&peer->connection->t_pmax_restart);
if (bgp_debug_neighbor_events(peer))
zlog_debug(
"%pBP Maximum-prefix restart timer cancelled",
if (bm->listen_sockets)
list_delete(&bm->listen_sockets);
- EVENT_OFF(bm->t_rmap_update);
- EVENT_OFF(bm->t_bgp_sync_label_manager);
- EVENT_OFF(bm->t_bgp_start_label_manager);
- EVENT_OFF(bm->t_bgp_zebra_route);
- EVENT_OFF(bm->t_bgp_zebra_l2_vni);
- EVENT_OFF(bm->t_bgp_zebra_l3_vni);
+ event_cancel(&bm->t_rmap_update);
+ event_cancel(&bm->t_bgp_sync_label_manager);
+ event_cancel(&bm->t_bgp_start_label_manager);
+ event_cancel(&bm->t_bgp_zebra_route);
+ event_cancel(&bm->t_bgp_zebra_l2_vni);
+ event_cancel(&bm->t_bgp_zebra_l3_vni);
bgp_mac_finish();
#ifdef ENABLE_BGP_VNC
if (!event_is_scheduled(bgp->clearing_end))
bgp_lock(bgp);
- EVENT_OFF(bgp->clearing_end);
+ event_cancel(&bgp->clearing_end);
event_add_timer_msec(bm->master, bgp_clearing_batch_end_event, bgp, 100, &bgp->clearing_end);
}
rwcb_del(&_rwcbhash, wcb);
XFREE(MTYPE_RFAPI_WITHDRAW, wcb);
- EVENT_OFF(bpi->extra->vnc->vnc.import.timer);
+ event_cancel(&bpi->extra->vnc->vnc.import.timer);
}
next = bpi->next;
rwcb_del(&_rwcbhash, wcb);
XFREE(MTYPE_RFAPI_WITHDRAW, wcb);
- EVENT_OFF(bpi->extra->vnc->vnc.import
+ event_cancel(&bpi->extra->vnc->vnc.import
.timer);
}
rwcb_del(&_rwcbhash, wcb);
XFREE(MTYPE_RFAPI_WITHDRAW, wcb);
- EVENT_OFF(bpi->extra->vnc->vnc.import.timer);
+ event_cancel(&bpi->extra->vnc->vnc.import.timer);
}
rfapiExpireEncapNow(import_table, rn, bpi);
}
rwcb_del(&_rwcbhash, wcb);
XFREE(MTYPE_RFAPI_WITHDRAW, wcb);
- EVENT_OFF(bpi->extra->vnc->vnc.import
+ event_cancel(&bpi->extra->vnc->vnc.import
.timer);
import_table->holddown_count[afi] -= 1;
rwcb_del(&_rwcbhash, wcb);
XFREE(MTYPE_RFAPI_WITHDRAW, wcb);
- EVENT_OFF(bpi->extra->vnc->vnc.import.timer);
+ event_cancel(&bpi->extra->vnc->vnc.import.timer);
}
rfapiExpireVpnNow(import_table, rn, bpi, 0);
}
rwcb_del(&_rwcbhash, wcb);
XFREE(MTYPE_RFAPI_WITHDRAW,
wcb);
- EVENT_OFF(bpi->extra->vnc->vnc
+ event_cancel(&bpi->extra->vnc->vnc
.import.timer);
}
} else {
while ((wcb = rwcb_pop(&_rwcbhash))) {
bpi = wcb->info;
assert(wcb == EVENT_ARG(bpi->extra->vnc->vnc.import.timer));
- EVENT_OFF(bpi->extra->vnc->vnc.import.timer);
+ event_cancel(&bpi->extra->vnc->vnc.import.timer);
timer_service_func = wcb->timer_service_func;
memset(&t, 0, sizeof(t));
rfapiMonitorDetachImport(m);
}
- EVENT_OFF(m->timer);
+ event_cancel(&m->timer);
/*
* remove from rfd list
rfapiMonitorDetachImport(m);
}
- EVENT_OFF(m->timer);
+ event_cancel(&m->timer);
XFREE(MTYPE_RFAPI_MONITOR, m);
rn->info = NULL;
#endif
}
- EVENT_OFF(mon_eth->timer);
+ event_cancel(&mon_eth->timer);
/*
* remove from rfd list
if (m->rfd->response_lifetime - remain < 2)
return;
- EVENT_OFF(m->timer);
+ event_cancel(&m->timer);
{
char buf[BUFSIZ];
if (m->rfd->response_lifetime - remain < 2)
return;
- EVENT_OFF(m->timer);
+ event_cancel(&m->timer);
{
char buf[BUFSIZ];
rfapiMonitorEthDetachImport(bgp, val);
}
- EVENT_OFF(val->timer);
+ event_cancel(&val->timer);
/*
* remove from rfd list
#if DEBUG_CLEANUP
zlog_debug("%s: ri %p, tcb %p", __func__, goner, tcb);
#endif
- EVENT_OFF(goner->timer);
+ event_cancel(&goner->timer);
rrtcb_del(&_rrtcbhash, tcb);
XFREE(MTYPE_RFAPI_RECENT_DELETE, tcb);
}
if (ri->timer) {
tcb = EVENT_ARG(ri->timer);
- EVENT_OFF(ri->timer);
+ event_cancel(&ri->timer);
} else {
tcb = XCALLOC(MTYPE_RFAPI_RECENT_DELETE,
sizeof(struct rfapi_rib_tcb));
tcb = EVENT_ARG(
ri->timer);
- EVENT_OFF(ri->timer);
+ event_cancel(&ri->timer);
rrtcb_del(&_rrtcbhash, tcb);
XFREE(MTYPE_RFAPI_RECENT_DELETE,
tcb);
struct rfapi_rib_tcb *tcb;
tcb = EVENT_ARG(ri->timer);
- EVENT_OFF(ri->timer);
+ event_cancel(&ri->timer);
rrtcb_del(&_rrtcbhash, tcb);
XFREE(MTYPE_RFAPI_RECENT_DELETE, tcb);
}
struct rfapi_rib_tcb *tcb;
tcb = EVENT_ARG(ori->timer);
- EVENT_OFF(ori->timer);
+ event_cancel(&ori->timer);
rrtcb_del(&_rrtcbhash, tcb);
XFREE(MTYPE_RFAPI_RECENT_DELETE, tcb);
}
struct rfapi_rib_tcb *tcb;
tcb = EVENT_ARG(ri->timer);
- EVENT_OFF(ri->timer);
+ event_cancel(&ri->timer);
rrtcb_del(&_rrtcbhash, tcb);
XFREE(MTYPE_RFAPI_RECENT_DELETE, tcb);
}
*/
while ((tcb = rrtcb_pop(&_rrtcbhash))) {
assert(tcb == EVENT_ARG(tcb->ri->timer));
- EVENT_OFF(tcb->ri->timer);
+ event_cancel(&tcb->ri->timer);
_rfapiRibExpireTimer(tcb); /* deletes hash entry, frees tcb */
}
}
* export expiration timer is already running on
* this route: cancel it
*/
- EVENT_OFF(eti->timer);
+ event_cancel(&eti->timer);
bgp_update(peer, prefix, /* prefix */
0, /* addpath_id */
* already running on
* this route: cancel it
*/
- EVENT_OFF(eti->timer);
+ event_cancel(&eti->timer);
vnc_zlog_debug_verbose(
"%s: calling bgp_update",
ZEBRA_ROUTE_VNC_DIRECT_RH,
BGP_ROUTE_REDISTRIBUTE);
if (eti) {
- EVENT_OFF(eti->timer);
+ event_cancel(&eti->timer);
vnc_eti_delete(eti);
}
stream_reset(fnc->ibuf);
stream_reset(fnc->obuf);
- EVENT_OFF(fnc->t_read);
- EVENT_OFF(fnc->t_write);
+ event_cancel(&fnc->t_read);
+ event_cancel(&fnc->t_write);
/* Reset the barrier value */
cleaning_p = true;
event_add_timer(fnc->fthread->master, fpm_process_wedged, fnc,
DPLANE_FPM_NL_WEDGIE_TIME, &fnc->t_wedged);
} else
- EVENT_OFF(fnc->t_wedged);
+ event_cancel(&fnc->t_wedged);
/*
* Let the dataplane thread know if there are items in the
return 0;
/* Disable all events and close socket. */
- EVENT_OFF(fnc->t_lspreset);
- EVENT_OFF(fnc->t_lspwalk);
- EVENT_OFF(fnc->t_nhgreset);
- EVENT_OFF(fnc->t_nhgwalk);
- EVENT_OFF(fnc->t_ribreset);
- EVENT_OFF(fnc->t_ribwalk);
- EVENT_OFF(fnc->t_rmacreset);
- EVENT_OFF(fnc->t_rmacwalk);
- EVENT_OFF(fnc->t_event);
- EVENT_OFF(fnc->t_nhg);
+ event_cancel(&fnc->t_lspreset);
+ event_cancel(&fnc->t_lspwalk);
+ event_cancel(&fnc->t_nhgreset);
+ event_cancel(&fnc->t_nhgwalk);
+ event_cancel(&fnc->t_ribreset);
+ event_cancel(&fnc->t_ribwalk);
+ event_cancel(&fnc->t_rmacreset);
+ event_cancel(&fnc->t_rmacwalk);
+ event_cancel(&fnc->t_event);
+ event_cancel(&fnc->t_nhg);
event_cancel_async(fnc->fthread->master, &fnc->t_read, NULL);
event_cancel_async(fnc->fthread->master, &fnc->t_write, NULL);
event_cancel_async(fnc->fthread->master, &fnc->t_connect, NULL);
XFREE(MTYPE_ZIF_DESC, zebra_if->desc);
- EVENT_OFF(zebra_if->speed_update);
+ event_cancel(&zebra_if->speed_update);
XFREE(MTYPE_ZINFO, zebra_if);
}
if (!irdp)
return;
- EVENT_OFF(irdp->t_advertise);
+ event_cancel(&irdp->t_advertise);
frr_each (if_connected, ifp->connected, ifc) {
p = ifc->address;
return;
irdp->flags |= IF_SOLICIT;
- EVENT_OFF(irdp->t_advertise);
+ event_cancel(&irdp->t_advertise);
timer = (frr_weak_random() % MAX_RESPONSE_DELAY) + 1;
void kernel_terminate(struct zebra_ns *zns, bool complete)
{
- EVENT_OFF(zns->t_netlink);
+ event_cancel(&zns->t_netlink);
kernel_nlsock_fini(&zns->netlink);
wheel_remove_item(zrouter.ra_wheel, ifp);
/*Turn off event for ICMPv6 join*/
- EVENT_OFF(zif->icmpv6_join_timer);
+ event_cancel(&zif->icmpv6_join_timer);
if (zif->rtadv.AdvSendAdvertisements)
rtadv_send_packet(zvrf->rtadv.sock, ifp, RA_SUPPRESS);
break;
case RTADV_STOP:
- EVENT_OFF(rtadv->ra_timer);
- EVENT_OFF(rtadv->ra_read);
+ event_cancel(&rtadv->ra_timer);
+ event_cancel(&rtadv->ra_read);
break;
case RTADV_TIMER:
event_add_timer(zrouter.master, rtadv_timer, zvrf, val,
zns_info_list_del(&zdplane_info.dg_zns_list, zi);
if (zdplane_info.dg_master) {
- EVENT_OFF(zi->t_read);
- EVENT_OFF(zi->t_request);
+ event_cancel(&zi->t_read);
+ event_cancel(&zi->t_request);
}
XFREE(MTYPE_DP_NS, zi);
}
/* Start auto recovery timer for this MAC */
- EVENT_OFF(mac->dad_mac_auto_recovery_timer);
+ event_cancel(&mac->dad_mac_auto_recovery_timer);
if (zvrf->dad_freeze && zvrf->dad_freeze_time) {
if (IS_ZEBRA_DEBUG_VXLAN) {
char mac_buf[MAC_BUF_SIZE];
zebra_evpn_mac_stop_hold_timer(mac);
/* Cancel auto recovery */
- EVENT_OFF(mac->dad_mac_auto_recovery_timer);
+ event_cancel(&mac->dad_mac_auto_recovery_timer);
/* If the MAC is freed before the neigh we will end up
* with a stale pointer against the neigh.
sizeof(mac_buf)));
}
- EVENT_OFF(mac->hold_timer);
+ event_cancel(&mac->hold_timer);
}
void zebra_evpn_sync_mac_del(struct zebra_mac *mac)
es->flags &= ~(ZEBRA_EVPNES_LOCAL | ZEBRA_EVPNES_READY_FOR_BGP);
- EVENT_OFF(es->df_delay_timer);
+ event_cancel(&es->df_delay_timer);
/* clear EVPN protodown flags on the access port */
zebra_evpn_mh_clear_protodown_es(es);
if (zmh_info->startup_delay_timer) {
if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
zlog_debug("startup-delay timer cancelled");
- EVENT_OFF(zmh_info->startup_delay_timer);
+ event_cancel(&zmh_info->startup_delay_timer);
}
if (zmh_info->startup_delay_time) {
listnode_delete(n->mac->neigh_list, n);
/* Cancel auto recovery */
- EVENT_OFF(n->dad_ip_auto_recovery_timer);
+ event_cancel(&n->dad_ip_auto_recovery_timer);
/* Cancel proxy hold timer */
zebra_evpn_neigh_stop_hold_timer(n);
nbr->dad_dup_detect_time = monotime(NULL);
/* Start auto recovery timer for this IP */
- EVENT_OFF(nbr->dad_ip_auto_recovery_timer);
+ event_cancel(&nbr->dad_ip_auto_recovery_timer);
if (zvrf->dad_freeze && zvrf->dad_freeze_time) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
nbr->detect_start_time.tv_sec = 0;
nbr->detect_start_time.tv_usec = 0;
nbr->dad_dup_detect_time = 0;
- EVENT_OFF(nbr->dad_ip_auto_recovery_timer);
+ event_cancel(&nbr->dad_ip_auto_recovery_timer);
if (CHECK_FLAG(nbr->flags, ZEBRA_NEIGH_LOCAL)) {
zebra_evpn_neigh_send_add_to_client(zevpn->vni, &nbr->ip,
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH)
zlog_debug("sync-neigh vni %u ip %pIA mac %pEA 0x%x hold stop",
n->zevpn->vni, &n->ip, &n->emac, n->flags);
- EVENT_OFF(n->hold_timer);
+ event_cancel(&n->hold_timer);
}
void zebra_evpn_sync_neigh_static_chg(struct zebra_neigh *n, bool old_n_static,
*/
static inline void zfpm_read_off(void)
{
- EVENT_OFF(zfpm_g->t_read);
+ event_cancel(&zfpm_g->t_read);
}
/*
*/
static inline void zfpm_write_off(void)
{
- EVENT_OFF(zfpm_g->t_write);
+ event_cancel(&zfpm_g->t_write);
}
static inline void zfpm_connect_off(void)
{
- EVENT_OFF(zfpm_g->t_connect);
+ event_cancel(&zfpm_g->t_connect);
}
static inline void zfpm_conn_down_off(void)
{
- EVENT_OFF(zfpm_g->t_conn_down);
+ event_cancel(&zfpm_g->t_conn_down);
}
/*
/*
* Start thread to push existing routes to the FPM.
*/
- EVENT_OFF(zfpm_g->t_conn_up);
+ event_cancel(&zfpm_g->t_conn_up);
zfpm_rnodes_iter_init(&zfpm_g->t_conn_up_state.iter);
zfpm_g->fpm_mac_dump_done = false;
return;
zfpm_debug("Stopping existing stats timer");
- EVENT_OFF(zfpm_g->t_stats);
+ event_cancel(&zfpm_g->t_stats);
}
/*
/* Cancel the stale timer */
if (info->t_stale_removal != NULL) {
- EVENT_OFF(info->t_stale_removal);
+ event_cancel(&info->t_stale_removal);
info->do_delete = true;
/* Process the stale routes */
event_execute(
TAILQ_REMOVE(&(client->gr_info_queue), info, gr_info);
- EVENT_OFF(info->t_stale_removal);
+ event_cancel(&info->t_stale_removal);
LOG_GR("%s: Instance info is being deleted for client %s vrf %s(%u)",
__func__, zebra_route_string(client->proto), VRF_LOGNAME(vrf),
LOG_GR("%s: Client %s route update complete for all AFI/SAFI in vrf %s(%d)",
__func__, zebra_route_string(client->proto),
VRF_LOGNAME(vrf), info->vrf_id);
- EVENT_OFF(info->t_stale_removal);
+ event_cancel(&info->t_stale_removal);
}
}
fd = zebra_netns_notify_current->u.fd;
if (zebra_netns_notify_current->master != NULL)
- EVENT_OFF(zebra_netns_notify_current);
+ event_cancel(&zebra_netns_notify_current);
/* auto-removal of notify items */
if (fd > 0)
nhe->nhg.nexthop);
}
- EVENT_OFF(nhe->timer);
+ event_cancel(&nhe->timer);
zebra_nhg_free_members(nhe);
nhe->nhg.nexthop);
}
- EVENT_OFF(nhe->timer);
+ event_cancel(&nhe->timer);
nexthops_free(nhe->nhg.nexthop);
nhe->refcnt++;
if (event_is_scheduled(nhe->timer)) {
- EVENT_OFF(nhe->timer);
+ event_cancel(&nhe->timer);
nhe->refcnt--;
UNSET_FLAG(nhe->flags, NEXTHOP_GROUP_KEEP_AROUND);
}
/* Dont call the dec API, we dont want to uninstall the ID */
old->refcnt = 0;
- EVENT_OFF(old->timer);
+ event_cancel(&old->timer);
zebra_nhg_free(old);
old = NULL;
}
free(ptm_cb.in_data);
/* Cancel events. */
- EVENT_OFF(ptm_cb.t_read);
- EVENT_OFF(ptm_cb.t_write);
- EVENT_OFF(ptm_cb.t_timer);
+ event_cancel(&ptm_cb.t_read);
+ event_cancel(&ptm_cb.t_write);
+ event_cancel(&ptm_cb.t_timer);
if (ptm_cb.wb)
buffer_free(ptm_cb.wb);
ptm_cb.reconnect_time, &ptm_cb.t_timer);
return -1;
case BUFFER_EMPTY:
- EVENT_OFF(ptm_cb.t_write);
+ event_cancel(&ptm_cb.t_write);
break;
case BUFFER_PENDING:
event_add_write(zrouter.master, zebra_ptm_flush_messages, NULL,
dplane_pw_uninstall(pw);
}
- EVENT_OFF(pw->install_retry_timer);
+ event_cancel(&pw->install_retry_timer);
/* unlink and release memory */
RB_REMOVE(zebra_pw_head, &zvrf->pseudowires, pw);
pw->vrf_id, pw->ifname, PW_INSTALL_RETRY_INTERVAL);
/* schedule to retry later */
- EVENT_OFF(pw->install_retry_timer);
+ event_cancel(&pw->install_retry_timer);
event_add_timer(zrouter.master, zebra_pw_install_retry, pw,
PW_INSTALL_RETRY_INTERVAL, &pw->install_retry_timer);
ctx = EVENT_ARG(t_rib_update_threads[i]);
rib_update_ctx_fini(&ctx);
- EVENT_OFF(t_rib_update_threads[i]);
+ event_cancel(&t_rib_update_threads[i]);
}
}
}
{
struct zebra_dplane_ctx *ctx;
- EVENT_OFF(t_dplane);
+ event_cancel(&t_dplane);
ctx = dplane_ctx_dequeue(&rib_dplane_q);
while (ctx) {
if (!value && zebra_t_rmap_update) {
/* Event driven route map updates is being disabled */
/* But there's a pending timer. Fire it off now */
- EVENT_OFF(zebra_t_rmap_update);
+ event_cancel(&zebra_t_rmap_update);
zebra_route_map_update_timer(NULL);
}
}
/* Set zebra_rmap_update_timer to 0 so that it wont schedule again */
zebra_rmap_update_timer = 0;
/* Thread off if any scheduled already */
- EVENT_OFF(zebra_t_rmap_update);
+ event_cancel(&zebra_t_rmap_update);
route_map_finish();
}
{
/* rmap_update_timer of 0 means don't do route updates */
if (zebra_rmap_update_timer)
- EVENT_OFF(zebra_t_rmap_update);
+ event_cancel(&zebra_t_rmap_update);
event_add_timer(zrouter.master, zebra_route_map_update_timer, NULL,
zebra_rmap_update_timer, &zebra_t_rmap_update);
zrouter.ra_wheel = NULL;
}
- EVENT_OFF(zrouter.t_rib_sweep);
+ event_cancel(&zrouter.t_rib_sweep);
RB_FOREACH_SAFE (zrt, zebra_router_table_head, &zrouter.tables, tmp)
zebra_router_free_table(zrt);
mac->detect_start_time.tv_sec = 0;
mac->detect_start_time.tv_usec = 0;
mac->dad_dup_detect_time = 0;
- EVENT_OFF(mac->dad_mac_auto_recovery_timer);
+ event_cancel(&mac->dad_mac_auto_recovery_timer);
/* warn-only action return */
if (!zvrf->dad_freeze)
nbr->detect_start_time.tv_sec = 0;
nbr->detect_start_time.tv_usec = 0;
nbr->dad_dup_detect_time = 0;
- EVENT_OFF(nbr->dad_ip_auto_recovery_timer);
+ event_cancel(&nbr->dad_ip_auto_recovery_timer);
if (!!CHECK_FLAG(nbr->flags, ZEBRA_NEIGH_LOCAL)) {
zebra_evpn_neigh_send_add_to_client(zevpn->vni, ip, &nbr->emac,
mac->detect_start_time.tv_sec = 0;
mac->detect_start_time.tv_usec = 0;
mac->dad_dup_detect_time = 0;
- EVENT_OFF(mac->dad_mac_auto_recovery_timer);
+ event_cancel(&mac->dad_mac_auto_recovery_timer);
/* Remove all IPs as duplicate associcated with this MAC */
for (ALL_LIST_ELEMENTS_RO(mac->neigh_list, node, nbr)) {
atomic_store_explicit(&client->pthread->running, false,
memory_order_relaxed);
- EVENT_OFF(client->t_read);
- EVENT_OFF(client->t_write);
+ event_cancel(&client->t_read);
+ event_cancel(&client->t_write);
zserv_event(client, ZSERV_HANDLE_CLIENT_FAIL);
}
zebra_route_string(client->proto));
event_cancel_event(zrouter.master, client);
- EVENT_OFF(client->t_cleanup);
- EVENT_OFF(client->t_process);
+ event_cancel(&client->t_cleanup);
+ event_cancel(&client->t_process);
/* destroy pthread */
frr_pthread_destroy(client->pthread);