rte_announce(table, net, new_stored, old_stored,
net->routes, old_best_stored);
- if (!net->routes &&
- (table->gc_counter++ >= table->config->gc_threshold))
- rt_kick_prune_timer(table);
-
#if 0
/* Enable and reimplement these callbacks if anybody wants to use them */
if (old_ok && p->rte_remove)
u64 min_seq = ~((u64) 0);
struct rt_pending_export *last_export_to_free = NULL;
struct rt_pending_export *first = tab->exporter.first;
+ int want_prune = 0;
struct rt_export_hook *eh;
node *n;
/* First is now the next one */
net->first = atomic_load_explicit(&first->next, memory_order_relaxed);
+ want_prune += !net->routes && !net->first;
+
/* For now, the old route may be finally freed */
if (first->old)
{
rt_unlock_table(tab);
}
+ if ((tab->gc_counter += want_prune) >= tab->config->gc_threshold)
+ rt_kick_prune_timer(tab);
+
if (tab->export_used)
ev_schedule(tab->rt_event);