]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: Add SRv6 MSDs to Router Capabilities TLV
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Wed, 1 Feb 2023 12:18:45 +0000 (13:18 +0100)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 11 Sep 2023 15:34:49 +0000 (17:34 +0200)
Add support for SRv6 Node MSDs as per RFC 9352 section #4.

There are four types of SRv6 MSDs:
* Maximum Segments Left MSD Type
* Maximum End Pop MSD Type
* Maximum H.Encaps MSD Type
* Maximum End D MSD Type

These SRv6 Node MSDs are advertised in the Node MSD Sub-TLV, a Sub-TLV
of the Router Capabilities TLV.

This commit adds `struct isis_srv6_msd` data structure, which represents
the SRv6 MSDs advertised in the Node Sub-TLV.

This commit also adds the `struct isis_srv6_msd` to
`struct isis_router_cap`, a data structure representing the Router
Capabilities TLV.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
isisd/isis_tlvs.h

index db66d8e58694ead833b0a3a3e3c46fe330eeb58e..6ded0c3411aab636d8fe1ee7fac21a75622ad79a 100644 (file)
@@ -193,6 +193,18 @@ struct isis_router_cap_fad {
 };
 #endif /* ifndef FABRICD */
 
+/* Maximum SRv6 SID Depths (MSD) as per RFC 9352 section #4 */
+struct isis_srv6_msd {
+       /* RFC 9352 section #4.1 */
+       uint8_t max_seg_left_msd;
+       /* RFC 9352 section #4.2 */
+       uint8_t max_end_pop_msd;
+       /* RFC 9352 section #4.3 */
+       uint8_t max_h_encaps_msd;
+       /* RFC 9352 section #4.4 */
+       uint8_t max_end_d_msd;
+};
+
 /* SRv6 Capabilities as per RFC 9352 section #2 */
 struct isis_srv6_cap {
        bool is_srv6_capable;
@@ -221,6 +233,9 @@ struct isis_router_cap {
 
        /* RFC 9352 section #2 */
        struct isis_srv6_cap srv6_cap;
+
+       /* RFC 9352 section #4 */
+       struct isis_srv6_msd srv6_msd;
 };
 
 struct isis_item {