SAI Metadata
Loading...
Searching...
No Matches
SAI - Samplepacket specific public APIs and data structures

Classes

struct  _sai_samplepacket_api_t
 Samplepacket method table retrieved with sai_api_query() More...
 

Typedefs

typedef enum _sai_samplepacket_type_t sai_samplepacket_type_t
 SAI type of samplepacket sampling.
 
typedef enum _sai_samplepacket_mode_t sai_samplepacket_mode_t
 SAI mode of samplepacket sampling.
 
typedef enum _sai_samplepacket_attr_t sai_samplepacket_attr_t
 SAI attributes of samplepacket session.
 
typedef sai_status_t(* sai_create_samplepacket_fn) (_Out_ sai_object_id_t *samplepacket_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
 Create samplepacket session.
 
typedef sai_status_t(* sai_remove_samplepacket_fn) (_In_ sai_object_id_t samplepacket_id)
 Remove samplepacket session.
 
typedef sai_status_t(* sai_set_samplepacket_attribute_fn) (_In_ sai_object_id_t samplepacket_id, _In_ const sai_attribute_t *attr)
 Set samplepacket session attributes.
 
typedef sai_status_t(* sai_get_samplepacket_attribute_fn) (_In_ sai_object_id_t samplepacket_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
 Get samplepacket session attributes.
 
typedef struct _sai_samplepacket_api_t sai_samplepacket_api_t
 Samplepacket method table retrieved with sai_api_query()
 

Enumerations

enum  _sai_samplepacket_type_t { SAI_SAMPLEPACKET_TYPE_SLOW_PATH , SAI_SAMPLEPACKET_TYPE_MIRROR_SESSION }
 SAI type of samplepacket sampling. More...
 
enum  _sai_samplepacket_mode_t { SAI_SAMPLEPACKET_MODE_EXCLUSIVE , SAI_SAMPLEPACKET_MODE_SHARED }
 SAI mode of samplepacket sampling. More...
 
enum  _sai_samplepacket_attr_t {
  SAI_SAMPLEPACKET_ATTR_START , SAI_SAMPLEPACKET_ATTR_SAMPLE_RATE = SAI_SAMPLEPACKET_ATTR_START , SAI_SAMPLEPACKET_ATTR_TYPE , SAI_SAMPLEPACKET_ATTR_MODE ,
  SAI_SAMPLEPACKET_ATTR_END , SAI_SAMPLEPACKET_ATTR_CUSTOM_RANGE_START = 0x10000000 , SAI_SAMPLEPACKET_ATTR_CUSTOM_RANGE_END
}
 SAI attributes of samplepacket session. More...
 

Detailed Description

Typedef Documentation

◆ sai_create_samplepacket_fn

typedef sai_status_t(* sai_create_samplepacket_fn) (_Out_ sai_object_id_t *samplepacket_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)

Create samplepacket session.

Parameters
[out]samplepacket_idSamplepacket session id
[in]switch_idSwitch id
[in]attr_countNumber of attributes
[in]attr_listValue of attributes
Returns
SAI_STATUS_SUCCESS if operation is successful otherwise a different error code is returned.

Definition at line 141 of file saisamplepacket.h.

◆ sai_get_samplepacket_attribute_fn

typedef sai_status_t(* sai_get_samplepacket_attribute_fn) (_In_ sai_object_id_t samplepacket_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)

Get samplepacket session attributes.

Parameters
[in]samplepacket_idSamplepacket session id
[in]attr_countNumber of attributes
[in,out]attr_listValue of attribute
Returns
SAI_STATUS_SUCCESS if operation is successful otherwise a different error code is returned.

Definition at line 181 of file saisamplepacket.h.

◆ sai_remove_samplepacket_fn

typedef sai_status_t(* sai_remove_samplepacket_fn) (_In_ sai_object_id_t samplepacket_id)

Remove samplepacket session.

Parameters
[in]samplepacket_idSamplepacket session id
Returns
SAI_STATUS_SUCCESS if operation is successful otherwise a different error code is returned.

Definition at line 155 of file saisamplepacket.h.

◆ sai_set_samplepacket_attribute_fn

typedef sai_status_t(* sai_set_samplepacket_attribute_fn) (_In_ sai_object_id_t samplepacket_id, _In_ const sai_attribute_t *attr)

Set samplepacket session attributes.

Parameters
[in]samplepacket_idSamplepacket session id
[in]attrValue of attribute
Returns
SAI_STATUS_SUCCESS if operation is successful otherwise a different error code is returned.

Definition at line 167 of file saisamplepacket.h.

Enumeration Type Documentation

◆ _sai_samplepacket_attr_t

SAI attributes of samplepacket session.

Enumerator
SAI_SAMPLEPACKET_ATTR_START 

Start of attributes.

SAI_SAMPLEPACKET_ATTR_SAMPLE_RATE 

Sampling rate of type.

The sampling rate specifies random sampling probability as the ratio of packets observed to samples generated. For example a sampling rate of 100 specifies that, on average, 1 sample will be generated for every 100 packets observed.

Value Type:
sai_uint32_t
Flags:
MANDATORY_ON_CREATE | CREATE_AND_SET
SAI_SAMPLEPACKET_ATTR_TYPE 

Samplepacket switching type.

Value Type:
sai_samplepacket_type_t
Flags:
CREATE_ONLY
Default value:
SAI_SAMPLEPACKET_TYPE_SLOW_PATH
SAI_SAMPLEPACKET_ATTR_MODE 

Samplepacket mode.

Value Type:
sai_samplepacket_mode_t
Flags:
CREATE_ONLY
Default value:
SAI_SAMPLEPACKET_MODE_EXCLUSIVE
SAI_SAMPLEPACKET_ATTR_END 

End of attributes.

SAI_SAMPLEPACKET_ATTR_CUSTOM_RANGE_START 

Custom range base value

SAI_SAMPLEPACKET_ATTR_CUSTOM_RANGE_END 

End of custom range base

Definition at line 79 of file saisamplepacket.h.

◆ _sai_samplepacket_mode_t

SAI mode of samplepacket sampling.

Enumerator
SAI_SAMPLEPACKET_MODE_EXCLUSIVE 

A profile defining sample packet attributes.

The profile can be configured on a port or as ACL entry action, in which case, an actual session is instantiated which is private for that port or ACL. In case multiple ports or ACL entries are configured with the same profile, sampling is independently done per port / ACL.

SAI_SAMPLEPACKET_MODE_SHARED 

An instance of sample packet session.

This session can be attached to multiple ports and ACL entries. Traffic going through these ports or matching these ACL entries is merged from a sampling point of view.

Definition at line 52 of file saisamplepacket.h.

◆ _sai_samplepacket_type_t

SAI type of samplepacket sampling.

Enumerator
SAI_SAMPLEPACKET_TYPE_SLOW_PATH 

Copy the sample packets to CPU

SAI_SAMPLEPACKET_TYPE_MIRROR_SESSION 

Copy the sample packets using mirror session

Definition at line 39 of file saisamplepacket.h.