diff options
| author | Hiroki Shirokura <hiroki.shirokura@linecorp.com> | 2022-01-21 14:54:15 +0000 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2023-04-18 11:33:15 +0200 |
| commit | 860b75b40e73285ce165619dbebf650e3a3bc65f (patch) | |
| tree | 61659e91dd32dd7a1042167fadf53c6e1fdca4a8 /isisd/isisd.c | |
| parent | 78774bbcd51b1cb461b2d8622545d4b8136f2344 (diff) | |
isisd: calculate flex-algo constraint spf
Take into account the flex-algo affinity constraints to compute the SPF
tree.
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'isisd/isisd.c')
| -rw-r--r-- | isisd/isisd.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/isisd/isisd.c b/isisd/isisd.c index 6c4cdfb95b..195f9f16f1 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -3069,12 +3069,27 @@ int isis_area_passwd_hmac_md5_set(struct isis_area *area, int level, void isis_area_invalidate_routes(struct isis_area *area, int levels) { +#ifndef FABRICD + struct flex_algo *fa; + struct listnode *node; + struct isis_flex_algo_data *data; +#endif /* ifndef FABRICD */ + for (int level = ISIS_LEVEL1; level <= ISIS_LEVEL2; level++) { if (!(level & levels)) continue; for (int tree = SPFTREE_IPV4; tree < SPFTREE_COUNT; tree++) { isis_spf_invalidate_routes( area->spftree[tree][level - 1]); + +#ifndef FABRICD + for (ALL_LIST_ELEMENTS_RO(area->flex_algos->flex_algos, + node, fa)) { + data = fa->data; + isis_spf_invalidate_routes( + data->spftree[tree][level - 1]); + } +#endif /* ifndef FABRICD */ } } } @@ -3106,6 +3121,12 @@ void isis_area_switchover_routes(struct isis_area *area, int family, static void area_resign_level(struct isis_area *area, int level) { +#ifndef FABRICD + struct flex_algo *fa; + struct listnode *node; + struct isis_flex_algo_data *data; +#endif /* ifndef FABRICD */ + isis_area_invalidate_routes(area, level); isis_area_verify_routes(area); @@ -3118,6 +3139,20 @@ static void area_resign_level(struct isis_area *area, int level) } } +#ifndef FABRICD + for (int tree = SPFTREE_IPV4; tree < SPFTREE_COUNT; tree++) { + for (ALL_LIST_ELEMENTS_RO(area->flex_algos->flex_algos, node, + fa)) { + data = fa->data; + if (data->spftree[level - 1]) { + isis_spftree_del( + data->spftree[tree][level - 1]); + data->spftree[tree][level - 1] = NULL; + } + } + } +#endif /* ifndef FABRICD */ + if (area->spf_timer[level - 1]) isis_spf_timer_free(EVENT_ARG(area->spf_timer[level - 1])); |
