SAI Metadata
Loading...
Searching...
No Matches
SAI - User Defined Field specific API definitions

Classes

struct  _sai_udf_api_t
 UDF methods, retrieved via sai_api_query() More...
 

Typedefs

typedef enum _sai_udf_base_t sai_udf_base_t
 UDF base enum.
 
typedef enum _sai_udf_attr_t sai_udf_attr_t
 Attribute id for UDF.
 
typedef enum _sai_udf_match_attr_t sai_udf_match_attr_t
 Attribute id for UDF match.
 
typedef enum _sai_udf_group_type_t sai_udf_group_type_t
 UDF group type.
 
typedef enum _sai_udf_group_attr_t sai_udf_group_attr_t
 Attribute id for UDF group.
 
typedef sai_status_t(* sai_create_udf_fn) (_Out_ sai_object_id_t *udf_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
 Create UDF.
 
typedef sai_status_t(* sai_remove_udf_fn) (_In_ sai_object_id_t udf_id)
 Remove UDF.
 
typedef sai_status_t(* sai_set_udf_attribute_fn) (_In_ sai_object_id_t udf_id, _In_ const sai_attribute_t *attr)
 Set UDF attribute.
 
typedef sai_status_t(* sai_get_udf_attribute_fn) (_In_ sai_object_id_t udf_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
 Get UDF attribute value.
 
typedef sai_status_t(* sai_create_udf_match_fn) (_Out_ sai_object_id_t *udf_match_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
 Create UDF match.
 
typedef sai_status_t(* sai_remove_udf_match_fn) (_In_ sai_object_id_t udf_match_id)
 Remove UDF match.
 
typedef sai_status_t(* sai_set_udf_match_attribute_fn) (_In_ sai_object_id_t udf_match_id, _In_ const sai_attribute_t *attr)
 Set UDF match attribute.
 
typedef sai_status_t(* sai_get_udf_match_attribute_fn) (_In_ sai_object_id_t udf_match_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
 Get UDF match attribute value.
 
typedef sai_status_t(* sai_create_udf_group_fn) (_Out_ sai_object_id_t *udf_group_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
 Create UDF group.
 
typedef sai_status_t(* sai_remove_udf_group_fn) (_In_ sai_object_id_t udf_group_id)
 Remove UDF group.
 
typedef sai_status_t(* sai_set_udf_group_attribute_fn) (_In_ sai_object_id_t udf_group_id, _In_ const sai_attribute_t *attr)
 Set UDF group attribute.
 
typedef sai_status_t(* sai_get_udf_group_attribute_fn) (_In_ sai_object_id_t udf_group_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
 Get UDF group attribute value.
 
typedef struct _sai_udf_api_t sai_udf_api_t
 UDF methods, retrieved via sai_api_query()
 

Enumerations

enum  _sai_udf_base_t { SAI_UDF_BASE_L2 , SAI_UDF_BASE_L3 , SAI_UDF_BASE_L4 }
 UDF base enum. More...
 
enum  _sai_udf_attr_t {
  SAI_UDF_ATTR_START , SAI_UDF_ATTR_MATCH_ID = SAI_UDF_ATTR_START , SAI_UDF_ATTR_GROUP_ID , SAI_UDF_ATTR_BASE ,
  SAI_UDF_ATTR_OFFSET , SAI_UDF_ATTR_HASH_MASK , SAI_UDF_ATTR_END , SAI_UDF_ATTR_CUSTOM_RANGE_START = 0x10000000 ,
  SAI_UDF_ATTR_CUSTOM_RANGE_END
}
 Attribute id for UDF. More...
 
enum  _sai_udf_match_attr_t {
  SAI_UDF_MATCH_ATTR_START , SAI_UDF_MATCH_ATTR_L2_TYPE = SAI_UDF_MATCH_ATTR_START , SAI_UDF_MATCH_ATTR_L3_TYPE , SAI_UDF_MATCH_ATTR_GRE_TYPE ,
  SAI_UDF_MATCH_ATTR_PRIORITY , SAI_UDF_MATCH_ATTR_L4_DST_PORT_TYPE , SAI_UDF_MATCH_ATTR_END , SAI_UDF_MATCH_ATTR_CUSTOM_RANGE_START = 0x10000000 ,
  SAI_UDF_MATCH_ATTR_CUSTOM_RANGE_END
}
 Attribute id for UDF match. More...
 
enum  _sai_udf_group_type_t { SAI_UDF_GROUP_TYPE_START , SAI_UDF_GROUP_TYPE_GENERIC = SAI_UDF_GROUP_TYPE_START , SAI_UDF_GROUP_TYPE_HASH , SAI_UDF_GROUP_TYPE_END }
 UDF group type. More...
 
enum  _sai_udf_group_attr_t {
  SAI_UDF_GROUP_ATTR_START , SAI_UDF_GROUP_ATTR_UDF_LIST = SAI_UDF_GROUP_ATTR_START , SAI_UDF_GROUP_ATTR_TYPE , SAI_UDF_GROUP_ATTR_LENGTH ,
  SAI_UDF_GROUP_ATTR_END , SAI_UDF_GROUP_ATTR_CUSTOM_RANGE_START = 0x10000000 , SAI_UDF_GROUP_ATTR_CUSTOM_RANGE_END
}
 Attribute id for UDF group. More...
 

Detailed Description

Typedef Documentation

◆ sai_create_udf_fn

typedef sai_status_t(* sai_create_udf_fn) (_Out_ sai_object_id_t *udf_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)

Create UDF.

Parameters
[out]udf_idUDF 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 284 of file saiudf.h.

◆ sai_create_udf_group_fn

typedef sai_status_t(* sai_create_udf_group_fn) (_Out_ sai_object_id_t *udf_group_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)

Create UDF group.

Parameters
[out]udf_group_idUDF group 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 388 of file saiudf.h.

◆ sai_create_udf_match_fn

typedef sai_status_t(* sai_create_udf_match_fn) (_Out_ sai_object_id_t *udf_match_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)

Create UDF match.

Parameters
[out]udf_match_idUDF match 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 336 of file saiudf.h.

◆ sai_get_udf_attribute_fn

typedef sai_status_t(* sai_get_udf_attribute_fn) (_In_ sai_object_id_t udf_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)

Get UDF attribute value.

Parameters
[in]udf_idUDF id
[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 321 of file saiudf.h.

◆ sai_get_udf_group_attribute_fn

typedef sai_status_t(* sai_get_udf_group_attribute_fn) (_In_ sai_object_id_t udf_group_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)

Get UDF group attribute value.

Parameters
[in]udf_group_idUDF group id
[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 425 of file saiudf.h.

◆ sai_get_udf_match_attribute_fn

typedef sai_status_t(* sai_get_udf_match_attribute_fn) (_In_ sai_object_id_t udf_match_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)

Get UDF match attribute value.

Parameters
[in]udf_match_idUDF match id
[in]attr_countNumber of attributes
[in,out]attr_listList of attributes
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 373 of file saiudf.h.

◆ sai_remove_udf_fn

typedef sai_status_t(* sai_remove_udf_fn) (_In_ sai_object_id_t udf_id)

Remove UDF.

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

Definition at line 297 of file saiudf.h.

◆ sai_remove_udf_group_fn

typedef sai_status_t(* sai_remove_udf_group_fn) (_In_ sai_object_id_t udf_group_id)

Remove UDF group.

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

Definition at line 401 of file saiudf.h.

◆ sai_remove_udf_match_fn

typedef sai_status_t(* sai_remove_udf_match_fn) (_In_ sai_object_id_t udf_match_id)

Remove UDF match.

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

Definition at line 349 of file saiudf.h.

◆ sai_set_udf_attribute_fn

typedef sai_status_t(* sai_set_udf_attribute_fn) (_In_ sai_object_id_t udf_id, _In_ const sai_attribute_t *attr)

Set UDF attribute.

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

Definition at line 308 of file saiudf.h.

◆ sai_set_udf_group_attribute_fn

typedef sai_status_t(* sai_set_udf_group_attribute_fn) (_In_ sai_object_id_t udf_group_id, _In_ const sai_attribute_t *attr)

Set UDF group attribute.

Parameters
[in]udf_group_idUDF group id
[in]attrAttribute
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 412 of file saiudf.h.

◆ sai_set_udf_match_attribute_fn

typedef sai_status_t(* sai_set_udf_match_attribute_fn) (_In_ sai_object_id_t udf_match_id, _In_ const sai_attribute_t *attr)

Set UDF match attribute.

Parameters
[in]udf_match_idUDF match id
[in]attrAttribute
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 360 of file saiudf.h.

Enumeration Type Documentation

◆ _sai_udf_attr_t

Attribute id for UDF.

Enumerator
SAI_UDF_ATTR_START 

Start of attributes.

SAI_UDF_ATTR_MATCH_ID 

UDF match ID.

Value Type:
sai_object_id_t
Flags:
MANDATORY_ON_CREATE | CREATE_ONLY
Allowed object types
SAI_OBJECT_TYPE_UDF_MATCH
SAI_UDF_ATTR_GROUP_ID 

UDF group id.

Value Type:
sai_object_id_t
Flags:
MANDATORY_ON_CREATE | CREATE_ONLY
Allowed object types
SAI_OBJECT_TYPE_UDF_GROUP
SAI_UDF_ATTR_BASE 

UDF base.

Value Type:
sai_udf_base_t
Flags:
CREATE_AND_SET
Default value:
SAI_UDF_BASE_L2
SAI_UDF_ATTR_OFFSET 

UDF byte offset.

Value Type:
sai_uint16_t
Flags:
MANDATORY_ON_CREATE | CREATE_ONLY
IsVlan:
false
SAI_UDF_ATTR_HASH_MASK 

UDF Mask.

Default to 2 bytes, value 0xFF, 0xFF

The count in the list must be equal to the UDF byte length. The mask only applies to extracted UDF when it is used for hash, it does not apply to the extracted UDF when it is used for ACL.

Value Type:
sai_u8_list_t
Flags:
CREATE_AND_SET
Default value:
const
SAI_UDF_ATTR_END 

End of attributes.

SAI_UDF_ATTR_CUSTOM_RANGE_START 

Custom range base value

SAI_UDF_ATTR_CUSTOM_RANGE_END 

End of custom range base

Definition at line 55 of file saiudf.h.

◆ _sai_udf_base_t

UDF base enum.

Enumerator
SAI_UDF_BASE_L2 

UDF offset base from the start of L2 header

SAI_UDF_BASE_L3 

UDF offset base from the start of L3 header

SAI_UDF_BASE_L4 

UDF offset base from the start of L4 header

Definition at line 39 of file saiudf.h.

◆ _sai_udf_group_attr_t

Attribute id for UDF group.

Enumerator
SAI_UDF_GROUP_ATTR_START 

Start of attributes.

SAI_UDF_GROUP_ATTR_UDF_LIST 

UDF list.

Value Type:
sai_object_list_t
Flags:
READ_ONLY
Allowed object types
SAI_OBJECT_TYPE_UDF
SAI_UDF_GROUP_ATTR_TYPE 

UDF group type.

Value Type:
sai_udf_group_type_t
Flags:
CREATE_ONLY
Default value:
SAI_UDF_GROUP_TYPE_GENERIC
SAI_UDF_GROUP_ATTR_LENGTH 

UDF byte length.

Value Type:
sai_uint16_t
Flags:
MANDATORY_ON_CREATE | CREATE_ONLY
IsVlan:
false
SAI_UDF_GROUP_ATTR_END 

End of attributes.

SAI_UDF_GROUP_ATTR_CUSTOM_RANGE_START 

Custom range base value

SAI_UDF_GROUP_ATTR_CUSTOM_RANGE_END 

End of custom range base

Definition at line 227 of file saiudf.h.

◆ _sai_udf_group_type_t

UDF group type.

Enumerator
SAI_UDF_GROUP_TYPE_START 

Start of group type

SAI_UDF_GROUP_TYPE_GENERIC 

Generic UDF group

SAI_UDF_GROUP_TYPE_HASH 

UDF group for hash

SAI_UDF_GROUP_TYPE_END 

End of group type

Definition at line 208 of file saiudf.h.

◆ _sai_udf_match_attr_t

Attribute id for UDF match.

Enumerator
SAI_UDF_MATCH_ATTR_START 

Start of attributes.

SAI_UDF_MATCH_ATTR_L2_TYPE 

UDF L2 match rule.

Default to None

Value Type:
sai_acl_field_data_t sai_uint16_t
Flags:
CREATE_ONLY
IsVlan:
false
Default value:
0
SAI_UDF_MATCH_ATTR_L3_TYPE 

UDF L3 match rule.

Default to None

Value Type:
sai_acl_field_data_t sai_uint8_t
Flags:
CREATE_ONLY
Default value:
0
SAI_UDF_MATCH_ATTR_GRE_TYPE 

UDF GRE match rule.

Default to None

Value Type:
sai_acl_field_data_t sai_uint16_t
Flags:
CREATE_ONLY
IsVlan:
false
Default value:
0
SAI_UDF_MATCH_ATTR_PRIORITY 

UDF match priority.

Value Type:
sai_uint8_t
Flags:
CREATE_ONLY
Default value:
0
SAI_UDF_MATCH_ATTR_L4_DST_PORT_TYPE 

UDF L4 Dst port rule.

Default to None

Value Type:
sai_acl_field_data_t sai_uint16_t
Flags:
CREATE_ONLY
IsVlan:
false
Default value:
0
SAI_UDF_MATCH_ATTR_END 

End of attributes.

SAI_UDF_MATCH_ATTR_CUSTOM_RANGE_START 

Custom range base value

SAI_UDF_MATCH_ATTR_CUSTOM_RANGE_END 

End of custom range base

Definition at line 129 of file saiudf.h.