]> git.puffer.fish Git - matthieu/frr.git/commit
isisd: make the SPF code more modular
authorRenato Westphal <renato@opensourcerouting.org>
Sun, 23 Aug 2020 03:22:32 +0000 (00:22 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 26 Aug 2020 23:16:19 +0000 (20:16 -0300)
commit7b36d36e0ed2a233c3a908c9e821e3f45c68d4e8
treea6c1a1da3e1a61a63a891f0d84d9ab06557b28e4
parent675269d48324ab42c63fc0ed79da0bbad06ecdb1
isisd: make the SPF code more modular

The goal of modularizing the SPF code is to make it possible for
isisd to run SPF in the behalf of other nodes in the network, which
is going to be necessary later when implementing the R-LFA/TI-LFA
solutions. On top of that, a modularized SPF opens the door for
much needed unit testing.

Summary of the changes:
* Change the isis_spf_preload_tent() function to use the local LSP
  as an input (as per the ISO specification) instead of populating
  the TENT based on the list of local interfaces;
* Introduce the "isis_spf_adj" structure to represent an SPF
  adjacency.  SPF adjacencies are inferred from the LSPDB, different
  from normal adjacencies formed using IIH messages;
* Introduce the F_SPFTREE_NO_ROUTES flag to control whether the
  SPT should create routes or not;
* Introduce the F_SPFTREE_NO_ADJACENCIES flag to specify whether
  IS-IS adjacency information is available or not. When running SPF
  in the behalf of other nodes, or under the context of an unit test,
  no adjacency information will be present.
* On isis_area_create(), move some code around so that the area's isis
  backpointer is set as early as possible.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
isisd/fabricd.c
isisd/isis_route.c
isisd/isis_spf.c
isisd/isis_spf.h
isisd/isis_spf_private.h
isisd/isisd.c