summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2023-01-18 12:21:16 +0100
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2023-08-04 09:29:16 +0200
commit340fdf6a8063767aff3a027fd703917d2cb79f4c (patch)
treeaf23d3d982d0539263126e2a37486bff3133ce84
parent5e21aaf1e7249ff4edf2bef2802d5b982fc2a60d (diff)
isisd: Add support for SRv6 MSDs
Add Maximum SRv6 SID Depths (MSDs) parameters as per RFC 9352 section #4 to the per-area IS-IS SRv6 Data Base. Currently the MSD values are hardcoded. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
-rw-r--r--isisd/isis_srv6.c5
-rw-r--r--isisd/isis_srv6.h18
2 files changed, 23 insertions, 0 deletions
diff --git a/isisd/isis_srv6.c b/isisd/isis_srv6.c
index 842e90dcc5..564fd04285 100644
--- a/isisd/isis_srv6.c
+++ b/isisd/isis_srv6.c
@@ -34,6 +34,11 @@ void isis_srv6_area_init(struct isis_area *area)
/* Pull defaults from the YANG module */
srv6db->config.enabled = yang_get_default_bool("%s/enabled", ISIS_SRV6);
+
+ srv6db->config.max_seg_left_msd = SRV6_MAX_SEG_LEFT;
+ srv6db->config.max_end_pop_msd = SRV6_MAX_END_POP;
+ srv6db->config.max_h_encaps_msd = SRV6_MAX_H_ENCAPS;
+ srv6db->config.max_end_d_msd = SRV6_MAX_END_D;
}
/**
diff --git a/isisd/isis_srv6.h b/isisd/isis_srv6.h
index 0a493c8c7e..077e938359 100644
--- a/isisd/isis_srv6.h
+++ b/isisd/isis_srv6.h
@@ -10,6 +10,12 @@
#ifndef _FRR_ISIS_SRV6_H
#define _FRR_ISIS_SRV6_H
+/* Maximum SRv6 SID Depths supported by the router */
+#define SRV6_MAX_SEG_LEFT 3
+#define SRV6_MAX_END_POP 3
+#define SRV6_MAX_H_ENCAPS 2
+#define SRV6_MAX_END_D 5
+
/* Per-area IS-IS SRv6 Data Base (SRv6 DB) */
struct isis_srv6_db {
@@ -17,6 +23,18 @@ struct isis_srv6_db {
struct {
/* Administrative status of SRv6 */
bool enabled;
+
+ /* Maximum Segments Left Depth supported by the router */
+ uint8_t max_seg_left_msd;
+
+ /* Maximum Maximum End Pop Depth supported by the router */
+ uint8_t max_end_pop_msd;
+
+ /* Maximum H.Encaps supported by the router */
+ uint8_t max_h_encaps_msd;
+
+ /* Maximum End D MSD supported by the router */
+ uint8_t max_end_d_msd;
} config;
};