]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Export event doesn't have to be postponed before requeuing as an export-stop event
authorMaria Matejka <mq@ucw.cz>
Mon, 12 Sep 2022 10:28:05 +0000 (12:28 +0200)
committerMaria Matejka <mq@ucw.cz>
Sun, 18 Sep 2022 14:33:51 +0000 (16:33 +0200)
nest/rt-table.c

index fbc41453a4eb16fd16f651ea6d1b830b575efaa3..f5750cac444be9919a58e5c3f3c4eb7edb139b40 100644 (file)
@@ -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);