]> git.puffer.fish Git - matthieu/frr.git/commit
ospfd: Optimize and improve SPF nexthop calculation
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Sat, 7 Jul 2012 15:06:11 +0000 (17:06 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 25 Jul 2012 16:07:30 +0000 (18:07 +0200)
commitc81ee5c94f5b34375f3ef276fdb9bde9098e7ecb
treedad1ab0d81b72a7c7a869bc7dc051b703deec9be
parent7b92589c225ae46417fc3fa0714a1b6f53f19c51
ospfd: Optimize and improve SPF nexthop calculation

Maintain router LSA positions in OSPF interface.
Find the OSPF interface in nexthop_calculation using
the position in the router LSA. This is possible because
the only time nexthop_calculation needs to look up interfaces
is when dealing with its own Router LSA.

This has the following advantages:
 - Multiple PtP interfaces with the same IP address between two routers.
 - Use Unnumbered PtP on just one end of the link.
 - Faster OI lookup for the OSPF interface and only
   done once for PtoP links.

*ospf_interface.h: (struct ospf_interface) Add storage for
   storing router LSA position.

*ospf_interface.c: (ospf_if_lookup_by_lsa_pos)
   lookup OSPF I/F in an area using LSA position.

*ospf_lsa.c: (router_lsa_link_set) record Router LSA position.

*ospf_spf.c: (ospf_spf_next) Count and pass along lsa position.
     (ospf_nexthop_calculation) Add lsa position argument.
     call ospf_if_lookup_by_lsa_pos() for OSFP interface handle.
     Clean up and remove all calls ospf_if_is_configured() the
     rest. Adjust a few debug logs.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
ospfd/ospf_interface.c
ospfd/ospf_interface.h
ospfd/ospf_lsa.c
ospfd/ospf_spf.c