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

Classes

struct  _sai_counter_api_t
 Counter methods table retrieved with sai_api_query() More...
 

Typedefs

typedef enum _sai_counter_type_t sai_counter_type_t
 Counter type.
 
typedef enum _sai_counter_attr_t sai_counter_attr_t
 Attribute Id in sai_set_counter_attribute() and sai_get_counter_attribute() calls.
 
typedef sai_status_t(* sai_create_counter_fn) (_Out_ sai_object_id_t *counter_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
 Create counter.
 
typedef sai_status_t(* sai_remove_counter_fn) (_In_ sai_object_id_t counter_id)
 Remove counter.
 
typedef sai_status_t(* sai_set_counter_attribute_fn) (_In_ sai_object_id_t counter_id, _In_ const sai_attribute_t *attr)
 Set counter attribute Value.
 
typedef sai_status_t(* sai_get_counter_attribute_fn) (_In_ sai_object_id_t counter_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
 Get counter attribute Value.
 
typedef enum _sai_counter_stat_t sai_counter_stat_t
 Enum defining statistics for Counter.
 
typedef sai_status_t(* sai_get_counter_stats_fn) (_In_ sai_object_id_t counter_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids, _Out_ uint64_t *counters)
 Get counter statistics counters. Deprecated for backward compatibility.
 
typedef sai_status_t(* sai_get_counter_stats_ext_fn) (_In_ sai_object_id_t counter_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids, _In_ sai_stats_mode_t mode, _Out_ uint64_t *counters)
 Get counter statistics counters extended.
 
typedef sai_status_t(* sai_clear_counter_stats_fn) (_In_ sai_object_id_t counter_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids)
 Clear counter statistics counters.
 
typedef struct _sai_counter_api_t sai_counter_api_t
 Counter methods table retrieved with sai_api_query()
 

Enumerations

enum  _sai_counter_type_t { SAI_COUNTER_TYPE_REGULAR }
 Counter type. More...
 
enum  _sai_counter_attr_t {
  SAI_COUNTER_ATTR_START , SAI_COUNTER_ATTR_TYPE = SAI_COUNTER_ATTR_START , SAI_COUNTER_ATTR_LABEL , SAI_COUNTER_ATTR_END ,
  SAI_COUNTER_ATTR_CUSTOM_RANGE_START = 0x10000000 , SAI_COUNTER_ATTR_CUSTOM_RANGE_END
}
 Attribute Id in sai_set_counter_attribute() and sai_get_counter_attribute() calls. More...
 
enum  _sai_counter_stat_t { SAI_COUNTER_STAT_PACKETS = 0x00000000 , SAI_COUNTER_STAT_BYTES = 0x00000001 , SAI_COUNTER_STAT_CUSTOM_RANGE_BASE = 0x10000000 }
 Enum defining statistics for Counter. More...
 

Detailed Description

Typedef Documentation

◆ sai_clear_counter_stats_fn

typedef sai_status_t(* sai_clear_counter_stats_fn) (_In_ sai_object_id_t counter_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids)

Clear counter statistics counters.

Parameters
[in]counter_idCounter id
[in]number_of_countersNumber of counters in the array
[in]counter_idsSpecifies the array of counter ids
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 205 of file saicounter.h.

◆ sai_create_counter_fn

typedef sai_status_t(* sai_create_counter_fn) (_Out_ sai_object_id_t *counter_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)

Create counter.

Parameters
[out]counter_idCounter id
[in]switch_idSwitch id
[in]attr_countNumber of attributes
[in]attr_listArray of attributes
Returns
SAI_STATUS_SUCCESS on success

Definition at line 104 of file saicounter.h.

◆ sai_get_counter_attribute_fn

typedef sai_status_t(* sai_get_counter_attribute_fn) (_In_ sai_object_id_t counter_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)

Get counter attribute Value.

Parameters
[in]counter_idCounter 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 141 of file saicounter.h.

◆ sai_get_counter_stats_ext_fn

typedef sai_status_t(* sai_get_counter_stats_ext_fn) (_In_ sai_object_id_t counter_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids, _In_ sai_stats_mode_t mode, _Out_ uint64_t *counters)

Get counter statistics counters extended.

Parameters
[in]counter_idCounter id
[in]number_of_countersNumber of counters in the array
[in]counter_idsSpecifies the array of counter ids
[in]modeStatistics mode
[out]countersArray of resulting counter values.
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 189 of file saicounter.h.

◆ sai_get_counter_stats_fn

typedef sai_status_t(* sai_get_counter_stats_fn) (_In_ sai_object_id_t counter_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids, _Out_ uint64_t *counters)

Get counter statistics counters. Deprecated for backward compatibility.

Parameters
[in]counter_idCounter id
[in]number_of_countersNumber of counters in the array
[in]counter_idsSpecifies the array of counter ids
[out]countersArray of resulting counter values.
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 172 of file saicounter.h.

◆ sai_remove_counter_fn

typedef sai_status_t(* sai_remove_counter_fn) (_In_ sai_object_id_t counter_id)

Remove counter.

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

Definition at line 117 of file saicounter.h.

◆ sai_set_counter_attribute_fn

typedef sai_status_t(* sai_set_counter_attribute_fn) (_In_ sai_object_id_t counter_id, _In_ const sai_attribute_t *attr)

Set counter attribute Value.

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

Definition at line 128 of file saicounter.h.

Enumeration Type Documentation

◆ _sai_counter_attr_t

Attribute Id in sai_set_counter_attribute() and sai_get_counter_attribute() calls.

Enumerator
SAI_COUNTER_ATTR_START 

Start of attributes.

SAI_COUNTER_ATTR_TYPE 

Counter.

Value Type:
sai_counter_type_t
Flags:
CREATE_ONLY
Default value:
SAI_COUNTER_TYPE_REGULAR
SAI_COUNTER_ATTR_LABEL 

Label attribute used to unique identify counter.

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

End of attributes.

SAI_COUNTER_ATTR_CUSTOM_RANGE_START 

Custom range base value

SAI_COUNTER_ATTR_CUSTOM_RANGE_END 

End of custom range base

Definition at line 54 of file saicounter.h.

◆ _sai_counter_stat_t

Enum defining statistics for Counter.

Enumerator
SAI_COUNTER_STAT_PACKETS 

Get/set hit packets count [uint64_t]

SAI_COUNTER_STAT_BYTES 

Get/set hit bytes count [uint64_t]

SAI_COUNTER_STAT_CUSTOM_RANGE_BASE 

Custom range base value

Definition at line 149 of file saicounter.h.

◆ _sai_counter_type_t

Counter type.

Enumerator
SAI_COUNTER_TYPE_REGULAR 

Regular

Definition at line 43 of file saicounter.h.