]> git.proxmox.com Git - mirror_frr.git/commit - ospfd/ospf_lsa.h
ospfd: fix performance problem with redistribute delete
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 6 Aug 2009 19:58:05 +0000 (12:58 -0700)
committerPaul Jakma <paul@quagga.net>
Thu, 13 Aug 2009 08:58:46 +0000 (09:58 +0100)
commit3106a03215f5f09c2c0d427fa706fff52ef3cb37
tree378e2b80de22275e91157fd0b9db5248b5681eea
parent5996e0df2eb325445114517209cd24f37d91774a
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
ospfd/ospf_lsa.c
ospfd/ospf_lsa.h