]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: debug buffers cleanup and optimization
authorJorge Boncompte [DTI2] <jorge@dti2.net>
Mon, 7 May 2012 16:52:53 +0000 (16:52 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 22 May 2012 18:25:10 +0000 (20:25 +0200)
commit14542f3edaa43113880e8bb69612c553f02bdf22
tree247dd2b8ef6e1cea2d91d39989a943fddfb481ca
parent10f9bf3f2021f874e574e4ebae9413bee982ed2b
bgpd: debug buffers cleanup and optimization

Just the first change pushes bgp_update_receive() from 6th to ~14th on a
full internet table load profiling session.

* bgp_debug.c: (bgp_update_receive) The attrstr initialization is expensive,
  moved under the debug conditional where it is used and just initialize the
  first char to NULL.
  (bgp_update_default_send) Initialize attrstr needed for bgp_dump_attr().
  Moved some buffers used for printing IP[4|6] addresses under the debug
  conditionals that use them and reduced its size.

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