DOKK / manpages / debian 10 / libocxl-dev / ocxl_afu_get_identifier.3.en
ocxl_afu_getters(3) Library Functions Manual ocxl_afu_getters(3)

ocxl_afu_getters - The AFU getter functions provide access to AFU metadata, such as the identifier, paths, and PASID.


uint32_t ocxl_afu_get_pasid (ocxl_afu_h afu)
Get the PASID for the currently open context. const ocxl_identifier * ocxl_afu_get_identifier (ocxl_afu_h afu)
Get the identifier of the AFU. const char * ocxl_afu_get_device_path (ocxl_afu_h afu)
Get the canonical device path of the AFU. const char * ocxl_afu_get_sysfs_path (ocxl_afu_h afu)
Get the canonical sysfs path of the AFU. void ocxl_afu_get_version (ocxl_afu_h afu, uint8_t *major, uint8_t *minor)
Get the version of the AFU.

The AFU getter functions provide access to AFU metadata, such as the identifier, paths, and PASID.

These operate on any valid AFU handle, even if it has not been opened.

Get the canonical device path of the AFU. Returns the 'true' device path of the AFU from (within /dev), which may or may not be the same as the path passed to the library. It will differ when the specified path is a symlink or duplicate device.

Parameters:

afu The AFU to get the device path of

Returns:

the device path, or NULL if the device is invalid

Get the identifier of the AFU. The identifier contains the AFU name & index.

Parameters:

afu The AFU to find the identifier of

Returns:

the identifier of the AFU

Get the PASID for the currently open context. While not commonly used, some AFU implementations may need their PASID written back to MMIO registers, or shared with other AFUs.

Precondition:

ocxl_afu_open() has been successfully called

Parameters:

afu the AFU instance to get the PASID of

Returns:

the PASID

Return values:

UINT32_MAX if the context has not been attached

Get the canonical sysfs path of the AFU. Returns the 'true' sysfs path of the AFU (within /sys/class/ocxl).

Parameters:

afu The AFU to get the sysfs path of

Returns:

the sysfs path, or NULL if the device is invalid

Get the version of the AFU. Returns the version of the AFU, as specified by the AFU implementation. See Section 4.3.3.1 AFU Descriptor Template 0 of the OpenCAPI Data Link Specification Offset 0x1C, AFU Version Major/Minor.

Parameters:

afu The AFU to get the sysfs path of
major the major version number
minor the minor version number

Generated automatically by Doxygen for libocxl from the source code.

Tue Sep 11 2018 libocxl