APIs

RPing is a RDMA/UB-based network ping technology. You can call RPing APIs in the Ascend AI software stack to send ping packets, record Round-Trip Time (RTT), and collect the packet RX and TX status, thus monitoring user's network link status.

This section provides RPing APIs for you to implement this function.

You can view the API definition in the /include/hccl/hccn_rping.h file in the CANN software installation directory. The corresponding library file is libhccl_plf.so.

Table 1 RPing APIs

API

Description

HccnRpingInit

Initializes RPing devices and starts network status monitoring.

HccnRpingDeinit

Deinitializes memory resources.

HccnRpingAddTarget

Adds a ping target and establishes RPing communication between the client and target.

HccnRpingAddTargetWithCfg

Adds a ping target and establishes an RPing communication link between the client and target. The RPing timeout interval is configurable.

HccnRpingRemoveTarget

Removes the ping target and disables the RPing communication.

HccnRpingGetTarget

Obtains the link status.

HccnRpingBatchPingStart

Starts a ping request.

HccnRpingBatchPingStop

Stops a ping request.

HccnRpingGetResult

Obtains the target ping result.

HccnRpingGetPayload

Obtains the custom payload of the target ping packet.