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

Classes

struct  _sai_lag_api_t
 LAG methods table retrieved with sai_api_query() More...
 

Typedefs

typedef enum _sai_lag_attr_t sai_lag_attr_t
 LAG attribute: List of attributes for LAG object.
 
typedef sai_status_t(* sai_create_lag_fn) (_Out_ sai_object_id_t *lag_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
 Create LAG.
 
typedef sai_status_t(* sai_remove_lag_fn) (_In_ sai_object_id_t lag_id)
 Remove LAG.
 
typedef sai_status_t(* sai_set_lag_attribute_fn) (_In_ sai_object_id_t lag_id, _In_ const sai_attribute_t *attr)
 Set LAG Attribute.
 
typedef sai_status_t(* sai_get_lag_attribute_fn) (_In_ sai_object_id_t lag_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
 Get LAG Attribute.
 
typedef enum _sai_lag_member_attr_t sai_lag_member_attr_t
 List of LAG member attributes.
 
typedef sai_status_t(* sai_create_lag_member_fn) (_Out_ sai_object_id_t *lag_member_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
 Create LAG Member.
 
typedef sai_status_t(* sai_remove_lag_member_fn) (_In_ sai_object_id_t lag_member_id)
 Remove LAG Member.
 
typedef sai_status_t(* sai_set_lag_member_attribute_fn) (_In_ sai_object_id_t lag_member_id, _In_ const sai_attribute_t *attr)
 Set LAG Member Attribute.
 
typedef sai_status_t(* sai_get_lag_member_attribute_fn) (_In_ sai_object_id_t lag_member_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
 Get LAG Member Attribute.
 
typedef struct _sai_lag_api_t sai_lag_api_t
 LAG methods table retrieved with sai_api_query()
 

Enumerations

enum  _sai_lag_attr_t {
  SAI_LAG_ATTR_START , SAI_LAG_ATTR_PORT_LIST = SAI_LAG_ATTR_START , SAI_LAG_ATTR_INGRESS_ACL , SAI_LAG_ATTR_EGRESS_ACL ,
  SAI_LAG_ATTR_PORT_VLAN_ID , SAI_LAG_ATTR_DEFAULT_VLAN_PRIORITY , SAI_LAG_ATTR_DROP_UNTAGGED , SAI_LAG_ATTR_DROP_TAGGED ,
  SAI_LAG_ATTR_TPID , SAI_LAG_ATTR_SYSTEM_PORT_AGGREGATE_ID , SAI_LAG_ATTR_LABEL , SAI_LAG_ATTR_ARS_OBJECT_ID ,
  SAI_LAG_ATTR_ARS_PACKET_DROPS , SAI_LAG_ATTR_ARS_PORT_REASSIGNMENTS , SAI_LAG_ATTR_END , SAI_LAG_ATTR_CUSTOM_RANGE_START = 0x10000000 ,
  SAI_LAG_ATTR_CUSTOM_RANGE_END
}
 LAG attribute: List of attributes for LAG object. More...
 
enum  _sai_lag_member_attr_t {
  SAI_LAG_MEMBER_ATTR_START , SAI_LAG_MEMBER_ATTR_LAG_ID = SAI_LAG_MEMBER_ATTR_START , SAI_LAG_MEMBER_ATTR_PORT_ID , SAI_LAG_MEMBER_ATTR_EGRESS_DISABLE ,
  SAI_LAG_MEMBER_ATTR_INGRESS_DISABLE , SAI_LAG_MEMBER_ATTR_END , SAI_LAG_MEMBER_ATTR_CUSTOM_RANGE_START = 0x10000000 , SAI_LAG_MEMBER_ATTR_CUSTOM_RANGE_END
}
 List of LAG member attributes. More...
 

Detailed Description

Typedef Documentation

◆ sai_create_lag_fn

typedef sai_status_t(* sai_create_lag_fn) (_Out_ sai_object_id_t *lag_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)

Create LAG.

Parameters
[out]lag_idLAG id
[in]switch_idSwitch object id
[in]attr_countNumber of attributes
[in]attr_listArray of attributes
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 229 of file sailag.h.

◆ sai_create_lag_member_fn

typedef sai_status_t(* sai_create_lag_member_fn) (_Out_ sai_object_id_t *lag_member_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)

Create LAG Member.

Parameters
[out]lag_member_idLAG Member id
[in]switch_idSwitch id
[in]attr_countNumber of attributes
[in]attr_listArray of attributes
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 340 of file sailag.h.

◆ sai_get_lag_attribute_fn

typedef sai_status_t(* sai_get_lag_attribute_fn) (_In_ sai_object_id_t lag_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)

Get LAG Attribute.

Parameters
[in]lag_idLAG id
[in]attr_countNumber of attributes to be get
[in,out]attr_listList of structures containing ID and value to be get
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 266 of file sailag.h.

◆ sai_get_lag_member_attribute_fn

typedef sai_status_t(* sai_get_lag_member_attribute_fn) (_In_ sai_object_id_t lag_member_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)

Get LAG Member Attribute.

Parameters
[in]lag_member_idLAG Member id
[in]attr_countNumber of attributes to be get
[in,out]attr_listList of structures containing ID and value to be get
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 377 of file sailag.h.

◆ sai_remove_lag_fn

typedef sai_status_t(* sai_remove_lag_fn) (_In_ sai_object_id_t lag_id)

Remove LAG.

Parameters
[in]lag_idLAG id
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 242 of file sailag.h.

◆ sai_remove_lag_member_fn

typedef sai_status_t(* sai_remove_lag_member_fn) (_In_ sai_object_id_t lag_member_id)

Remove LAG Member.

Parameters
[in]lag_member_idLAG Member id
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 353 of file sailag.h.

◆ sai_set_lag_attribute_fn

typedef sai_status_t(* sai_set_lag_attribute_fn) (_In_ sai_object_id_t lag_id, _In_ const sai_attribute_t *attr)

Set LAG Attribute.

Parameters
[in]lag_idLAG id
[in]attrStructure containing ID and value to be set
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 253 of file sailag.h.

◆ sai_set_lag_member_attribute_fn

typedef sai_status_t(* sai_set_lag_member_attribute_fn) (_In_ sai_object_id_t lag_member_id, _In_ const sai_attribute_t *attr)

Set LAG Member Attribute.

Parameters
[in]lag_member_idLAG Member id
[in]attrStructure containing ID and value to be set
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 364 of file sailag.h.

Enumeration Type Documentation

◆ _sai_lag_attr_t

LAG attribute: List of attributes for LAG object.

Enumerator
SAI_LAG_ATTR_START 

Start of attributes.

SAI_LAG_ATTR_PORT_LIST 

SAI port list.

Value Type:
sai_object_list_t
Flags:
READ_ONLY
Allowed object types
SAI_OBJECT_TYPE_LAG_MEMBER
SAI_LAG_ATTR_INGRESS_ACL 

LAG bind point for ingress ACL object.

READ_WRITE

Bind (or unbind) an ingress ACL table or ACL group on a LAG. Enable/Update ingress ACL table or ACL group filtering by assigning the list of valid object id. Disable ingress filtering by assigning SAI_NULL_OBJECT_ID in the attribute value.

Value Type:
sai_object_id_t
Flags:
CREATE_AND_SET
Allowed object types
SAI_OBJECT_TYPE_ACL_TABLE, SAI_OBJECT_TYPE_ACL_TABLE_GROUP
Allows NULL object ID
true
Default value:
SAI_NULL_OBJECT_ID
SAI_LAG_ATTR_EGRESS_ACL 

LAG bind point for egress ACL object.

Bind (or unbind) an egress ACL tables or ACL groups on a LAG. Enable/Update egress ACL table or ACL group filtering by assigning the list of valid object id. Disable egress filtering by assigning SAI_NULL_OBJECT_ID in the attribute value.

Value Type:
sai_object_id_t
Flags:
CREATE_AND_SET
Allowed object types
SAI_OBJECT_TYPE_ACL_TABLE, SAI_OBJECT_TYPE_ACL_TABLE_GROUP
Allows NULL object ID
true
Default value:
SAI_NULL_OBJECT_ID
SAI_LAG_ATTR_PORT_VLAN_ID 

Port VLAN ID.

Untagged ingress frames are tagged with Port VLAN ID (PVID)

When a port joins a LAG: SAI automatically sets the joining port PVID to that of the LAG. SAI also saves in its internal database the original PVID state of the port.

While a port is a member of a LAG, it is not possible to change the value of the following 4 attributes for the port: SAI_PORT_ATTR_PORT_VLAN_ID SAI_PORT_ATTR_DEFAULT_VLAN_PRIORITY SAI_PORT_ATTR_DROP_UNTAGGED SAI_PORT_ATTR_DROP_TAGGED

When a port leaves the LAG: PVID is set to the original PVID by SAI Since the port is not associated with a bridge port or a router port at that point, it will not transfer traffic, until such object is attached to it.

Value Type:
sai_uint16_t
Flags:
CREATE_AND_SET
IsVlan:
true
Default value:
1
SAI_LAG_ATTR_DEFAULT_VLAN_PRIORITY 

Default VLAN Priority.

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

Dropping of untagged frames on ingress.

Value Type:
bool
Flags:
CREATE_AND_SET
Default value:
false
SAI_LAG_ATTR_DROP_TAGGED 

Dropping of tagged frames on ingress.

Value Type:
bool
Flags:
CREATE_AND_SET
Default value:
false
SAI_LAG_ATTR_TPID 

TPID.

Value Type:
sai_uint16_t
Flags:
CREATE_AND_SET
IsVlan:
false
Default value:
0x8100
SAI_LAG_ATTR_SYSTEM_PORT_AGGREGATE_ID 

LAG system port ID.

The application must manage the allocation of the system port aggregate IDs associated with the LAG for consistency across all switches in a VOQ based system. The system port aggregate ID range is from 1 to SAI_SWITCH_ATTR_NUMBER_OF_LAGS. The default value of 0 means this field is not used and SAI will allocate the system port aggregate ID internally. Valid only when SAI_SWITCH_ATTR_TYPE == SAI_SWITCH_TYPE_VOQ

Value Type:
sai_uint32_t
Flags:
CREATE_ONLY
Default value:
0
SAI_LAG_ATTR_LABEL 

Label attribute used to unique identify empty LAG.

Value Type:
char
Flags:
CREATE_AND_SET
Default value:
""
SAI_LAG_ATTR_ARS_OBJECT_ID 

Adaptive routing and switching object for this group.

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

Number of packets dropped by ARS mechanism.

Value Type:
sai_uint32_t
Flags:
READ_ONLY
SAI_LAG_ATTR_ARS_PORT_REASSIGNMENTS 

Number of ARS port reassignments done.

Value Type:
sai_uint32_t
Flags:
READ_ONLY
SAI_LAG_ATTR_END 

End of attributes.

SAI_LAG_ATTR_CUSTOM_RANGE_START 

Custom range base value

SAI_LAG_ATTR_CUSTOM_RANGE_END 

End of custom range base

Definition at line 39 of file sailag.h.

◆ _sai_lag_member_attr_t

List of LAG member attributes.

Enumerator
SAI_LAG_MEMBER_ATTR_START 

Start of attributes.

SAI_LAG_MEMBER_ATTR_LAG_ID 

LAG ID.

Value Type:
sai_object_id_t
Flags:
MANDATORY_ON_CREATE | CREATE_ONLY
Allowed object types
SAI_OBJECT_TYPE_LAG
SAI_LAG_MEMBER_ATTR_PORT_ID 

Logical port ID.

Value Type:
sai_object_id_t
Flags:
MANDATORY_ON_CREATE | CREATE_ONLY
Allowed object types
SAI_OBJECT_TYPE_PORT, SAI_OBJECT_TYPE_SYSTEM_PORT
SAI_LAG_MEMBER_ATTR_EGRESS_DISABLE 

Disable traffic distribution to this port as part of LAG.

Value Type:
bool
Flags:
CREATE_AND_SET
Default value:
false
SAI_LAG_MEMBER_ATTR_INGRESS_DISABLE 

Disable traffic collection from this port as part of LAG.

Value Type:
bool
Flags:
CREATE_AND_SET
Default value:
false
SAI_LAG_MEMBER_ATTR_END 

End of attributes.

SAI_LAG_MEMBER_ATTR_CUSTOM_RANGE_START 

Custom range base value

SAI_LAG_MEMBER_ATTR_CUSTOM_RANGE_END 

End of custom range base

Definition at line 274 of file sailag.h.