SAI Metadata
|
Classes | |
union | _sai_object_key_entry_t |
struct | _sai_object_key_t |
Structure for bulk retrieval of object ids, attribute and values for each object-type. Key will be used in case of object-types not having object-ids. More... | |
struct | _sai_attr_capability_t |
Structure for attribute capabilities per operation. More... | |
Typedefs | |
typedef union _sai_object_key_entry_t | sai_object_key_entry_t |
typedef struct _sai_object_key_t | sai_object_key_t |
Structure for bulk retrieval of object ids, attribute and values for each object-type. Key will be used in case of object-types not having object-ids. | |
typedef struct _sai_attr_capability_t | sai_attr_capability_t |
Structure for attribute capabilities per operation. | |
Functions | |
sai_status_t | sai_get_maximum_attribute_count (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _Out_ uint32_t *count) |
Get maximum number of attributes for an object type. | |
sai_status_t | sai_get_object_count (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _Out_ uint32_t *count) |
Get the number of objects present in SAI. Deprecated for backward compatibility. | |
sai_status_t | sai_get_object_key (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _Inout_ uint32_t *object_count, _Inout_ sai_object_key_t *object_list) |
Get the number of and list of object keys present in SAI if enough large list provided, otherwise get the number of object keys only. | |
sai_status_t | sai_bulk_get_attribute (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _In_ uint32_t object_count, _In_ const sai_object_key_t *object_key, _Inout_ uint32_t *attr_count, _Inout_ sai_attribute_t **attr_list, _Inout_ sai_status_t *object_statuses) |
Get the bulk list of valid attributes for a given list of object keys. | |
sai_status_t | sai_query_attribute_capability (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _In_ sai_attr_id_t attr_id, _Out_ sai_attr_capability_t *attr_capability) |
Query attribute capability. | |
sai_status_t | sai_query_attribute_enum_values_capability (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _In_ sai_attr_id_t attr_id, _Inout_ sai_s32_list_t *enum_values_capability) |
Query an enum attribute (enum or enum list) list of implemented enum values. | |
sai_status_t | sai_query_stats_capability (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _Inout_ sai_stat_capability_list_t *stats_capability) |
Query statistics capability for statistics bound at object level. | |
sai_status_t | sai_bulk_object_get_stats (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _In_ uint32_t object_count, _In_ const sai_object_key_t *object_key, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids, _In_ sai_stats_mode_t mode, _Inout_ sai_status_t *object_statuses, _Out_ uint64_t *counters) |
Bulk objects get statistics. | |
sai_status_t | sai_bulk_object_clear_stats (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _In_ uint32_t object_count, _In_ const sai_object_key_t *object_key, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids, _In_ sai_stats_mode_t mode, _Inout_ sai_status_t *object_statuses) |
Bulk objects clear statistics. | |
sai_status_t | sai_query_object_stage (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list, _Out_ sai_object_stage_t *stage) |
Query the HW stage of an attribute for the specified object type. | |
typedef union _sai_object_key_entry_t sai_object_key_entry_t |
typedef struct _sai_object_key_t sai_object_key_t |
Structure for bulk retrieval of object ids, attribute and values for each object-type. Key will be used in case of object-types not having object-ids.
sai_status_t sai_bulk_get_attribute | ( | _In_ sai_object_id_t | switch_id, |
_In_ sai_object_type_t | object_type, | ||
_In_ uint32_t | object_count, | ||
_In_ const sai_object_key_t * | object_key, | ||
_Inout_ uint32_t * | attr_count, | ||
_Inout_ sai_attribute_t ** | attr_list, | ||
_Inout_ sai_status_t * | object_statuses | ||
) |
Get the bulk list of valid attributes for a given list of object keys.
Only valid attributes for an object are returned.
[in] | switch_id | SAI Switch object id |
[in] | object_type | SAI object type |
[in] | object_count | Number of objects |
[in] | object_key | List of object keys |
[in,out] | attr_count | List of attr_count. Caller passes the number of attribute allocated in. Callee returns with the actual number of attributes filled in. If the count is less than needed, callee fills with the needed count and do not fill the attributes. Callee also set the corresponding status to SAI_STATUS_BUFFER_OVERFLOW. |
[in,out] | attr_list | List of attributes for every object. Caller is responsible for allocating and freeing buffer for the attributes. For list based attribute, e.g., s32list, objlist, callee should assume the caller has not allocated the memory for the list and should only to fill the count but not list. Then, caller can use corresponding get_attribute to get the list. |
[in,out] | object_statuses | Status for each object. If the object does not exist, callee sets the corresponding status to SAI_STATUS_INVALID_OBJECT_ID. If the allocated attribute count is not large enough, set the status to SAI_STATUS_BUFFER_OVERFLOW. |
sai_status_t sai_bulk_object_clear_stats | ( | _In_ sai_object_id_t | switch_id, |
_In_ sai_object_type_t | object_type, | ||
_In_ uint32_t | object_count, | ||
_In_ const sai_object_key_t * | object_key, | ||
_In_ uint32_t | number_of_counters, | ||
_In_ const sai_stat_id_t * | counter_ids, | ||
_In_ sai_stats_mode_t | mode, | ||
_Inout_ sai_status_t * | object_statuses | ||
) |
Bulk objects clear statistics.
[in] | switch_id | SAI Switch object id |
[in] | object_type | Object type |
[in] | object_count | Number of objects to get the stats |
[in] | object_key | List of object keys |
[in] | number_of_counters | Number of counters in the array |
[in] | counter_ids | Specifies the array of counter ids |
[in] | mode | Statistics mode |
[in,out] | object_statuses | Array of status for each object. Length of the array should be object_count. Should be looked only if API return is not SAI_STATUS_SUCCESS. |
sai_status_t sai_bulk_object_get_stats | ( | _In_ sai_object_id_t | switch_id, |
_In_ sai_object_type_t | object_type, | ||
_In_ uint32_t | object_count, | ||
_In_ const sai_object_key_t * | object_key, | ||
_In_ uint32_t | number_of_counters, | ||
_In_ const sai_stat_id_t * | counter_ids, | ||
_In_ sai_stats_mode_t | mode, | ||
_Inout_ sai_status_t * | object_statuses, | ||
_Out_ uint64_t * | counters | ||
) |
Bulk objects get statistics.
[in] | switch_id | SAI Switch object id |
[in] | object_type | Object type |
[in] | object_count | Number of objects to get the stats |
[in] | object_key | List of object keys |
[in] | number_of_counters | Number of counters in the array |
[in] | counter_ids | Specifies the array of counter ids |
[in] | mode | Statistics mode |
[in,out] | object_statuses | Array of status for each object. Length of the array should be object_count. Should be looked only if API return is not SAI_STATUS_SUCCESS. |
[out] | counters | Array of resulting counter values. Length of counters array should be object_count*number_of_counters. Counter value of I object and J counter_id = counter[I*number_of_counters + J] |
sai_status_t sai_get_maximum_attribute_count | ( | _In_ sai_object_id_t | switch_id, |
_In_ sai_object_type_t | object_type, | ||
_Out_ uint32_t * | count | ||
) |
Get maximum number of attributes for an object type.
[in] | switch_id | SAI Switch object id |
[in] | object_type | SAI object type |
[out] | count | Maximum number of attribute for an object type |
sai_status_t sai_get_object_count | ( | _In_ sai_object_id_t | switch_id, |
_In_ sai_object_type_t | object_type, | ||
_Out_ uint32_t * | count | ||
) |
Get the number of objects present in SAI. Deprecated for backward compatibility.
[in] | switch_id | SAI Switch object id |
[in] | object_type | SAI object type |
[out] | count | Number of objects in SAI |
sai_status_t sai_get_object_key | ( | _In_ sai_object_id_t | switch_id, |
_In_ sai_object_type_t | object_type, | ||
_Inout_ uint32_t * | object_count, | ||
_Inout_ sai_object_key_t * | object_list | ||
) |
Get the number of and list of object keys present in SAI if enough large list provided, otherwise get the number of object keys only.
[in] | switch_id | SAI Switch object id |
[in] | object_type | SAI object type |
[in,out] | object_count | Number of objects in SAI |
[in,out] | object_list | List of SAI objects or keys |
sai_status_t sai_query_attribute_capability | ( | _In_ sai_object_id_t | switch_id, |
_In_ sai_object_type_t | object_type, | ||
_In_ sai_attr_id_t | attr_id, | ||
_Out_ sai_attr_capability_t * | attr_capability | ||
) |
Query attribute capability.
[in] | switch_id | SAI Switch object id |
[in] | object_type | SAI object type |
[in] | attr_id | SAI attribute ID |
[out] | attr_capability | Capability per operation |
sai_status_t sai_query_attribute_enum_values_capability | ( | _In_ sai_object_id_t | switch_id, |
_In_ sai_object_type_t | object_type, | ||
_In_ sai_attr_id_t | attr_id, | ||
_Inout_ sai_s32_list_t * | enum_values_capability | ||
) |
Query an enum attribute (enum or enum list) list of implemented enum values.
[in] | switch_id | SAI Switch object id |
[in] | object_type | SAI object type |
[in] | attr_id | SAI attribute ID |
[in,out] | enum_values_capability | List of implemented enum values |
sai_status_t sai_query_object_stage | ( | _In_ sai_object_id_t | switch_id, |
_In_ sai_object_type_t | object_type, | ||
_In_ uint32_t | attr_count, | ||
_In_ const sai_attribute_t * | attr_list, | ||
_Out_ sai_object_stage_t * | stage | ||
) |
Query the HW stage of an attribute for the specified object type.
[in] | switch_id | SAI Switch object id |
[in] | object_type | SAI object type |
[in] | attr_count | Count of attributes |
[in] | attr_list | List of attributes |
[out] | stage | HW stage of the attributes. Length of the array should be attr_count. Caller must allocate the buffer. |
sai_status_t sai_query_stats_capability | ( | _In_ sai_object_id_t | switch_id, |
_In_ sai_object_type_t | object_type, | ||
_Inout_ sai_stat_capability_list_t * | stats_capability | ||
) |
Query statistics capability for statistics bound at object level.
[in] | switch_id | SAI Switch object id |
[in] | object_type | SAI object type |
[in,out] | stats_capability | List of implemented enum values, and the statistics modes (bit mask) supported per value |