Skip to content

Commit 2e934ff

Browse files
Updates to SRv6 programming model and related objects/attributes (#1231)
Changes are listed in the attached md file. Following items were deferred and will be addressed in subsequent PRs: Additional capability attributes to specify number of SIDs supported by the platform Need for shift-only behavior in case of uSID Consider specifying SID structure in a separate container (object/struct) and reuse as necessary Split the headend behavior from SID list and add it as a separate attribute for nexthop so SID lists can be shared across different behaviors
1 parent 082acd6 commit 2e934ff

15 files changed

+1085
-252
lines changed

doc/SAI-IPv6-Segment-Routing-Update.md

Lines changed: 479 additions & 0 deletions
Large diffs are not rendered by default.
11.4 KB
Loading
26.2 KB
Loading

inc/sai.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#include "saisamplepacket.h"
5656
#include "saischedulergroup.h"
5757
#include "saischeduler.h"
58-
#include "saisegmentroute.h"
58+
#include "saisrv6.h"
5959
#include "saistatus.h"
6060
#include "saistp.h"
6161
#include "saiswitch.h"
@@ -123,7 +123,7 @@ typedef enum _sai_api_t
123123
SAI_API_MCAST_FDB = 32, /**< sai_mcast_fdb_api_t */
124124
SAI_API_BRIDGE = 33, /**< sai_bridge_api_t */
125125
SAI_API_TAM = 34, /**< sai_tam_api_t */
126-
SAI_API_SEGMENTROUTE = 35, /**< sai_segmentroute_api_t */
126+
SAI_API_SRV6 = 35, /**< sai_srv6_api_t */
127127
SAI_API_MPLS = 36, /**< sai_mpls_api_t */
128128
SAI_API_DTEL = 37, /**< sai_dtel_api_t (experimental) */
129129
SAI_API_BFD = 38, /**< sai_bfd_api_t */

inc/sainexthop.h

Lines changed: 7 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -47,61 +47,11 @@ typedef enum _sai_next_hop_type_t
4747
/** Tunnel next hop */
4848
SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP,
4949

50-
/** IPv6 Segment Route SID List */
51-
SAI_NEXT_HOP_TYPE_SEGMENTROUTE_SIDLIST,
52-
53-
/** IPv6 Segment Route Endpoint Function */
54-
SAI_NEXT_HOP_TYPE_SEGMENTROUTE_ENDPOINT,
50+
/** SRV6 SID List */
51+
SAI_NEXT_HOP_TYPE_SRV6_SIDLIST,
5552

5653
} sai_next_hop_type_t;
5754

58-
/**
59-
* @brief Enum defining Endpoint Action types
60-
*/
61-
typedef enum _sai_next_hop_endpoint_type_t
62-
{
63-
/** Basic Endpoint */
64-
SAI_NEXT_HOP_ENDPOINT_TYPE_E,
65-
66-
/** End.X Endpoint with Layer-3 Cross-connect */
67-
SAI_NEXT_HOP_ENDPOINT_TYPE_X,
68-
69-
/** End.T Endpoint with specific IPv6 Table */
70-
SAI_NEXT_HOP_ENDPOINT_TYPE_T,
71-
72-
/** Endpoint with decapsulation and Layer 2 Cross-connect */
73-
SAI_NEXT_HOP_ENDPOINT_TYPE_DX2,
74-
75-
/** Endpoint with decapsulation and IPv6 Cross-connect */
76-
SAI_NEXT_HOP_ENDPOINT_TYPE_DX6,
77-
78-
/** Endpoint with decapsulation and IPv4 Cross-connect */
79-
SAI_NEXT_HOP_ENDPOINT_TYPE_DX4,
80-
81-
/** Endpoint with decapsulation and specific IPv6 */
82-
SAI_NEXT_HOP_ENDPOINT_TYPE_DT6,
83-
84-
/** Endpoint with decapsulation and specific IPv6 */
85-
SAI_NEXT_HOP_ENDPOINT_TYPE_DT4,
86-
87-
/** Custom range base value */
88-
SAI_NEXT_HOP_ENDPOINT_TYPE_CUSTOM_RANGE_BASE = 0x10000000
89-
90-
} sai_next_hop_endpoint_type_t;
91-
92-
/**
93-
* @brief Enum defining Endpoint Segment Pop types for End, End.X and End.T
94-
*/
95-
typedef enum _sai_next_hop_endpoint_pop_type_t
96-
{
97-
/** Penultimate segment pop */
98-
SAI_NEXT_HOP_ENDPOINT_POP_TYPE_PSP,
99-
100-
/** Ultimate Segment pop */
101-
SAI_NEXT_HOP_ENDPOINT_POP_TYPE_USP,
102-
103-
} sai_next_hop_endpoint_pop_type_t;
104-
10555
/**
10656
* @brief Attribute id for next hop
10757
*/
@@ -146,7 +96,7 @@ typedef enum _sai_next_hop_attr_t
14696
* @type sai_object_id_t
14797
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
14898
* @objects SAI_OBJECT_TYPE_TUNNEL
149-
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP
99+
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP or SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_SRV6_SIDLIST
150100
*/
151101
SAI_NEXT_HOP_ATTR_TUNNEL_ID,
152102

