SAI Metadata
|
Classes | |
struct | _sai_service_method_table_t |
Method table that contains function pointers for services exposed by adapter host for adapter. More... | |
Typedefs | |
typedef enum _sai_api_t | sai_api_t |
Defined API sets have assigned IDs. | |
typedef enum _sai_log_level_t | sai_log_level_t |
Defines log level. | |
typedef const char *(* | sai_profile_get_value_fn) (_In_ sai_switch_profile_id_t profile_id, _In_ const char *variable) |
typedef int(* | sai_profile_get_next_value_fn) (_In_ sai_switch_profile_id_t profile_id, _Out_ const char **variable, _Out_ const char **value) |
typedef struct _sai_service_method_table_t | sai_service_method_table_t |
Method table that contains function pointers for services exposed by adapter host for adapter. | |
Functions | |
sai_status_t | sai_api_initialize (_In_ uint64_t flags, _In_ const sai_service_method_table_t *services) |
Adapter module initialization call. | |
sai_status_t | sai_api_query (_In_ sai_api_t api, _Out_ void **api_method_table) |
Retrieve a pointer to the C-style method table for desired SAI functionality as specified by the given sai_api_id. | |
sai_status_t | sai_api_uninitialize (void) |
Uninitialize adapter module. SAI functionalities, retrieved via sai_api_query() cannot be used after this call. | |
sai_status_t | sai_log_set (_In_ sai_api_t api, _In_ sai_log_level_t log_level) |
Set log level for SAI API module. | |
sai_object_type_t | sai_object_type_query (_In_ sai_object_id_t object_id) |
Query SAI object type. | |
sai_object_id_t | sai_switch_id_query (_In_ sai_object_id_t object_id) |
Query SAI switch id. | |
sai_status_t | sai_dbg_generate_dump (_In_ const char *dump_file_name) |
Generate dump file. The dump file may include SAI state information and vendor SDK information. | |
sai_status_t | sai_object_type_get_availability (_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_ uint64_t *count) |
Get SAI object type resource availability. | |
typedef enum _sai_api_t sai_api_t |
Defined API sets have assigned IDs.
If specific API method table changes in any way (method signature, number of methods), a new ID needs to be created (e.g. VLAN2) and old API still may need to be supported for compatibility with older adapter hosts.
typedef int(* sai_profile_get_next_value_fn) (_In_ sai_switch_profile_id_t profile_id, _Out_ const char **variable, _Out_ const char **value) |
typedef const char *(* sai_profile_get_value_fn) (_In_ sai_switch_profile_id_t profile_id, _In_ const char *variable) |
enum _sai_api_t |
Defined API sets have assigned IDs.
If specific API method table changes in any way (method signature, number of methods), a new ID needs to be created (e.g. VLAN2) and old API still may need to be supported for compatibility with older adapter hosts.
enum _sai_log_level_t |
sai_status_t sai_api_initialize | ( | _In_ uint64_t | flags, |
_In_ const sai_service_method_table_t * | services | ||
) |
Adapter module initialization call.
This is NOT for SDK initialization.
[in] | flags | Reserved for future use, must be zero |
[in] | services | Methods table with services provided by adapter host |
sai_status_t sai_api_query | ( | _In_ sai_api_t | api, |
_Out_ void ** | api_method_table | ||
) |
Retrieve a pointer to the C-style method table for desired SAI functionality as specified by the given sai_api_id.
[in] | api | SAI API ID |
[out] | api_method_table | Caller allocated method table. The table must remain valid until the sai_api_uninitialize() is called. |
sai_status_t sai_api_uninitialize | ( | void | ) |
Uninitialize adapter module. SAI functionalities, retrieved via sai_api_query() cannot be used after this call.
sai_status_t sai_dbg_generate_dump | ( | _In_ const char * | dump_file_name | ) |
Generate dump file. The dump file may include SAI state information and vendor SDK information.
[in] | dump_file_name | Full path for dump file |
sai_status_t sai_log_set | ( | _In_ sai_api_t | api, |
_In_ sai_log_level_t | log_level | ||
) |
Set log level for SAI API module.
The default log level is SAI_LOG_LEVEL_WARN.
[in] | api | SAI API ID |
[in] | log_level | Log level |
sai_status_t sai_object_type_get_availability | ( | _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_ uint64_t * | count | ||
) |
Get SAI object type resource availability.
[in] | switch_id | SAI Switch object id |
[in] | object_type | SAI object type |
[in] | attr_count | Number of attributes |
[in] | attr_list | List of attributes that to distinguish resource |
[out] | count | Available objects left |
sai_object_type_t sai_object_type_query | ( | _In_ sai_object_id_t | object_id | ) |
Query SAI object type.
[in] | object_id | Object id |
sai_object_id_t sai_switch_id_query | ( | _In_ sai_object_id_t | object_id | ) |
Query SAI switch id.
[in] | object_id | Object id |