HccnRpingInit

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

Initializes RPing devices and starts network status monitoring.

Prototype

1
HccnResult HccnRpingInit(uint32_t devLogicId, HccnRpingInitAttr *initAttr, HccnRpingCtx *rpingCtx)

Parameters

Parameter

Input/Output

Description

devLogicId

Input

Logical ID of the device that participates in the RPing function and initializes resources.

initAttr

Input

Initial configuration of the RPing function.

For details about the definition of the HccnRpingInitAttr type, see HccnRpingInitAttr.

rpingCtx

Output

Pointer to the constructed RPing object.

For the definition of the HccnRpingCtx type, see HccnRpingCtx.

Returns

Parsing result of the error code of the HccnResult type.

Constraints

  • Before calling this API, call aclrtSetDevice to specify RPing devices.
  • This API allocates stack memory to store related resources. After the RPing function is disabled, you need to call the HccnRpingDeinit API to deinitialize resources.
  • Each device in a single process can be initialized only once for Atlas A2 training product/Atlas A2 inference product and Atlas A3 training product/Atlas A3 inference product.
  • Multiple threads cannot initialize a device at the same time.
  • Each port in a single process can be initialized only once for Atlas 350 Accelerator Card.