@@ -171,32 +121,14 @@ typedef enum _sai_next_hop_attr_t
171121
SAI_NEXT_HOP_ATTR_TUNNEL_MAC,
172122

173123
/**
174-
* @brief Next hop entry Segment Route SID List
124+
* @brief Next hop entry SRV6 SID List
175125
*
176126
* @type sai_object_id_t
177127
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
178-
* @objects SAI_OBJECT_TYPE_SEGMENTROUTE_SIDLIST
179-
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_SEGMENTROUTE_SIDLIST
180-
*/
181-
SAI_NEXT_HOP_ATTR_SEGMENTROUTE_SIDLIST_ID,
182-
183-
/**
184-
* @brief Next hop entry Segment Route Endpoint Function
185-
*
186-
* @type sai_next_hop_endpoint_type_t
187-
* @flags MANDATORY_ON_CREATE | CREATE_AND_SET
188-
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_SEGMENTROUTE_ENDPOINT
189-
*/
190-
SAI_NEXT_HOP_ATTR_SEGMENTROUTE_ENDPOINT_TYPE,
191-
192-
/**
193-
* @brief Next hop entry Segment Route Endpoint Pop Option
194-
*
195-
* @type sai_next_hop_endpoint_pop_type_t
196-
* @flags MANDATORY_ON_CREATE | CREATE_AND_SET
197-
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_SEGMENTROUTE_ENDPOINT
128+
* @objects SAI_OBJECT_TYPE_SRV6_SIDLIST
129+
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_SRV6_SIDLIST
198130
*/
199-
SAI_NEXT_HOP_ATTR_SEGMENTROUTE_ENDPOINT_POP_TYPE,
131+
SAI_NEXT_HOP_ATTR_SRV6_SIDLIST_ID,
200132

201133
/**
202134
* @brief Push label

inc/saiobject.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <sairoute.h>
3535
#include <saimpls.h>
3636
#include <sainat.h>
37+
#include <saisrv6.h>
3738

3839
/**
3940
* @defgroup SAIOBJECT SAI - Object API definitions.
@@ -77,6 +78,9 @@ typedef union _sai_object_key_entry_t
7778
/** @validonly object_type == SAI_OBJECT_TYPE_NAT_ENTRY */
7879
sai_nat_entry_t nat_entry;
7980

81+
/** @validonly object_type == SAI_OBJECT_TYPE_MY_SID_ENTRY */
82+
sai_my_sid_entry_t my_sid_entry;
83+
8084
} sai_object_key_entry_t;
8185

8286
/**

inc/saisegmentroute.h

Lines changed: 0 additions & 168 deletions
This file was deleted.

0 commit comments

Comments
 (0)