SAI Metadata
Loading...
Searching...
No Matches
SAI - MPLS specific API definitions

Classes

struct  _sai_inseg_entry_t
 In segment entry. More...
 
struct  _sai_mpls_api_t
 MPLS methods table retrieved with sai_api_query() More...
 

Typedefs

typedef enum _sai_inseg_entry_psc_type_t sai_inseg_entry_psc_type_t
 
typedef enum _sai_inseg_entry_pop_ttl_mode_t sai_inseg_entry_pop_ttl_mode_t
 
typedef enum _sai_inseg_entry_pop_qos_mode_t sai_inseg_entry_pop_qos_mode_t
 
typedef enum _sai_inseg_entry_attr_t sai_inseg_entry_attr_t
 Attribute Id for SAI in segment.
 
typedef struct _sai_inseg_entry_t sai_inseg_entry_t
 In segment entry.
 
typedef sai_status_t(* sai_create_inseg_entry_fn) (_In_ const sai_inseg_entry_t *inseg_entry, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
 Create In Segment entry.
 
typedef sai_status_t(* sai_remove_inseg_entry_fn) (_In_ const sai_inseg_entry_t *inseg_entry)
 Remove In Segment entry.
 
typedef sai_status_t(* sai_set_inseg_entry_attribute_fn) (_In_ const sai_inseg_entry_t *inseg_entry, _In_ const sai_attribute_t *attr)
 Set In Segment attribute value.
 
typedef sai_status_t(* sai_get_inseg_entry_attribute_fn) (_In_ const sai_inseg_entry_t *inseg_entry, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
 Get In Segment attribute value.
 
typedef sai_status_t(* sai_bulk_create_inseg_entry_fn) (_In_ uint32_t object_count, _In_ const sai_inseg_entry_t *inseg_entry, _In_ const uint32_t *attr_count, _In_ const sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)
 Bulk create In Segment entry.
 
typedef sai_status_t(* sai_bulk_remove_inseg_entry_fn) (_In_ uint32_t object_count, _In_ const sai_inseg_entry_t *inseg_entry, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)
 Bulk remove In Segment entry.
 
typedef sai_status_t(* sai_bulk_set_inseg_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_inseg_entry_t *inseg_entry, _In_ const sai_attribute_t *attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)
 Bulk set attribute on In Segment entry.
 
typedef sai_status_t(* sai_bulk_get_inseg_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_inseg_entry_t *inseg_entry, _In_ const uint32_t *attr_count, _Inout_ sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)
 Bulk get attribute on In Segment entry.
 
typedef struct _sai_mpls_api_t sai_mpls_api_t
 MPLS methods table retrieved with sai_api_query()
 

Enumerations

enum  _sai_inseg_entry_psc_type_t { SAI_INSEG_ENTRY_PSC_TYPE_ELSP , SAI_INSEG_ENTRY_PSC_TYPE_LLSP }
 
enum  _sai_inseg_entry_pop_ttl_mode_t { SAI_INSEG_ENTRY_POP_TTL_MODE_UNIFORM , SAI_INSEG_ENTRY_POP_TTL_MODE_PIPE }
 
enum  _sai_inseg_entry_pop_qos_mode_t { SAI_INSEG_ENTRY_POP_QOS_MODE_UNIFORM , SAI_INSEG_ENTRY_POP_QOS_MODE_PIPE }
 
enum  _sai_inseg_entry_attr_t {
  SAI_INSEG_ENTRY_ATTR_START , SAI_INSEG_ENTRY_ATTR_NUM_OF_POP = SAI_INSEG_ENTRY_ATTR_START , SAI_INSEG_ENTRY_ATTR_PACKET_ACTION , SAI_INSEG_ENTRY_ATTR_TRAP_PRIORITY ,
  SAI_INSEG_ENTRY_ATTR_NEXT_HOP_ID , SAI_INSEG_ENTRY_ATTR_PSC_TYPE , SAI_INSEG_ENTRY_ATTR_QOS_TC , SAI_INSEG_ENTRY_ATTR_MPLS_EXP_TO_TC_MAP ,
  SAI_INSEG_ENTRY_ATTR_MPLS_EXP_TO_COLOR_MAP , SAI_INSEG_ENTRY_ATTR_POP_TTL_MODE , SAI_INSEG_ENTRY_ATTR_POP_QOS_MODE , SAI_INSEG_ENTRY_ATTR_COUNTER_ID ,
  SAI_INSEG_ENTRY_ATTR_END , SAI_INSEG_ENTRY_ATTR_CUSTOM_RANGE_START = 0x10000000 , SAI_INSEG_ENTRY_ATTR_CUSTOM_RANGE_END
}
 Attribute Id for SAI in segment. More...
 

Detailed Description

Typedef Documentation

◆ sai_bulk_create_inseg_entry_fn

typedef sai_status_t(* sai_bulk_create_inseg_entry_fn) (_In_ uint32_t object_count, _In_ const sai_inseg_entry_t *inseg_entry, _In_ const uint32_t *attr_count, _In_ const sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)

Bulk create In Segment entry.

Parameters
[in]object_countNumber of objects to create
[in]inseg_entryList of object to create
[in]attr_countList of attr_count. Caller passes the number of attribute for each object to create.
[in]attr_listList of attributes for every object.
[in]modeBulk operation error handling mode.
[out]object_statusesList of status for every object. Caller needs to allocate the buffer
Returns
SAI_STATUS_SUCCESS on success when all objects are created or SAI_STATUS_FAILURE when any of the objects fails to create. When there is failure, Caller is expected to go through the list of returned statuses to find out which fails and which succeeds.

Definition at line 314 of file saimpls.h.

◆ sai_bulk_get_inseg_entry_attribute_fn

typedef sai_status_t(* sai_bulk_get_inseg_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_inseg_entry_t *inseg_entry, _In_ const uint32_t *attr_count, _Inout_ sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)

Bulk get attribute on In Segment entry.

Parameters
[in]object_countNumber of objects to set attribute
[in]inseg_entryList of objects to set attribute
[in]attr_countList of attr_count. Caller passes the number of attribute for each object to get
[in,out]attr_listList of attributes to set on objects, one attribute per object
[in]modeBulk operation error handling mode
[out]object_statusesList of status for every object. Caller needs to allocate the buffer
Returns
SAI_STATUS_SUCCESS on success when all objects are removed or SAI_STATUS_FAILURE when any of the objects fails to remove. When there is failure, Caller is expected to go through the list of returned statuses to find out which fails and which succeeds.

Definition at line 381 of file saimpls.h.

◆ sai_bulk_remove_inseg_entry_fn

typedef sai_status_t(* sai_bulk_remove_inseg_entry_fn) (_In_ uint32_t object_count, _In_ const sai_inseg_entry_t *inseg_entry, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)

Bulk remove In Segment entry.

Parameters
[in]object_countNumber of objects to remove
[in]inseg_entryList of objects to remove
[in]modeBulk operation error handling mode.
[out]object_statusesList of status for every object. Caller needs to allocate the buffer
Returns
SAI_STATUS_SUCCESS on success when all objects are removed or SAI_STATUS_FAILURE when any of the objects fails to remove. When there is failure, Caller is expected to go through the list of returned statuses to find out which fails and which succeeds.

Definition at line 336 of file saimpls.h.

◆ sai_bulk_set_inseg_entry_attribute_fn

typedef sai_status_t(* sai_bulk_set_inseg_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_inseg_entry_t *inseg_entry, _In_ const sai_attribute_t *attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)

Bulk set attribute on In Segment entry.

Parameters
[in]object_countNumber of objects to set attribute
[in]inseg_entryList of objects to set attribute
[in]attr_listList of attributes to set on objects, one attribute per object
[in]modeBulk operation error handling mode.
[out]object_statusesList of status for every object. Caller needs to allocate the buffer
Returns
SAI_STATUS_SUCCESS on success when all objects are removed or SAI_STATUS_FAILURE when any of the objects fails to remove. When there is failure, Caller is expected to go through the list of returned statuses to find out which fails and which succeeds.

Definition at line 357 of file saimpls.h.

◆ sai_create_inseg_entry_fn

typedef sai_status_t(* sai_create_inseg_entry_fn) (_In_ const sai_inseg_entry_t *inseg_entry, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)

Create In Segment entry.

Parameters
[in]inseg_entryInSegment entry
[in]attr_countNumber of attributes
[in]attr_listArray of attributes
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 256 of file saimpls.h.

◆ sai_get_inseg_entry_attribute_fn

typedef sai_status_t(* sai_get_inseg_entry_attribute_fn) (_In_ const sai_inseg_entry_t *inseg_entry, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)

Get In Segment attribute value.

Parameters
[in]inseg_entryInSegment entry
[in]attr_countNumber of attributes
[in,out]attr_listArray of attributes
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 292 of file saimpls.h.

◆ sai_remove_inseg_entry_fn

typedef sai_status_t(* sai_remove_inseg_entry_fn) (_In_ const sai_inseg_entry_t *inseg_entry)

Remove In Segment entry.

Parameters
[in]inseg_entryInSegment entry
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 268 of file saimpls.h.

◆ sai_set_inseg_entry_attribute_fn

typedef sai_status_t(* sai_set_inseg_entry_attribute_fn) (_In_ const sai_inseg_entry_t *inseg_entry, _In_ const sai_attribute_t *attr)

Set In Segment attribute value.

Parameters
[in]inseg_entryInSegment entry
[in]attrAttribute
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 279 of file saimpls.h.

Enumeration Type Documentation

◆ _sai_inseg_entry_attr_t

Attribute Id for SAI in segment.

Enumerator
SAI_INSEG_ENTRY_ATTR_START 

Start of attributes.

SAI_INSEG_ENTRY_ATTR_NUM_OF_POP 

Number of pops.

Value Type:
sai_uint8_t
Flags:
CREATE_AND_SET
Default value:
0
SAI_INSEG_ENTRY_ATTR_PACKET_ACTION 

Packet action.

Value Type:
sai_packet_action_t
Flags:
CREATE_AND_SET
Default value:
SAI_PACKET_ACTION_FORWARD
SAI_INSEG_ENTRY_ATTR_TRAP_PRIORITY 

Packet priority for trap/log actions.

Value Type:
sai_uint8_t
Flags:
CREATE_AND_SET
Default value:
0
SAI_INSEG_ENTRY_ATTR_NEXT_HOP_ID 

The next hop id.

Value Type:
sai_object_id_t
Flags:
CREATE_AND_SET
Allowed object types
SAI_OBJECT_TYPE_NEXT_HOP, SAI_OBJECT_TYPE_NEXT_HOP_GROUP, SAI_OBJECT_TYPE_ROUTER_INTERFACE
Allows NULL object ID
true
Default value:
SAI_NULL_OBJECT_ID
SAI_INSEG_ENTRY_ATTR_PSC_TYPE 

Define PSC type for a label.

Defines how to infer both TC and COLOR

Value Type:
sai_inseg_entry_psc_type_t
Flags:
CREATE_AND_SET
Default value:
SAI_INSEG_ENTRY_PSC_TYPE_ELSP
SAI_INSEG_ENTRY_ATTR_QOS_TC 

TC for a label.

Associate TC by a label (override TC provided by QOS MAP) Mainly used for L-LSP tunnels, where label infers TC and EXP infers COLOR

Value Type:
sai_uint8_t
Flags:
CREATE_AND_SET
Default value:
0
Valid only when:
SAI_INSEG_ENTRY_ATTR_PSC_TYPE == SAI_INSEG_ENTRY_PSC_TYPE_LLSP
SAI_INSEG_ENTRY_ATTR_MPLS_EXP_TO_TC_MAP 

Enable EXP -> TC MAP on label.

Associate TC by a QOS MAP Mainly used for E-LSP tunnels, where EXP infers both TC and COLOR Overrides SAI_SWITCH_ATTR_QOS_MPLS_EXP_TO_TC_MAP and SAI_PORT_ATTR_QOS_MPLS_EXP_TO_TC_MAP

Value Type:
sai_object_id_t
Flags:
CREATE_AND_SET
Allowed object types
SAI_OBJECT_TYPE_QOS_MAP
Allows NULL object ID
true
Default value:
SAI_NULL_OBJECT_ID
Valid only when:
SAI_INSEG_ENTRY_ATTR_PSC_TYPE == SAI_INSEG_ENTRY_PSC_TYPE_ELSP
SAI_INSEG_ENTRY_ATTR_MPLS_EXP_TO_COLOR_MAP 

Enable EXP -> COLOR MAP on label.

Associate COLOR by a QOS MAP Overrides SAI_SWITCH_ATTR_QOS_MPLS_EXP_TO_COLOR_MAP and SAI_PORT_ATTR_QOS_MPLS_EXP_TO_COLOR_MAP

Value Type:
sai_object_id_t
Flags:
CREATE_AND_SET
Allowed object types
SAI_OBJECT_TYPE_QOS_MAP
Allows NULL object ID
true
Default value:
SAI_NULL_OBJECT_ID
SAI_INSEG_ENTRY_ATTR_POP_TTL_MODE 

Define TTL setting for PHP or POP.

Value Type:
sai_inseg_entry_pop_ttl_mode_t
Flags:
CREATE_AND_SET
Default value:
SAI_INSEG_ENTRY_POP_TTL_MODE_UNIFORM
SAI_INSEG_ENTRY_ATTR_POP_QOS_MODE 

Define QOS setting for PHP or POP.

Value Type:
sai_inseg_entry_pop_qos_mode_t
Flags:
CREATE_AND_SET
Default value:
SAI_INSEG_ENTRY_POP_QOS_MODE_UNIFORM
SAI_INSEG_ENTRY_ATTR_COUNTER_ID 

Attach a counter.

When it is empty, then packet hits won't be counted

Value Type:
sai_object_id_t
Flags:
CREATE_AND_SET
Allowed object types
SAI_OBJECT_TYPE_COUNTER
Allows NULL object ID
true
Default value:
SAI_NULL_OBJECT_ID
SAI_INSEG_ENTRY_ATTR_END 

End of attributes.

SAI_INSEG_ENTRY_ATTR_CUSTOM_RANGE_START 

Custom range base value

SAI_INSEG_ENTRY_ATTR_CUSTOM_RANGE_END 

End of custom range base

Definition at line 85 of file saimpls.h.

◆ _sai_inseg_entry_pop_qos_mode_t

Enumerator
SAI_INSEG_ENTRY_POP_QOS_MODE_UNIFORM 

Uniform mode.

DSCP or EXP of inner header is computed based on TC AND COLOR of outer header on pop.

SAI_INSEG_ENTRY_POP_QOS_MODE_PIPE 

Uniform mode.

DSCP or EXP of inner header is left unchanged on pop.

Definition at line 65 of file saimpls.h.

◆ _sai_inseg_entry_pop_ttl_mode_t

Enumerator
SAI_INSEG_ENTRY_POP_TTL_MODE_UNIFORM 

Uniform mode.

TTL of inner header is computed based on TTL of outer header on pop.

SAI_INSEG_ENTRY_POP_TTL_MODE_PIPE 

Pipe mode.

TTL of inner header is left unchanged on pop.

Definition at line 48 of file saimpls.h.

◆ _sai_inseg_entry_psc_type_t

Enumerator
SAI_INSEG_ENTRY_PSC_TYPE_ELSP 

EXP of MPLS label infers both TC and COLOR.

SAI_INSEG_ENTRY_PSC_TYPE_LLSP 

MPLS label infers TC and EXP of MPLS label infers COLOR.

Definition at line 35 of file saimpls.h.