Mellanox SwitchX SDK API Guide  4.3.2104
Functions
sx_api_rm.h File Reference

Go to the source code of this file.

Functions

sx_status_t sx_api_rm_sdk_table_thresholds_set (const sx_api_handle_t handle, const sx_access_cmd_t access_cmd, const rm_sdk_table_type_e resource, const sx_notification_threshold_t threshold_full, const sx_notification_threshold_t threshold_empty)
 
sx_status_t sx_api_rm_sdk_table_thresholds_get (const sx_api_handle_t handle, const rm_sdk_table_type_e resource, sx_notification_threshold_t *threshold_full, sx_notification_threshold_t *threshold_empty)
 
sx_status_t sx_api_rm_hw_table_thresholds_set (const sx_api_handle_t handle, const sx_access_cmd_t access_cmd, const rm_hw_table_type_e resource, const sx_notification_threshold_t threshold_full, const sx_notification_threshold_t threshold_empty)
 
sx_status_t sx_api_rm_hw_table_thresholds_get (const sx_api_handle_t handle, const rm_hw_table_type_e resource, sx_notification_threshold_t *threshold_full, sx_notification_threshold_t *threshold_empty)
 
sx_status_t sx_api_rm_entries_duplication_set (const sx_api_handle_t handle, const sx_api_table_type_t resource, const sx_sdk_table_duplication_param_t *param_p)
 
sx_status_t sx_api_rm_entries_duplication_get (const sx_api_handle_t handle, const sx_api_table_type_t resource, sx_sdk_table_duplication_param_t *param_p)
 
sx_status_t sx_api_rm_sdk_table_utilization_get (const sx_api_handle_t handle, sx_api_table_type_t *resource_list_p, uint32_t *list_count_p, sx_api_rm_table_utilization_t *utilization_list_p)
 
sx_status_t sx_api_rm_hw_utilization_get (const sx_api_handle_t handle, sx_api_hw_table_type_t hw_type, uint32_t *utilization_p)
 
sx_status_t sx_api_rm_free_entries_by_type_get (const sx_api_handle_t handle, const sx_api_table_type_t resource, uint32_t *free_cnt_p)
 

Function Documentation

◆ sx_api_rm_sdk_table_thresholds_set()

sx_status_t sx_api_rm_sdk_table_thresholds_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  access_cmd,
const rm_sdk_table_type_e  resource,
const sx_notification_threshold_t  threshold_full,
const sx_notification_threshold_t  threshold_empty 
)

This API is not supported in the current release.

Supported devices: Spectrum, Spectrum2.

This function set the lower and upper thresholds of an sdk resource.

Parameters
[in]cmd-ADD/DELETE.
[in]resource- resource type.
[in]threshold_full- Upper threshold value given in percentage.
[in]threshold_empty- Lower threshold value given in percentage.
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if the command is not supported/ threshold are invalid

◆ sx_api_rm_sdk_table_thresholds_get()

sx_status_t sx_api_rm_sdk_table_thresholds_get ( const sx_api_handle_t  handle,
const rm_sdk_table_type_e  resource,
sx_notification_threshold_t *  threshold_full,
sx_notification_threshold_t *  threshold_empty 
)

This API is not supported in the current release.

Supported devices: Spectrum, Spectrum2.

This function get the lower and upper thresholds of an sdk resource.

Parameters
[in]resource- resource type.
[out]threshold_full- Upper threshold value given in percentage.
[out]threshold_empty- Lower threshold value given in percentage.
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if the command is not supported/ threshold are invalid

◆ sx_api_rm_hw_table_thresholds_set()

sx_status_t sx_api_rm_hw_table_thresholds_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  access_cmd,
const rm_hw_table_type_e  resource,
const sx_notification_threshold_t  threshold_full,
const sx_notification_threshold_t  threshold_empty 
)

This API is not supported in the current release.

Supported devices: Spectrum, Spectrum2.

This function set the lower and upper thresholds of an hw resource.

Parameters
[in]cmd-ADD/DELETE.
[in]resource- resource type.
[in]threshold_full- Upper threshold value given in percentage.
[in]threshold_empty- Lower threshold value given in percentage.
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if the command is not supported/ threshold are invalid

◆ sx_api_rm_hw_table_thresholds_get()

