]> git.puffer.fish Git - mirror/frr.git/commitdiff
+ rib_process() speedup for multi-nexthop route nodes
authorDenis Ovsienko <linux@pilot.org.ua>
Thu, 4 Oct 2007 10:49:21 +0000 (10:49 +0000)
committerDenis Ovsienko <linux@pilot.org.ua>
Thu, 4 Oct 2007 10:49:21 +0000 (10:49 +0000)
zebra/ChangeLog
zebra/zebra_rib.c

index d4c5678cc97091c17b13b8854716a4cabac1886a..0b5cefecff6544772d65d5a7ac353103911e55a1 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-04 Denis Ovsienko
+
+       * zebra_rib.c: (rib_process) escape from the nexthop
+         iteration cycle earliest possible to save CPU time.
+
 2007-10-03 Denis Ovsienko
 
        * zebra_rib.c: (rib_process, rib_link, rib_addnode,
index 67dc810a8a74f81b0970e3757febcc6566e8c0c4..37b84a660edfb7c48a0467e3d6a654a66e196fb6 100644 (file)
@@ -1118,9 +1118,10 @@ rib_process (struct work_queue *wq, void *data)
            */
 
           for (nexthop = select->nexthop; nexthop; nexthop = nexthop->next)
+            if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB))
             {
-              if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB))
-                installed = 1;
+              installed = 1;
+              break;
             }
           if (! installed) 
             rib_install_kernel (rn, select);