diff options
author | Maria Matejka <mq@ucw.cz> | 2022-09-12 12:28:05 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-09-18 16:33:51 +0200 |
commit | ff86f23dc71e75f3761042f750044645ab4e2ea1 (patch) | |
tree | fdb3ca0f1bb138c8fbc9efbd8141c6fa0d49c697 /nest/rt-table.c | |
parent | 769224d79c3a25057932dda1d5d3ea9b583db1e5 (diff) |
Export event doesn't have to be postponed before requeuing as an export-stop event
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 15 |
1 files changed, 3 insertions, 12 deletions
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); |