sx_status_t sx_api_rm_hw_table_thresholds_get ( const sx_api_handle_t  handle,
const rm_hw_table_type_e  resource,
sx_notification_threshold_t *  threshold_full,
sx_notification_threshold_t *  threshold_empty 
)

This API is not supported in the current release.

Supported devices: Spectrum, Spectrum2.

This function get the lower and upper thresholds of an hw resource.

Parameters
[in]resource- resource type.
[out]threshold_full- Upper threshold value given in percentage.
[out]threshold_empty- Lower threshold value given in percentage.
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if the command is not supported/ threshold are invalid

◆ sx_api_rm_entries_duplication_set()

sx_status_t sx_api_rm_entries_duplication_set ( const sx_api_handle_t  handle,
const sx_api_table_type_t  resource,
const sx_sdk_table_duplication_param_t *  param_p 
)

This API gives ability to configure how many the same data instances should be stored in the central database, by configuring the number of entry duplication. Such configuration allows to increase the data access bandwidth and general performance of the database, for case when multiple requests want to get access to the same data entry. Please note the following:

  • configuration is allowed only prior any device was added to the system.

Supported devices: Spectrum2.

Parameters
[in]handle- SX-API handle
[in]resource- resource type
[in]param_p- parameters to set the number of data entry duplication per resource type
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if any input parameters are invalid
SX_STATUS_PARAM_EXCEEDS_RANGE if any input parameters exceed valid range
SX_STATUS_UNSUPPORTED if API is not supported for this device
SX_STATUS_ERROR general error

◆ sx_api_rm_entries_duplication_get()

sx_status_t sx_api_rm_entries_duplication_get ( const sx_api_handle_t  handle,
const sx_api_table_type_t  resource,
sx_sdk_table_duplication_param_t *  param_p 
)

This API gets the number of entry duplication per specified table type.

Supported devices: Spectrum2.

Parameters
[in]handle- SX-API handle
[in]resource- resource type
[in/out]param_p - parameter to retrieve number of data entries duplication for resource type
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if any input parameters are invalid
SX_STATUS_PARAM_EXCEEDS_RANGE if any input parameters exceed valid range
SX_STATUS_UNSUPPORTED if API is not supported for this device
SX_STATUS_ERROR general error

◆ sx_api_rm_sdk_table_utilization_get()

sx_status_t sx_api_rm_sdk_table_utilization_get ( const sx_api_handle_t  handle,
sx_api_table_type_t *  resource_list_p,
uint32_t *  list_count_p,
sx_api_rm_table_utilization_t *  utilization_list_p 
)

This API gets the utilization of a logical resource in the SDK.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]resource_list- List of resources
[in/out]list_count - Size of resource list & size of returned list
[out]Utilizationlist
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if any input parameters are invalid
SX_STATUS_PARAM_EXCEEDS_RANGE if any input parameters exceed valid range
SX_STATUS_UNSUPPORTED if API is not supported for this device
SX_STATUS_ERROR general error

◆ sx_api_rm_hw_utilization_get()

sx_status_t sx_api_rm_hw_utilization_get ( const sx_api_handle_t  handle,
sx_api_hw_table_type_t  hw_type,
uint32_t *  utilization_p 
)

This API gets the utilization of a HW Table in the SDK.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]hw_type- HW Table type
[out]utilization- Utilization in 10th of percentage
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if any input parameters are invalid
SX_STATUS_PARAM_EXCEEDS_RANGE if any input parameters exceed valid range
SX_STATUS_UNSUPPORTED if API is not supported for this device
SX_STATUS_ERROR general error

◆ sx_api_rm_free_entries_by_type_get()

sx_status_t sx_api_rm_free_entries_by_type_get ( const sx_api_handle_t  handle,
const sx_api_table_type_t  resource,
uint32_t *  free_cnt_p 
)

This API retrieves the predicted number of resources that can be added assuming that no other objects are added which may compete for the same Hardware resource. Note that this number provides the maximum possible and there is no guarantee that this number will be achievable in practice.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]resource- Logical resource
[out]free_count_p- Number of free entries of resource provided
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if any input parameters are invalid
SX_STATUS_PARAM_EXCEEDS_RANGE if any input parameters exceed valid range
SX_STATUS_UNSUPPORTED if API is not supported for this device
SX_STATUS_ERROR general error