Skip to content

Commit 2566656

Browse files
committed
isisd: Add data structure for SRv6 Adjacency SIDs
An SRv6 adjacency SID is a SID that is associated with a particular adjacency. Adjacency SIDs are advertised using the SRv6 End.X SID Sub-TLV (RFC 9352 section sonic-net#8.1) or SRv6 LAN End.X SID Sub-TLV (RFC 9352 section sonic-net#8.2). This commit defines a data structure `srv6_adjacency` for storing information about an SRv6 Adjacency SID. This data structure will be used to support SRv6 Adjacency SIDs functionalities in future commits. Signed-off-by: Carmine Scarpitta <[email protected]>
1 parent df121f6 commit 2566656

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

isisd/isis_srv6.h

+42
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,48 @@ struct isis_srv6_locator {
6969
struct list *srv6_sid;
7070
};
7171

72+
/* SRv6 Adjacency-SID type */
73+
enum srv6_adj_type {
74+
ISIS_SRV6_ADJ_NORMAL = 0,
75+
ISIS_SRV6_LAN_BACKUP,
76+
};
77+
78+
/* SRv6 Adjacency. */
79+
struct srv6_adjacency {
80+
/* Adjacency type */
81+
enum srv6_adj_type type;
82+
83+
/* SID flags */
84+
uint8_t flags;
85+
86+
/* SID value */
87+
struct in6_addr sid;
88+
89+
/* Endpoint behavior bound to the SID */
90+
enum srv6_endpoint_behavior_codepoint behavior;
91+
92+
/* SRv6 SID structure */
93+
struct isis_srv6_sid_structure structure;
94+
95+
/* Parent SRv6 locator */
96+
struct srv6_locator_chunk *locator;
97+
98+
/* Adjacency-SID nexthop information */
99+
struct in6_addr nexthop;
100+
101+
/* End.X SID TI-LFA backup nexthops */
102+
struct list *backup_nexthops;
103+
104+
/* SRv6 (LAN) End.X SID Sub-TLV */
105+
union {
106+
struct isis_srv6_endx_sid_subtlv *endx_sid;
107+
struct isis_srv6_lan_endx_sid_subtlv *lendx_sid;
108+
} u;
109+
110+
/* Back pointer to IS-IS adjacency. */
111+
struct isis_adjacency *adj;
112+
};
113+
72114
/* Per-area IS-IS SRv6 Data Base (SRv6 DB) */
73115
struct isis_srv6_db {
74116

0 commit comments

Comments
 (0)