]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: optimize bgp_aggregate_[increment|decrement]()
authorJorge Boncompte [DTI2] <jorge@dti2.net>
Mon, 7 May 2012 16:53:10 +0000 (16:53 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 22 May 2012 18:35:50 +0000 (20:35 +0200)
commitf018db83a0746f9336d04e50dd06f3bbf6565f1c
tree4c2ba0e661abd2651ee6fa1bd7be9157c8859411
parent343aa82219c0cab0315e29267eb303127215caea
bgpd: optimize bgp_aggregate_[increment|decrement]()

  If there were no aggregates configured this functions were allocating
and freeing a struct bgp_node for every call, and it's called for every
prefix received.

* bgp_route.c: Bail out early if the there are no aggregates configured.
  Change from bgp_node_get() to bgp_node_lookup() that does not allocate
  a new struct bgp_node if not found.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_route.c