Skip to content

Commit

Permalink
Updates to SRv6 programming model and related objects/attributes (#1231)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ashutosh-agrawal authored Jun 24, 2021
1 parent 082acd6 commit 2e934ff
Show file tree
Hide file tree
Showing 15 changed files with 1,085 additions and 252 deletions.
479 changes: 479 additions & 0 deletions doc/SAI-IPv6-Segment-Routing-Update.md

Large diffs are not rendered by default.

Binary file added doc/figures/SRv6_Endpoint_behavioral_model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/figures/SRv6_Headend_behavioral_model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions inc/sai.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include "saisamplepacket.h"
#include "saischedulergroup.h"
#include "saischeduler.h"
#include "saisegmentroute.h"
#include "saisrv6.h"
#include "saistatus.h"
#include "saistp.h"
#include "saiswitch.h"
Expand Down Expand Up @@ -123,7 +123,7 @@ typedef enum _sai_api_t
SAI_API_MCAST_FDB = 32, /**< sai_mcast_fdb_api_t */
SAI_API_BRIDGE = 33, /**< sai_bridge_api_t */
SAI_API_TAM = 34, /**< sai_tam_api_t */
SAI_API_SEGMENTROUTE = 35, /**< sai_segmentroute_api_t */
SAI_API_SRV6 = 35, /**< sai_srv6_api_t */
SAI_API_MPLS = 36, /**< sai_mpls_api_t */
SAI_API_DTEL = 37, /**< sai_dtel_api_t (experimental) */
SAI_API_BFD = 38, /**< sai_bfd_api_t */
Expand Down
82 changes: 7 additions & 75 deletions inc/sainexthop.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,61 +47,11 @@ typedef enum _sai_next_hop_type_t
/** Tunnel next hop */
SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP,

/** IPv6 Segment Route SID List */
SAI_NEXT_HOP_TYPE_SEGMENTROUTE_SIDLIST,

/** IPv6 Segment Route Endpoint Function */
SAI_NEXT_HOP_TYPE_SEGMENTROUTE_ENDPOINT,
/** SRV6 SID List */
SAI_NEXT_HOP_TYPE_SRV6_SIDLIST,

} sai_next_hop_type_t;

/**
* @brief Enum defining Endpoint Action types
*/
typedef enum _sai_next_hop_endpoint_type_t
{
/** Basic Endpoint */
SAI_NEXT_HOP_ENDPOINT_TYPE_E,

/** End.X Endpoint with Layer-3 Cross-connect */
SAI_NEXT_HOP_ENDPOINT_TYPE_X,

/** End.T Endpoint with specific IPv6 Table */
SAI_NEXT_HOP_ENDPOINT_TYPE_T,

/** Endpoint with decapsulation and Layer 2 Cross-connect */
SAI_NEXT_HOP_ENDPOINT_TYPE_DX2,

/** Endpoint with decapsulation and IPv6 Cross-connect */
SAI_NEXT_HOP_ENDPOINT_TYPE_DX6,

/** Endpoint with decapsulation and IPv4 Cross-connect */
SAI_NEXT_HOP_ENDPOINT_TYPE_DX4,

/** Endpoint with decapsulation and specific IPv6 */
SAI_NEXT_HOP_ENDPOINT_TYPE_DT6,

/** Endpoint with decapsulation and specific IPv6 */
SAI_NEXT_HOP_ENDPOINT_TYPE_DT4,

/** Custom range base value */
SAI_NEXT_HOP_ENDPOINT_TYPE_CUSTOM_RANGE_BASE = 0x10000000

} sai_next_hop_endpoint_type_t;

/**
* @brief Enum defining Endpoint Segment Pop types for End, End.X and End.T
*/
typedef enum _sai_next_hop_endpoint_pop_type_t
{
/** Penultimate segment pop */
SAI_NEXT_HOP_ENDPOINT_POP_TYPE_PSP,

/** Ultimate Segment pop */
SAI_NEXT_HOP_ENDPOINT_POP_TYPE_USP,

} sai_next_hop_endpoint_pop_type_t;

/**
* @brief Attribute id for next hop
*/
Expand Down Expand Up @@ -146,7 +96,7 @@ typedef enum _sai_next_hop_attr_t
* @type sai_object_id_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
* @objects SAI_OBJECT_TYPE_TUNNEL
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_TUNNEL_ENCAP or SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_SRV6_SIDLIST
*/
SAI_NEXT_HOP_ATTR_TUNNEL_ID,

Expand All @@ -171,32 +121,14 @@ typedef enum _sai_next_hop_attr_t
SAI_NEXT_HOP_ATTR_TUNNEL_MAC,

/**
* @brief Next hop entry Segment Route SID List
* @brief Next hop entry SRV6 SID List
*
* @type sai_object_id_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
* @objects SAI_OBJECT_TYPE_SEGMENTROUTE_SIDLIST
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_SEGMENTROUTE_SIDLIST
*/
SAI_NEXT_HOP_ATTR_SEGMENTROUTE_SIDLIST_ID,

/**
* @brief Next hop entry Segment Route Endpoint Function
*
* @type sai_next_hop_endpoint_type_t
* @flags MANDATORY_ON_CREATE | CREATE_AND_SET
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_SEGMENTROUTE_ENDPOINT
*/
SAI_NEXT_HOP_ATTR_SEGMENTROUTE_ENDPOINT_TYPE,

/**
* @brief Next hop entry Segment Route Endpoint Pop Option
*
* @type sai_next_hop_endpoint_pop_type_t
* @flags MANDATORY_ON_CREATE | CREATE_AND_SET
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_SEGMENTROUTE_ENDPOINT
* @objects SAI_OBJECT_TYPE_SRV6_SIDLIST
* @condition SAI_NEXT_HOP_ATTR_TYPE == SAI_NEXT_HOP_TYPE_SRV6_SIDLIST
*/
SAI_NEXT_HOP_ATTR_SEGMENTROUTE_ENDPOINT_POP_TYPE,
SAI_NEXT_HOP_ATTR_SRV6_SIDLIST_ID,

/**
* @brief Push label
Expand Down
4 changes: 4 additions & 0 deletions inc/saiobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <sairoute.h>
#include <saimpls.h>
#include <sainat.h>
#include <saisrv6.h>

/**
* @defgroup SAIOBJECT SAI - Object API definitions.
Expand Down Expand Up @@ -77,6 +78,9 @@ typedef union _sai_object_key_entry_t
/** @validonly object_type == SAI_OBJECT_TYPE_NAT_ENTRY */
sai_nat_entry_t nat_entry;

/** @validonly object_type == SAI_OBJECT_TYPE_MY_SID_ENTRY */
sai_my_sid_entry_t my_sid_entry;

} sai_object_key_entry_t;

/**
Expand Down
168 changes: 0 additions & 168 deletions inc/saisegmentroute.h

This file was deleted.

Loading

0 comments on commit 2e934ff

Please sign in to comment.