[quagga-dev 10260] [PATCH] ospf6: turn expensive debug off

James Li jli at cumulusnetworks.com
Fri Feb 15 23:49:11 GMT 2013


OSPF6 has very expensive LSDB and route debug on by default. This needs to be
turned off for scaled performance.

Signed-off-by: James Li <jli at cumulusnetworks.com>
Reviewed-by: Dinesh Dutt <ddutt at cumulusnetworks.com>
Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com>
---
 ospf6d/ospf6_lsdb.c  |    6 +++---
 ospf6d/ospf6_route.c |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ospf6d/ospf6_lsdb.c b/ospf6d/ospf6_lsdb.c
index 0edc7a3..70618c2 100644
--- a/ospf6d/ospf6_lsdb.c
+++ b/ospf6d/ospf6_lsdb.c
@@ -70,7 +70,7 @@ ospf6_lsdb_set_key (struct prefix_ipv6 *key, void *value, int len)
   key->prefixlen += len * 8;
 }
 
-#ifndef NDEBUG
+#ifdef DEBUG
 static void
 _lsdb_count_assert (struct ospf6_lsdb *lsdb)
 {
@@ -94,9 +94,9 @@ _lsdb_count_assert (struct ospf6_lsdb *lsdb)
   assert (num == lsdb->count);
 }
 #define ospf6_lsdb_count_assert(t) (_lsdb_count_assert (t))
-#else /*NDEBUG*/
+#else /*DEBUG*/
 #define ospf6_lsdb_count_assert(t) ((void) 0)
-#endif /*NDEBUG*/
+#endif /*DEBUG*/
 
 void
 ospf6_lsdb_add (struct ospf6_lsa *lsa, struct ospf6_lsdb *lsdb)
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index 65fdfcf..cbe0657 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -304,7 +304,7 @@ ospf6_route_lookup_bestmatch (struct prefix *prefix,
   return route;
 }
 
-#ifndef NDEBUG
+#ifdef DEBUG
 static void
 route_table_assert (struct ospf6_route_table *table)
 {
@@ -350,7 +350,7 @@ route_table_assert (struct ospf6_route_table *table)
 #define ospf6_route_table_assert(t) (route_table_assert (t))
 #else
 #define ospf6_route_table_assert(t) ((void) 0)
-#endif /*NDEBUG*/
+#endif /*DEBUG*/
 
 struct ospf6_route *
 ospf6_route_add (struct ospf6_route *route,





More information about the Quagga-dev mailing list