Skip to content

Commit

Permalink
isisd: Add SRv6 MSDs to Router Capabilities TLV
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cscarpitta committed Sep 11, 2023
1 parent c8004f7 commit 8d00f27
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions isisd/isis_tlvs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 8d00f27

Please sign in to comment.