summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
Diffstat (limited to 'zebra')
-rw-r--r--zebra/dplane_fpm_nl.c52
-rw-r--r--zebra/interface.c4
-rw-r--r--zebra/irdp_main.c6
-rw-r--r--zebra/irdp_packet.c2
-rw-r--r--zebra/kernel_netlink.c4
-rw-r--r--zebra/kernel_socket.c2
-rw-r--r--zebra/rtadv.c10
-rw-r--r--zebra/zebra_dplane.c8
-rw-r--r--zebra/zebra_evpn_mac.c10
-rw-r--r--zebra/zebra_evpn_mh.c6
-rw-r--r--zebra/zebra_evpn_neigh.c10
-rw-r--r--zebra/zebra_evpn_neigh.h2
-rw-r--r--zebra/zebra_fpm.c10
-rw-r--r--zebra/zebra_gr.c8
-rw-r--r--zebra/zebra_mlag.c2
-rw-r--r--zebra/zebra_netns_notify.c6
-rw-r--r--zebra/zebra_nhg.c10
-rw-r--r--zebra/zebra_ptm.c10
-rw-r--r--zebra/zebra_pw.c6
-rw-r--r--zebra/zebra_rib.c2
-rw-r--r--zebra/zebra_routemap.c6
-rw-r--r--zebra/zebra_router.c2
-rw-r--r--zebra/zebra_vxlan.c6
-rw-r--r--zebra/zserv.c22
24 files changed, 103 insertions, 103 deletions
diff --git a/zebra/dplane_fpm_nl.c b/zebra/dplane_fpm_nl.c
index 03dd23febb..54bbc99335 100644
--- a/zebra/dplane_fpm_nl.c
+++ b/zebra/dplane_fpm_nl.c
@@ -437,8 +437,8 @@ static void fpm_reconnect(struct fpm_nl_ctx *fnc)
stream_reset(fnc->ibuf);
stream_reset(fnc->obuf);
- THREAD_OFF(fnc->t_read);
- THREAD_OFF(fnc->t_write);
+ EVENT_OFF(fnc->t_read);
+ EVENT_OFF(fnc->t_write);
/* FPM is disabled, don't attempt to connect. */
if (fnc->disabled)
@@ -450,7 +450,7 @@ static void fpm_reconnect(struct fpm_nl_ctx *fnc)
static void fpm_read(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
fpm_msg_hdr_t fpm;
ssize_t rv;
char buf[65535];
@@ -612,7 +612,7 @@ static void fpm_read(struct event *t)
static void fpm_write(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
socklen_t statuslen;
ssize_t bwritten;
int rv, status;
@@ -716,7 +716,7 @@ static void fpm_write(struct event *t)
static void fpm_connect(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
struct sockaddr_in *sin = (struct sockaddr_in *)&fnc->addr;
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&fnc->addr;
socklen_t slen;
@@ -1022,7 +1022,7 @@ static int fpm_lsp_send_cb(struct hash_bucket *bucket, void *arg)
static void fpm_lsp_send(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
struct zebra_vrf *zvrf = vrf_info_lookup(VRF_DEFAULT);
struct fpm_lsp_arg fla;
@@ -1082,7 +1082,7 @@ static int fpm_nhg_send_cb(struct hash_bucket *bucket, void *arg)
static void fpm_nhg_send(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
struct fpm_nhg_arg fna;
fna.fnc = fnc;
@@ -1111,7 +1111,7 @@ static void fpm_nhg_send(struct event *t)
*/
static void fpm_rib_send(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
rib_dest_t *dest;
struct route_node *rn;
struct route_table *rt;
@@ -1218,7 +1218,7 @@ static void fpm_rmac_send(struct event *t)
{
struct fpm_rmac_arg fra;
- fra.fnc = THREAD_ARG(t);
+ fra.fnc = EVENT_ARG(t);
fra.ctx = dplane_ctx_alloc();
fra.complete = true;
hash_iterate(zrouter.l3vni_table, fpm_enqueue_l3vni_table, &fra);
@@ -1242,7 +1242,7 @@ static void fpm_nhg_reset_cb(struct hash_bucket *bucket, void *arg)
static void fpm_nhg_reset(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
hash_iterate(zrouter.nhgs_id, fpm_nhg_reset_cb, NULL);
@@ -1262,7 +1262,7 @@ static void fpm_lsp_reset_cb(struct hash_bucket *bucket, void *arg)
static void fpm_lsp_reset(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
struct zebra_vrf *zvrf = vrf_info_lookup(VRF_DEFAULT);
hash_iterate(zvrf->lsp_table, fpm_lsp_reset_cb, NULL);
@@ -1276,7 +1276,7 @@ static void fpm_lsp_reset(struct event *t)
*/
static void fpm_rib_reset(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
rib_dest_t *dest;
struct route_node *rn;
struct route_table *rt;
@@ -1317,7 +1317,7 @@ static void fpm_unset_l3vni_table(struct hash_bucket *bucket, void *arg)
static void fpm_rmac_reset(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
hash_iterate(zrouter.l3vni_table, fpm_unset_l3vni_table, NULL);
@@ -1328,7 +1328,7 @@ static void fpm_rmac_reset(struct event *t)
static void fpm_process_queue(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
struct zebra_dplane_ctx *ctx;
bool no_bufs = false;
uint64_t processed_contexts = 0;
@@ -1389,8 +1389,8 @@ static void fpm_process_queue(struct event *t)
*/
static void fpm_process_event(struct event *t)
{
- struct fpm_nl_ctx *fnc = THREAD_ARG(t);
- enum fpm_nl_events event = THREAD_VAL(t);
+ struct fpm_nl_ctx *fnc = EVENT_ARG(t);
+ enum fpm_nl_events event = EVENT_VAL(t);
switch (event) {
case FNE_DISABLE:
@@ -1474,16 +1474,16 @@ static int fpm_nl_start(struct zebra_dplane_provider *prov)
static int fpm_nl_finish_early(struct fpm_nl_ctx *fnc)
{
/* Disable all events and close socket. */
- THREAD_OFF(fnc->t_lspreset);
- THREAD_OFF(fnc->t_lspwalk);
- THREAD_OFF(fnc->t_nhgreset);
- THREAD_OFF(fnc->t_nhgwalk);
- THREAD_OFF(fnc->t_ribreset);
- THREAD_OFF(fnc->t_ribwalk);
- THREAD_OFF(fnc->t_rmacreset);
- THREAD_OFF(fnc->t_rmacwalk);
- THREAD_OFF(fnc->t_event);
- THREAD_OFF(fnc->t_nhg);
+ 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_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);
diff --git a/zebra/interface.c b/zebra/interface.c
index 9f05a8d117..03376afc09 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -53,7 +53,7 @@ static void if_down_del_nbr_connected(struct interface *ifp);
static void if_zebra_speed_update(struct event *thread)
{
- struct interface *ifp = THREAD_ARG(thread);
+ struct interface *ifp = EVENT_ARG(thread);
struct zebra_if *zif = ifp->info;
uint32_t new_speed;
bool changed = false;
@@ -223,7 +223,7 @@ static int if_zebra_delete_hook(struct interface *ifp)
XFREE(MTYPE_ZIF_DESC, zebra_if->desc);
- THREAD_OFF(zebra_if->speed_update);
+ EVENT_OFF(zebra_if->speed_update);
XFREE(MTYPE_ZINFO, zebra_if);
}
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index 06a5b66005..1e520283f9 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -193,7 +193,7 @@ static void irdp_advertisement(struct interface *ifp, struct prefix *p)
void irdp_send_thread(struct event *t_advert)
{
uint32_t timer, tmp;
- struct interface *ifp = THREAD_ARG(t_advert);
+ struct interface *ifp = EVENT_ARG(t_advert);
struct zebra_if *zi = ifp->info;
struct irdp_interface *irdp = zi->irdp;
struct prefix *p;
@@ -245,7 +245,7 @@ void irdp_advert_off(struct interface *ifp)
if (!irdp)
return;
- THREAD_OFF(irdp->t_advertise);
+ EVENT_OFF(irdp->t_advertise);
if (ifp->connected)
for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, ifc)) {
@@ -280,7 +280,7 @@ void process_solicit(struct interface *ifp)
return;
irdp->flags |= IF_SOLICIT;
- THREAD_OFF(irdp->t_advertise);
+ EVENT_OFF(irdp->t_advertise);
timer = (frr_weak_random() % MAX_RESPONSE_DELAY) + 1;
diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c
index e821d375ef..0ccc0af41e 100644
--- a/zebra/irdp_packet.c
+++ b/zebra/irdp_packet.c
@@ -217,7 +217,7 @@ void irdp_read_raw(struct event *r)
char buf[IRDP_RX_BUF];
int ret, ifindex = 0;
- int irdp_sock = THREAD_FD(r);
+ int irdp_sock = EVENT_FD(r);
event_add_read(zrouter.master, irdp_read_raw, NULL, irdp_sock,
&t_irdp_raw);
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 3fbaefe8a0..9cd06c1a09 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -484,7 +484,7 @@ static int dplane_netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
static void kernel_read(struct event *thread)
{
- struct zebra_ns *zns = (struct zebra_ns *)THREAD_ARG(thread);
+ struct zebra_ns *zns = (struct zebra_ns *)EVENT_ARG(thread);
struct zebra_dplane_info dp_info;
/* Capture key info from ns struct */
@@ -1959,7 +1959,7 @@ static void kernel_nlsock_fini(struct nlsock *nls)
void kernel_terminate(struct zebra_ns *zns, bool complete)
{
- THREAD_OFF(zns->t_netlink);
+ EVENT_OFF(zns->t_netlink);
kernel_nlsock_fini(&zns->netlink);
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 6a32f523d7..e8041dce08 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -1326,7 +1326,7 @@ static void kernel_read(struct event *thread)
} buf;
/* Fetch routing socket. */
- sock = THREAD_FD(thread);
+ sock = EVENT_FD(thread);
nbytes = read(sock, &buf, sizeof(buf));
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 4fece96f62..f205ab01e9 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -477,7 +477,7 @@ no_more_opts:
static void rtadv_timer(struct event *thread)
{
- struct zebra_vrf *zvrf = THREAD_ARG(thread);
+ struct zebra_vrf *zvrf = EVENT_ARG(thread);
struct vrf *vrf;
struct interface *ifp;
struct zebra_if *zif;
@@ -825,9 +825,9 @@ static void rtadv_read(struct event *thread)
struct sockaddr_in6 from;
ifindex_t ifindex = 0;
int hoplimit = -1;
- struct zebra_vrf *zvrf = THREAD_ARG(thread);
+ struct zebra_vrf *zvrf = EVENT_ARG(thread);
- sock = THREAD_FD(thread);
+ sock = EVENT_FD(thread);
zvrf->rtadv.ra_read = NULL;
/* Register myself. */
@@ -2806,8 +2806,8 @@ static void rtadv_event(struct zebra_vrf *zvrf, enum rtadv_event event, int val)
&rtadv->ra_timer);
break;
case RTADV_STOP:
- THREAD_OFF(rtadv->ra_timer);
- THREAD_OFF(rtadv->ra_read);
+ EVENT_OFF(rtadv->ra_timer);
+ EVENT_OFF(rtadv->ra_read);
break;
case RTADV_TIMER:
event_add_timer(zrouter.master, rtadv_timer, zvrf, val,
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index 8d5ccac22c..5682b08f03 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -5775,7 +5775,7 @@ bool dplane_provider_is_threaded(const struct zebra_dplane_provider *prov)
*/
static void dplane_incoming_read(struct event *event)
{
- struct dplane_zns_info *zi = THREAD_ARG(event);
+ struct dplane_zns_info *zi = EVENT_ARG(event);
kernel_dplane_read(&zi->info);
@@ -5790,7 +5790,7 @@ static void dplane_incoming_read(struct event *event)
*/
static void dplane_incoming_request(struct event *event)
{
- struct dplane_zns_info *zi = THREAD_ARG(event);
+ struct dplane_zns_info *zi = EVENT_ARG(event);
/* Start read task */
event_add_read(zdplane_info.dg_master, dplane_incoming_read, zi,
@@ -6607,8 +6607,8 @@ static void dplane_check_shutdown_status(struct event *event)
zns_info_list_del(&zdplane_info.dg_zns_list, zi);
if (zdplane_info.dg_master) {
- THREAD_OFF(zi->t_read);
- THREAD_OFF(zi->t_request);
+ EVENT_OFF(zi->t_read);
+ EVENT_OFF(zi->t_request);
}
XFREE(MTYPE_DP_NS, zi);
diff --git a/zebra/zebra_evpn_mac.c b/zebra/zebra_evpn_mac.c
index 900c352df1..c7252e48bc 100644
--- a/zebra/zebra_evpn_mac.c
+++ b/zebra/zebra_evpn_mac.c
@@ -386,7 +386,7 @@ static void zebra_evpn_dad_mac_auto_recovery_exp(struct event *t)
struct listnode *node = NULL;
struct zebra_neigh *nbr = NULL;
- mac = THREAD_ARG(t);
+ mac = EVENT_ARG(t);
/* since this is asynchronous we need sanity checks*/
zvrf = vrf_info_lookup(mac->zevpn->vrf_id);
@@ -575,7 +575,7 @@ static void zebra_evpn_dup_addr_detect_for_mac(struct zebra_vrf *zvrf,
}
/* Start auto recovery timer for this MAC */
- THREAD_OFF(mac->dad_mac_auto_recovery_timer);
+ EVENT_OFF(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];
@@ -1152,7 +1152,7 @@ int zebra_evpn_mac_del(struct zebra_evpn *zevpn, struct zebra_mac *mac)
zebra_evpn_mac_stop_hold_timer(mac);
/* Cancel auto recovery */
- THREAD_OFF(mac->dad_mac_auto_recovery_timer);
+ EVENT_OFF(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.
@@ -1508,7 +1508,7 @@ static void zebra_evpn_mac_hold_exp_cb(struct event *t)
bool old_static;
bool new_static;
- mac = THREAD_ARG(t);
+ mac = EVENT_ARG(t);
/* the purpose of the hold timer is to age out the peer-active
* flag
*/
@@ -1581,7 +1581,7 @@ void zebra_evpn_mac_stop_hold_timer(struct zebra_mac *mac)
sizeof(mac_buf)));
}
- THREAD_OFF(mac->hold_timer);
+ EVENT_OFF(mac->hold_timer);
}
void zebra_evpn_sync_mac_del(struct zebra_mac *mac)
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c
index 1aee64b60a..bf488ca316 100644
--- a/zebra/zebra_evpn_mh.c
+++ b/zebra/zebra_evpn_mh.c
@@ -2205,7 +2205,7 @@ static void zebra_evpn_es_df_delay_exp_cb(struct event *t)
{
struct zebra_evpn_es *es;
- es = THREAD_ARG(t);
+ es = EVENT_ARG(t);
if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
zlog_debug("es %s df-delay expired", es->esi_str);
@@ -2314,7 +2314,7 @@ static void zebra_evpn_es_local_info_clear(struct zebra_evpn_es **esp)
es->flags &= ~(ZEBRA_EVPNES_LOCAL | ZEBRA_EVPNES_READY_FOR_BGP);
- THREAD_OFF(es->df_delay_timer);
+ EVENT_OFF(es->df_delay_timer);
/* clear EVPN protodown flags on the access port */
zebra_evpn_mh_clear_protodown_es(es);
@@ -3931,7 +3931,7 @@ static void zebra_evpn_mh_startup_delay_timer_start(const char *rc)
if (zmh_info->startup_delay_timer) {
if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
zlog_debug("startup-delay timer cancelled");
- THREAD_OFF(zmh_info->startup_delay_timer);
+ EVENT_OFF(zmh_info->startup_delay_timer);
}
if (zmh_info->startup_delay_time) {
diff --git a/zebra/zebra_evpn_neigh.c b/zebra/zebra_evpn_neigh.c
index 2405b2cd2d..74141e4f34 100644
--- a/zebra/zebra_evpn_neigh.c
+++ b/zebra/zebra_evpn_neigh.c
@@ -405,7 +405,7 @@ static void zebra_evpn_neigh_hold_exp_cb(struct event *t)
bool old_n_static;
bool new_n_static;
- n = THREAD_ARG(t);
+ n = EVENT_ARG(t);
/* the purpose of the hold timer is to age out the peer-active
* flag
*/
@@ -576,7 +576,7 @@ int zebra_evpn_neigh_del(struct zebra_evpn *zevpn, struct zebra_neigh *n)
listnode_delete(n->mac->neigh_list, n);
/* Cancel auto recovery */
- THREAD_OFF(n->dad_ip_auto_recovery_timer);
+ EVENT_OFF(n->dad_ip_auto_recovery_timer);
/* Cancel proxy hold timer */
zebra_evpn_neigh_stop_hold_timer(n);
@@ -1086,7 +1086,7 @@ static void zebra_evpn_dad_ip_auto_recovery_exp(struct event *t)
struct zebra_neigh *nbr = NULL;
struct zebra_evpn *zevpn = NULL;
- nbr = THREAD_ARG(t);
+ nbr = EVENT_ARG(t);
/* since this is asynchronous we need sanity checks*/
zvrf = vrf_info_lookup(nbr->zevpn->vrf_id);
@@ -1223,7 +1223,7 @@ static void zebra_evpn_dup_addr_detect_for_neigh(
nbr->dad_dup_detect_time = monotime(NULL);
/* Start auto recovery timer for this IP */
- THREAD_OFF(nbr->dad_ip_auto_recovery_timer);
+ EVENT_OFF(nbr->dad_ip_auto_recovery_timer);
if (zvrf->dad_freeze && zvrf->dad_freeze_time) {
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
@@ -1680,7 +1680,7 @@ void zebra_evpn_clear_dup_neigh_hash(struct hash_bucket *bucket, void *ctxt)
nbr->detect_start_time.tv_sec = 0;
nbr->detect_start_time.tv_usec = 0;
nbr->dad_dup_detect_time = 0;
- THREAD_OFF(nbr->dad_ip_auto_recovery_timer);
+ EVENT_OFF(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,
diff --git a/zebra/zebra_evpn_neigh.h b/zebra/zebra_evpn_neigh.h
index 67fef799c2..c82b3673b1 100644
--- a/zebra/zebra_evpn_neigh.h
+++ b/zebra/zebra_evpn_neigh.h
@@ -158,7 +158,7 @@ static inline void zebra_evpn_neigh_stop_hold_timer(struct zebra_neigh *n)
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);
- THREAD_OFF(n->hold_timer);
+ EVENT_OFF(n->hold_timer);
}
void zebra_evpn_sync_neigh_static_chg(struct zebra_neigh *n, bool old_n_static,
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index db277e96ef..0842b4431a 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -481,7 +481,7 @@ static inline void zfpm_write_on(void)
*/
static inline void zfpm_read_off(void)
{
- THREAD_OFF(zfpm_g->t_read);
+ EVENT_OFF(zfpm_g->t_read);
}
/*
@@ -489,12 +489,12 @@ static inline void zfpm_read_off(void)
*/
static inline void zfpm_write_off(void)
{
- THREAD_OFF(zfpm_g->t_write);
+ EVENT_OFF(zfpm_g->t_write);
}
static inline void zfpm_connect_off(void)
{
- THREAD_OFF(zfpm_g->t_connect);
+ EVENT_OFF(zfpm_g->t_connect);
}
/*
@@ -568,7 +568,7 @@ static void zfpm_connection_up(const char *detail)
/*
* Start thread to push existing routes to the FPM.
*/
- THREAD_OFF(zfpm_g->t_conn_up);
+ EVENT_OFF(zfpm_g->t_conn_up);
zfpm_rnodes_iter_init(&zfpm_g->t_conn_up_state.iter);
zfpm_g->fpm_mac_dump_done = false;
@@ -1697,7 +1697,7 @@ static void zfpm_stop_stats_timer(void)
return;
zfpm_debug("Stopping existing stats timer");
- THREAD_OFF(zfpm_g->t_stats);
+ EVENT_OFF(zfpm_g->t_stats);
}
/*
diff --git a/zebra/zebra_gr.c b/zebra/zebra_gr.c
index 4d0caba89e..3106b82c49 100644
--- a/zebra/zebra_gr.c
+++ b/zebra/zebra_gr.c
@@ -80,7 +80,7 @@ void zebra_gr_stale_client_cleanup(struct list *client_list)
/* Cancel the stale timer */
if (info->t_stale_removal != NULL) {
- THREAD_OFF(info->t_stale_removal);
+ EVENT_OFF(info->t_stale_removal);
info->t_stale_removal = NULL;
/* Process the stale routes */
event_execute(
@@ -115,7 +115,7 @@ static void zebra_gr_client_info_delte(struct zserv *client,
TAILQ_REMOVE(&(client->gr_info_queue), info, gr_info);
- THREAD_OFF(info->t_stale_removal);
+ EVENT_OFF(info->t_stale_removal);
XFREE(MTYPE_ZEBRA_GR, info->current_prefix);
@@ -463,7 +463,7 @@ void zread_client_capabilities(ZAPI_HANDLER_ARGS)
*/
static void zebra_gr_route_stale_delete_timer_expiry(struct event *thread)
{
- struct client_gr_info *info = THREAD_ARG(thread);
+ struct client_gr_info *info = EVENT_ARG(thread);
int32_t cnt = 0;
struct zserv *client;
struct vrf *vrf = vrf_lookup_by_id(info->vrf_id);
@@ -692,7 +692,7 @@ static void zebra_gr_process_client_stale_routes(struct zserv *client,
LOG_GR("%s: Client %s canceled stale delete timer vrf %s(%d)",
__func__, zebra_route_string(client->proto),
VRF_LOGNAME(vrf), info->vrf_id);
- THREAD_OFF(info->t_stale_removal);
+ EVENT_OFF(info->t_stale_removal);
event_execute(zrouter.master,
zebra_gr_route_stale_delete_timer_expiry, info,
0);
diff --git a/zebra/zebra_mlag.c b/zebra/zebra_mlag.c
index 18bbd2fd47..6713dbc967 100644
--- a/zebra/zebra_mlag.c
+++ b/zebra/zebra_mlag.c
@@ -294,7 +294,7 @@ static void zebra_mlag_publish_process_state(struct zserv *client,
*/
static void zebra_mlag_post_data_from_main_thread(struct event *thread)
{
- struct stream *s = THREAD_ARG(thread);
+ struct stream *s = EVENT_ARG(thread);
struct stream *zebra_s = NULL;
struct listnode *node;
struct zserv *client;
diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c
index 9ceecb5e97..5ccff635fe 100644
--- a/zebra/zebra_netns_notify.c
+++ b/zebra/zebra_netns_notify.c
@@ -231,7 +231,7 @@ static bool zebra_ns_notify_is_default_netns(const char *name)
static void zebra_ns_ready_read(struct event *t)
{
- struct zebra_netns_info *zns_info = THREAD_ARG(t);
+ struct zebra_netns_info *zns_info = EVENT_ARG(t);
const char *netnspath;
int err, stop_retry = 0;
@@ -282,7 +282,7 @@ static void zebra_ns_ready_read(struct event *t)
static void zebra_ns_notify_read(struct event *t)
{
- int fd_monitor = THREAD_FD(t);
+ int fd_monitor = EVENT_FD(t);
struct inotify_event *event;
char buf[BUFSIZ];
ssize_t len;
@@ -442,7 +442,7 @@ void zebra_ns_notify_close(void)
fd = zebra_netns_notify_current->u.fd;
if (zebra_netns_notify_current->master != NULL)
- THREAD_OFF(zebra_netns_notify_current);
+ EVENT_OFF(zebra_netns_notify_current);
/* auto-removal of notify items */
if (fd > 0)
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index 23156d8bf2..8616b14050 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -1619,7 +1619,7 @@ void zebra_nhg_free(struct nhg_hash_entry *nhe)
nhe->nhg.nexthop);
}
- THREAD_OFF(nhe->timer);
+ EVENT_OFF(nhe->timer);
zebra_nhg_free_members(nhe);
@@ -1644,7 +1644,7 @@ void zebra_nhg_hash_free(void *p)
nhe->nhg.nexthop);
}
- THREAD_OFF(nhe->timer);
+ EVENT_OFF(nhe->timer);
nexthops_free(nhe->nhg.nexthop);
@@ -1685,7 +1685,7 @@ void zebra_nhg_hash_free_zero_id(struct hash_bucket *b, void *arg)
static void zebra_nhg_timer(struct event *thread)
{
- struct nhg_hash_entry *nhe = THREAD_ARG(thread);
+ struct nhg_hash_entry *nhe = EVENT_ARG(thread);
if (IS_ZEBRA_DEBUG_NHG_DETAIL)
zlog_debug("Nexthop Timer for nhe: %pNG", nhe);
@@ -1728,7 +1728,7 @@ void zebra_nhg_increment_ref(struct nhg_hash_entry *nhe)
nhe->refcnt++;
if (event_is_scheduled(nhe->timer)) {
- THREAD_OFF(nhe->timer);
+ EVENT_OFF(nhe->timer);
nhe->refcnt--;
UNSET_FLAG(nhe->flags, NEXTHOP_GROUP_KEEP_AROUND);
}
@@ -3507,7 +3507,7 @@ struct nhg_hash_entry *zebra_nhg_proto_add(uint32_t id, int type,
/* Dont call the dec API, we dont want to uninstall the ID */
old->refcnt = 0;
- THREAD_OFF(old->timer);
+ EVENT_OFF(old->timer);
zebra_nhg_free(old);
old = NULL;
}
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c
index e77dcedd9e..a1fee840df 100644
--- a/zebra/zebra_ptm.c
+++ b/zebra/zebra_ptm.c
@@ -141,9 +141,9 @@ void zebra_ptm_finish(void)
free(ptm_cb.in_data);
/* Cancel events. */
- THREAD_OFF(ptm_cb.t_read);
- THREAD_OFF(ptm_cb.t_write);
- THREAD_OFF(ptm_cb.t_timer);
+ EVENT_OFF(ptm_cb.t_read);
+ EVENT_OFF(ptm_cb.t_write);
+ EVENT_OFF(ptm_cb.t_timer);
if (ptm_cb.wb)
buffer_free(ptm_cb.wb);
@@ -197,7 +197,7 @@ static int zebra_ptm_send_message(char *data, int size)
ptm_cb.reconnect_time, &ptm_cb.t_timer);
return -1;
case BUFFER_EMPTY:
- THREAD_OFF(ptm_cb.t_write);
+ EVENT_OFF(ptm_cb.t_write);
break;
case BUFFER_PENDING:
event_add_write(zrouter.master, zebra_ptm_flush_messages, NULL,
@@ -635,7 +635,7 @@ void zebra_ptm_sock_read(struct event *thread)
int rc;
errno = 0;
- sock = THREAD_FD(thread);
+ sock = EVENT_FD(thread);
if (sock == -1)
return;
diff --git a/zebra/zebra_pw.c b/zebra/zebra_pw.c
index edcb97ddec..d5f56d417b 100644
--- a/zebra/zebra_pw.c
+++ b/zebra/zebra_pw.c
@@ -89,7 +89,7 @@ void zebra_pw_del(struct zebra_vrf *zvrf, struct zebra_pw *pw)
dplane_pw_uninstall(pw);
}
- THREAD_OFF(pw->install_retry_timer);
+ EVENT_OFF(pw->install_retry_timer);
/* unlink and release memory */
RB_REMOVE(zebra_pw_head, &zvrf->pseudowires, pw);
@@ -207,7 +207,7 @@ void zebra_pw_install_failure(struct zebra_pw *pw, int pwstatus)
pw->vrf_id, pw->ifname, PW_INSTALL_RETRY_INTERVAL);
/* schedule to retry later */
- THREAD_OFF(pw->install_retry_timer);
+ EVENT_OFF(pw->install_retry_timer);
event_add_timer(zrouter.master, zebra_pw_install_retry, pw,
PW_INSTALL_RETRY_INTERVAL, &pw->install_retry_timer);
@@ -216,7 +216,7 @@ void zebra_pw_install_failure(struct zebra_pw *pw, int pwstatus)
static void zebra_pw_install_retry(struct event *thread)
{
- struct zebra_pw *pw = THREAD_ARG(thread);
+ struct zebra_pw *pw = EVENT_ARG(thread);
zebra_pw_install(pw);
}
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 17e71db490..014b5126b5 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -4397,7 +4397,7 @@ static void rib_update_handler(struct event *thread)
{
struct rib_update_ctx *ctx;
- ctx = THREAD_ARG(thread);
+ ctx = EVENT_ARG(thread);
rib_update_handle_vrf_all(ctx->event, ZEBRA_ROUTE_ALL);
diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c
index b55d152ef5..d9a7ee465a 100644
--- a/zebra/zebra_routemap.c
+++ b/zebra/zebra_routemap.c
@@ -1747,7 +1747,7 @@ static void zebra_route_map_set_delay_timer(uint32_t value)
if (!value && zebra_t_rmap_update) {
/* Event driven route map updates is being disabled */
/* But there's a pending timer. Fire it off now */
- THREAD_OFF(zebra_t_rmap_update);
+ EVENT_OFF(zebra_t_rmap_update);
zebra_route_map_update_timer(NULL);
}
}
@@ -1757,7 +1757,7 @@ void zebra_routemap_finish(void)
/* Set zebra_rmap_update_timer to 0 so that it wont schedule again */
zebra_rmap_update_timer = 0;
/* Thread off if any scheduled already */
- THREAD_OFF(zebra_t_rmap_update);
+ EVENT_OFF(zebra_t_rmap_update);
route_map_finish();
}
@@ -1874,7 +1874,7 @@ static void zebra_route_map_mark_update(const char *rmap_name)
{
/* rmap_update_timer of 0 means don't do route updates */
if (zebra_rmap_update_timer)
- THREAD_OFF(zebra_t_rmap_update);
+ EVENT_OFF(zebra_t_rmap_update);
event_add_timer(zrouter.master, zebra_route_map_update_timer, NULL,
zebra_rmap_update_timer, &zebra_t_rmap_update);
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c
index 787442f5c8..a477287913 100644
--- a/zebra/zebra_router.c
+++ b/zebra/zebra_router.c
@@ -218,7 +218,7 @@ void zebra_router_terminate(void)
{
struct zebra_router_table *zrt, *tmp;
- THREAD_OFF(zrouter.sweeper);
+ EVENT_OFF(zrouter.sweeper);
RB_FOREACH_SAFE (zrt, zebra_router_table_head, &zrouter.tables, tmp)
zebra_router_free_table(zrt);
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 153a5b8d8f..c370ad9169 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -3449,7 +3449,7 @@ int zebra_vxlan_clear_dup_detect_vni_mac(struct zebra_vrf *zvrf, vni_t vni,
mac->detect_start_time.tv_sec = 0;
mac->detect_start_time.tv_usec = 0;
mac->dad_dup_detect_time = 0;
- THREAD_OFF(mac->dad_mac_auto_recovery_timer);
+ EVENT_OFF(mac->dad_mac_auto_recovery_timer);
/* warn-only action return */
if (!zvrf->dad_freeze)
@@ -3531,7 +3531,7 @@ int zebra_vxlan_clear_dup_detect_vni_ip(struct zebra_vrf *zvrf, vni_t vni,
nbr->detect_start_time.tv_sec = 0;
nbr->detect_start_time.tv_usec = 0;
nbr->dad_dup_detect_time = 0;
- THREAD_OFF(nbr->dad_ip_auto_recovery_timer);
+ EVENT_OFF(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,
@@ -3566,7 +3566,7 @@ static void zevpn_clear_dup_mac_hash(struct hash_bucket *bucket, void *ctxt)
mac->detect_start_time.tv_sec = 0;
mac->detect_start_time.tv_usec = 0;
mac->dad_dup_detect_time = 0;
- THREAD_OFF(mac->dad_mac_auto_recovery_timer);
+ EVENT_OFF(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)) {
diff --git a/zebra/zserv.c b/zebra/zserv.c
index c25b61ea49..87cce37baa 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -34,7 +34,7 @@
#include "lib/sockopt.h" /* for setsockopt_so_recvbuf, setsockopt... */
#include "lib/sockunion.h" /* for sockopt_reuseaddr, sockopt_reuseport */
#include "lib/stream.h" /* for STREAM_SIZE, stream (ptr only), ... */
-#include "event.h" /* for thread (ptr only), THREAD_ARG, ... */
+#include "event.h" /* for thread (ptr only), EVENT_ARG, ... */
#include "lib/vrf.h" /* for vrf_info_lookup, VRF_DEFAULT */
#include "lib/vty.h" /* for vty_out, vty (ptr only) */
#include "lib/zclient.h" /* for zmsghdr, ZEBRA_HEADER_SIZE, ZEBRA... */
@@ -188,8 +188,8 @@ static void zserv_client_fail(struct zserv *client)
atomic_store_explicit(&client->pthread->running, false,
memory_order_relaxed);
- THREAD_OFF(client->t_read);
- THREAD_OFF(client->t_write);
+ EVENT_OFF(client->t_read);
+ EVENT_OFF(client->t_write);
zserv_event(client, ZSERV_HANDLE_CLIENT_FAIL);
}
@@ -215,7 +215,7 @@ static void zserv_client_fail(struct zserv *client)
*/
static void zserv_write(struct event *thread)
{
- struct zserv *client = THREAD_ARG(thread);
+ struct zserv *client = EVENT_ARG(thread);
struct stream *msg;
uint32_t wcmd = 0;
struct stream_fifo *cache;
@@ -308,7 +308,7 @@ zwrite_fail:
*/
static void zserv_read(struct event *thread)
{
- struct zserv *client = THREAD_ARG(thread);
+ struct zserv *client = EVENT_ARG(thread);
int sock;
size_t already;
struct stream_fifo *cache;
@@ -321,7 +321,7 @@ static void zserv_read(struct event *thread)
memory_order_relaxed);
cache = stream_fifo_new();
p2p = p2p_orig;
- sock = THREAD_FD(thread);
+ sock = EVENT_FD(thread);
while (p2p) {
ssize_t nb;
@@ -493,7 +493,7 @@ static void zserv_client_event(struct zserv *client,
*/
static void zserv_process_messages(struct event *thread)
{
- struct zserv *client = THREAD_ARG(thread);
+ struct zserv *client = EVENT_ARG(thread);
struct stream *msg;
struct stream_fifo *cache = stream_fifo_new();
uint32_t p2p = zrouter.packets_to_process;
@@ -671,8 +671,8 @@ void zserv_close_client(struct zserv *client)
zebra_route_string(client->proto));
event_cancel_event(zrouter.master, client);
- THREAD_OFF(client->t_cleanup);
- THREAD_OFF(client->t_process);
+ EVENT_OFF(client->t_cleanup);
+ EVENT_OFF(client->t_process);
/* destroy pthread */
frr_pthread_destroy(client->pthread);
@@ -711,7 +711,7 @@ void zserv_close_client(struct zserv *client)
*/
static void zserv_handle_client_fail(struct event *thread)
{
- struct zserv *client = THREAD_ARG(thread);
+ struct zserv *client = EVENT_ARG(thread);
zserv_close_client(client);
}
@@ -853,7 +853,7 @@ static void zserv_accept(struct event *thread)
struct sockaddr_in client;
socklen_t len;
- accept_sock = THREAD_FD(thread);
+ accept_sock = EVENT_FD(thread);
/* Reregister myself. */
zserv_event(NULL, ZSERV_ACCEPT);