]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Table: too fast export validity check replaced with just a retry
authorMaria Matejka <mq@ucw.cz>
Sat, 8 Jun 2024 18:19:51 +0000 (20:19 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 12 Jun 2024 12:48:33 +0000 (14:48 +0200)
nest/rt-table.c

index 4afee94ccd56f425ae09b78f4121fb2106f9e8f8..a72964a3b59ca90eb1b034b5dacde4737920c49d 100644 (file)
@@ -2196,23 +2196,18 @@ rt_net_feed_validate_first(
   if (!first)
     return first_in_net;
 
-  for (uint i = 1; i < 4096; i++)
-  {
-    /* Export item validity check: we must find it between first_in_net and last_in_net */
-    const struct rt_pending_export *rpe = first_in_net;
-    while (rpe)
-      if (rpe == first)
-       return first;
-      else if (rpe == last_in_net)
-       /* Got to the end without finding the beginning */
-       break;
-      else
-       rpe = atomic_load_explicit(&rpe->next, memory_order_acquire);
-
-    birdloop_yield();
-  }
+  /* Export item validity check: we must find it between first_in_net and last_in_net */
+  const struct rt_pending_export *rpe = first_in_net;
+  while (rpe)
+    if (rpe == first)
+      return first;
+    else if (rpe == last_in_net)
+      /* Got to the end without finding the beginning */
+      break;
+    else
+      rpe = atomic_load_explicit(&rpe->next, memory_order_acquire);
 
-  log(L_WARN "Waiting too long for table announcement to finish");
+  /* Not found, inconsistent export, retry */
   RT_READ_RETRY(tr);
 }