dsmi_clear_user_config
Prototype
int dsmi_clear_user_config(int device_id, const char *config_name)
Description
Clears user configuration.
For the Ascend 310 AI Processor, this API supports mini modules (EP) and standard PCIe cards.
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
device_id |
Input |
Device ID For the Ascend 310 AI Processor, the value range is 0–63. Obtain the actual device ID by calling dsmi_list_device. |
config_name |
Input |
Configuration name
|
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
- Run the caller application as the root user on a physical machine. Otherwise, a permission error is returned.
- Since the flash memory has a limited number of program/erase cycles, avoid unnecessary calls to this API.
Example
Setting config_name as ddr_mac_enable is used as an example as follows.
int ret = 0; int device_id = 0; char *config_name = "ddr_mac_enable"; ret=dsmi_clear_user_config(device_id, config_name); if(ret != 0){ //To-do: records logs. return ret; } ...