diff options
author | Denis Ovsienko <linux@pilot.org.ua> | 2007-10-04 10:49:21 +0000 |
---|---|---|
committer | Denis Ovsienko <linux@pilot.org.ua> | 2007-10-04 10:49:21 +0000 |
commit | a3aaf5b0ceb8c5b3821793333b4057df872fbedd (patch) | |
tree | c4c95460aff0f7332f84546e9dd0d651abc8868a | |
parent | f304cb48f0d7d0ff8f36e7aca8293141a9fa9e60 (diff) |
+ rib_process() speedup for multi-nexthop route nodes
-rw-r--r-- | zebra/ChangeLog | 5 | ||||
-rw-r--r-- | zebra/zebra_rib.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog index d4c5678c..0b5cefec 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -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, diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 67dc810a..37b84a66 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -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); |