summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_lsa.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-08-06 21:58:05 +0200
committerPaul Jakma <paul@quagga.net>2009-08-13 10:58:46 +0200
commit3106a03215f5f09c2c0d427fa706fff52ef3cb37 (patch)
tree378e2b80de22275e91157fd0b9db5248b5681eea /ospfd/ospf_lsa.h
parentospfd: Make sure route table is recalculated. (diff)
downloadfrr-3106a03215f5f09c2c0d427fa706fff52ef3cb37.tar.xz
frr-3106a03215f5f09c2c0d427fa706fff52ef3cb37.zip
ospfd: fix performance problem with redistribute delete
Doing redistribute delete with full BGP table was taking 30 minutes, this drops it down to less than a second. * ospf_lsa.c: (ospf_lsa_maxage) When flushing lots of entries the performance is terrible because it looks up each LSA entry through ospf_lsa_maxage_exist before deleting causing O(N^2) performance. Use a new OSPF_LSA_MAXAGE flag instead of scan - and maintain it. (ospf_lsa_maxage_exist) removed (ospf_lsa_maxage_delete) maintain OSPF_LSA_MAXAGE flag
Diffstat (limited to 'ospfd/ospf_lsa.h')
-rw-r--r--ospfd/ospf_lsa.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h
index 8dd054c31..251d47310 100644
--- a/ospfd/ospf_lsa.h
+++ b/ospfd/ospf_lsa.h
@@ -80,6 +80,7 @@ struct ospf_lsa
#define OSPF_LSA_DISCARD 0x10
#define OSPF_LSA_LOCAL_XLT 0x20
#define OSPF_LSA_PREMATURE_AGE 0x40
+#define OSPF_LSA_IN_MAXAGE 0x80
/* LSA data. */
struct lsa_header *data;