int dcmi_get_hccsping_mesh_state (int card_id, int device_id, int port_id, unsigned int task_id, unsigned int *state)
Description
Queries the status of a resident pingmesh task.
Parameter Description
Parameter
Input/Output
Type
Description
card_id
Input
int
Device ID. The supported IDs can be obtained by calling dcmi_get_card_list.
device_id
Input
int
Chip ID, which can be obtained by calling dcmi_get_device_id_in_card. Value range:
NPU: [0, device_id_max – 1]
NOTE:
The value of device_id_max is 2. A device_id of 0 or 1 indicates an NPU. A device_id of 2 indicates an MCU.
port_id
Input
int
(Reserved) Network port number of the NPU device. Currently, the value can only be set to 0.
task_id
Input
unsigned int
task_id: task ID. The value range is [0, 1], which is specified by dcmi_start_hccsping_mesh.
state
Output
unsigned int*
Status of a resident pingmesh task.
0: The resident task is stopped.
1: The resident task is running.
Return Value
Type
Description
int
Results:
Success: The value 0 is returned.
Failure: For details about the return codes, see Return Codes.
Exception Handling
None
Restrictions
The specified device and the destination device must use the same NPU driver version.
This API can be used in the PM + privileged container scenario.
Table 1 Support in different deployment scenarios
Product Model
PM (Bare Metal)
PM + Unprivileged Container
Root User
Running User Group (Non-root User)
Root User
Atlas 900 A3 SuperPoD
Y
N
N
Atlas 9000 A3 SuperPoD Cluster Computing System
Y
N
N
Atlas 800T A3 SuperPoD
Y
N
N
Atlas 800I A3 SuperPoD
Y
N
N
A200T A3 Box8 SuperPoD server
Y
N
N
Note: Y indicates that the function is supported, N indicates that the function is not supported, and NA indicates that the function is not involved and planned currently.
Example
...
int ret = 0;
int card_id = 0;
int device_id = 0;
int port_id = 0;
unsigned int task_id = 0;
unsigned int state;
ret = dcmi_get_hccsping_mesh_state (card_id, device_id, port_id, task_id, &state);
if (ret != 0){
// todo: Record logs.
return ret;
}
...