From ff86f23dc71e75f3761042f750044645ab4e2ea1 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Mon, 12 Sep 2022 12:28:05 +0200 Subject: Export event doesn't have to be postponed before requeuing as an export-stop event --- nest/rt-table.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'nest/rt-table.c') diff --git a/nest/rt-table.c b/nest/rt-table.c index fbc41453..f5750cac 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -2188,19 +2188,16 @@ rt_stop_export(struct rt_export_request *req, void (*stopped)(struct rt_export_r ASSERT_DIE(req->hook); struct rt_export_hook *hook = req->hook; - /* Cancel the feeder event */ - ev_postpone(&hook->event); - /* Stop feeding from the exporter */ CALL(hook->table->class->stop, hook); + /* Update export state */ + rt_set_export_state(hook, TES_STOP); + /* Reset the event as the stopped event */ hook->event.hook = hook->table->class->done; hook->stopped = stopped; - /* Update export state */ - rt_set_export_state(hook, TES_STOP); - /* Run the stopped event */ rt_send_export_event(hook); } @@ -4131,9 +4128,6 @@ rt_feed_by_fib(void *data) { if ((c->h.req->addr_mode == TE_ADDR_NONE) || net_in_netX(n->n.addr, c->h.req->addr)) { - if (atomic_load_explicit(&c->h.export_state, memory_order_acquire) != TES_FEEDING) - return; - if (!rt_prepare_feed(c, n, &block)) { FIB_ITERATE_PUT(fit); @@ -4173,9 +4167,6 @@ rt_feed_by_trie(void *data) if (!n) continue; - if (atomic_load_explicit(&c->h.export_state, memory_order_acquire) != TES_FEEDING) - RT_RETURN(tab); - if (!rt_prepare_feed(c, n, &block)) { RT_UNLOCK(tab); -- cgit v1.2.3