diff options
| -rw-r--r-- | zebra/dplane_fpm_nl.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/zebra/dplane_fpm_nl.c b/zebra/dplane_fpm_nl.c index 20b178b649..cbaf5744d1 100644 --- a/zebra/dplane_fpm_nl.c +++ b/zebra/dplane_fpm_nl.c @@ -75,9 +75,6 @@ struct fpm_nl_ctx { int socket; bool disabled; bool connecting; - bool nhg_complete; - bool rib_complete; - bool rmac_complete; bool use_nhg; struct sockaddr_storage addr; @@ -905,12 +902,8 @@ static int fpm_lsp_send(struct thread *t) WALK_FINISH(fnc, FNE_LSP_FINISHED); /* Now move onto routes */ - if (fnc->use_nhg) - thread_add_timer(zrouter.master, fpm_nhg_reset, fnc, 0, - &fnc->t_nhgreset); - else - thread_add_timer(zrouter.master, fpm_rib_reset, fnc, 0, - &fnc->t_ribreset); + thread_add_timer(zrouter.master, fpm_nhg_reset, fnc, 0, + &fnc->t_nhgreset); } else { /* Didn't finish - reschedule LSP walk */ thread_add_timer(zrouter.master, fpm_lsp_send, fnc, 0, @@ -963,7 +956,8 @@ static int fpm_nhg_send(struct thread *t) fna.complete = true; /* Send next hops. */ - hash_walk(zrouter.nhgs_id, fpm_nhg_send_cb, &fna); + if (fnc->use_nhg) + hash_walk(zrouter.nhgs_id, fpm_nhg_send_cb, &fna); /* `free()` allocated memory. */ dplane_ctx_fini(&fna.ctx); @@ -1121,7 +1115,6 @@ static int fpm_nhg_reset(struct thread *t) { struct fpm_nl_ctx *fnc = THREAD_ARG(t); - fnc->nhg_complete = false; hash_iterate(zrouter.nhgs_id, fpm_nhg_reset_cb, NULL); /* Schedule next step: send next hop groups. */ @@ -1164,8 +1157,6 @@ static int fpm_rib_reset(struct thread *t) struct route_table *rt; rib_tables_iter_t rt_iter; - fnc->rib_complete = false; - rt_iter.state = RIB_TABLES_ITER_S_INIT; while ((rt = rib_tables_iter_next(&rt_iter))) { for (rn = route_top(rt); rn; rn = srcdest_route_next(rn)) { @@ -1205,7 +1196,6 @@ static int fpm_rmac_reset(struct thread *t) { struct fpm_nl_ctx *fnc = THREAD_ARG(t); - fnc->rmac_complete = false; hash_iterate(zrouter.l3vni_table, fpm_unset_l3vni_table, NULL); /* Schedule next event: send RMAC entries. */ @@ -1300,20 +1290,14 @@ static int fpm_process_event(struct thread *t) if (IS_ZEBRA_DEBUG_FPM) zlog_debug("%s: next hop groups walk finished", __func__); - - fnc->nhg_complete = true; break; case FNE_RIB_FINISHED: if (IS_ZEBRA_DEBUG_FPM) zlog_debug("%s: RIB walk finished", __func__); - - fnc->rib_complete = true; break; case FNE_RMAC_FINISHED: if (IS_ZEBRA_DEBUG_FPM) zlog_debug("%s: RMAC walk finished", __func__); - - fnc->rmac_complete = true; break; case FNE_LSP_FINISHED: if (IS_ZEBRA_DEBUG_FPM) |
