From: Carmine Scarpitta Date: Wed, 1 Feb 2023 12:18:45 +0000 (+0100) Subject: isisd: Add SRv6 MSDs to Router Capabilities TLV X-Git-Tag: base_9.1~88^2~139 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8d00f272f65bace1385fc0099355a6d18dd94e38;p=matthieu%2Ffrr.git isisd: Add SRv6 MSDs to Router Capabilities TLV 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 --- diff --git a/isisd/isis_tlvs.h b/isisd/isis_tlvs.h index db66d8e586..6ded0c3411 100644 --- a/isisd/isis_tlvs.h +++ b/isisd/isis_tlvs.h @@ -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 {