#endif
}
-static inline int
+static inline void
rt_next_hop_update_net(struct rtable_private *tab, struct netindex *ni, net *n)
{
uint count = 0;
struct rte_storage *old_best = NET_BEST_ROUTE(tab, n);
if (!old_best)
- return 0;
+ return;
NET_WALK_ROUTES(tab, n, ep, e)
count++;
if (!count)
- return 0;
+ return;
struct rte_multiupdate {
struct rte_storage *old, *new_stored;
mod += rt_next_hop_update_rte(&updates[i].old->rte, &updates[i].new);
if (!mod)
- return 0;
+ return;
/* We add a spinlock sentinel to the beginning */
struct rte_storage local_sentinel = {
/* Now we can finally release the changes back into the table */
atomic_store_explicit(&n->routes, new_best, memory_order_release);
- return total;
+ return;
}
static void
return;
}
- int max_feed = 32;
-
/* Initialize a new run */
if (tab->nhu_state == NHU_SCHEDULED)
{
if (!s)
continue;
- if (max_feed <= 0)
- {
- ev_send_loop(tab->loop, tab->nhu_event);
- return;
- }
+ MAYBE_DEFER_TASK(birdloop_event_list(tab->loop), tab->nhu_event,
+ "next hop updater in %s", tab->name);
TMP_SAVED
- max_feed -= rt_next_hop_update_net(tab, RTE_GET_NETINDEX(&s->rte), n);
+ rt_next_hop_update_net(tab, RTE_GET_NETINDEX(&s->rte), n);
}
/* Finished NHU, cleanup */