summaryrefslogtreecommitdiffstats
path: root/isisd/isis_sr.h
diff options
context:
space:
mode:
authorOlivier Dugeon <olivier.dugeon@orange.com>2020-06-04 18:03:04 +0200
committerOlivier Dugeon <olivier.dugeon@orange.com>2020-06-23 16:36:56 +0200
commit58fbcdf2faa7d987977068938468d32704ebe623 (patch)
treee9830226c8f940c218daa44e7ea0005ed6adb7b9 /isisd/isis_sr.h
parentisisd: Add Segment Routing Local Block support (diff)
downloadfrr-58fbcdf2faa7d987977068938468d32704ebe623.tar.xz
frr-58fbcdf2faa7d987977068938468d32704ebe623.zip
isisd: Start Label Manager safer
Initial attempt to connect to the Label Manager used an infinite loop with a sleep statement which block isisd until Label Manager connection fire up. This commit changes the way Label Manager connection is established and uses a `thread_add_timer()` call to re-attempt to establish the connection in case of failure (zebra or label manager not ready). New variables are added to the SRDB in order to control the request of SRGB and SRLB to the Label Manager to start Segment Routing in a safe way. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'isisd/isis_sr.h')
-rw-r--r--isisd/isis_sr.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/isisd/isis_sr.h b/isisd/isis_sr.h
index 45728f1eb..4379a1dcb 100644
--- a/isisd/isis_sr.h
+++ b/isisd/isis_sr.h
@@ -64,6 +64,7 @@ PREDECL_RBTREE_UNIQ(srdb_prefix_cfg)
/* Segment Routing Local Block allocation */
struct sr_local_block {
+ bool active;
uint32_t start;
uint32_t end;
uint32_t current;
@@ -223,6 +224,9 @@ struct isis_sr_db {
/* Global Operational status of Segment Routing. */
bool enabled;
+ /* Thread timer to start Label Manager */
+ struct thread *t_start_lm;
+
/* List of local Adjacency-SIDs. */
struct list *adj_sids;
@@ -232,8 +236,9 @@ struct isis_sr_db {
/* Segment Routing Prefix-SIDs per IS-IS level. */
struct srdb_area_prefix_head prefix_sids[ISIS_LEVELS];
- /* Management of SRLB allocation */
+ /* Management of SRLB & SRGB allocation */
struct sr_local_block srlb;
+ bool srgb_active;
/* Area Segment Routing configuration. */
struct {