.TH "ocxl_afu_getters" 3 "Tue Sep 11 2018" "libocxl" \" -*- nroff -*- .ad l .nh .SH NAME ocxl_afu_getters \- The AFU getter functions provide access to AFU metadata, such as the identifier, paths, and PASID\&. .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "uint32_t \fBocxl_afu_get_pasid\fP (\fBocxl_afu_h\fP afu)" .br .RI "Get the PASID for the currently open context\&. " .ti -1c .RI "const \fBocxl_identifier\fP * \fBocxl_afu_get_identifier\fP (\fBocxl_afu_h\fP afu)" .br .RI "Get the identifier of the AFU\&. " .ti -1c .RI "const char * \fBocxl_afu_get_device_path\fP (\fBocxl_afu_h\fP afu)" .br .RI "Get the canonical device path of the AFU\&. " .ti -1c .RI "const char * \fBocxl_afu_get_sysfs_path\fP (\fBocxl_afu_h\fP afu)" .br .RI "Get the canonical sysfs path of the AFU\&. " .ti -1c .RI "void \fBocxl_afu_get_version\fP (\fBocxl_afu_h\fP afu, uint8_t *major, uint8_t *minor)" .br .RI "Get the version of the AFU\&. " .in -1c .SH "Detailed Description" .PP 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\&. .SH "Function Documentation" .PP .SS "const char* ocxl_afu_get_device_path (\fBocxl_afu_h\fP afu)" .PP 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\&. .PP \fBParameters:\fP .RS 4 \fIafu\fP The AFU to get the device path of .RE .PP \fBReturns:\fP .RS 4 the device path, or NULL if the device is invalid .RE .PP .SS "const \fBocxl_identifier\fP* ocxl_afu_get_identifier (\fBocxl_afu_h\fP afu)" .PP Get the identifier of the AFU\&. The identifier contains the AFU name & index\&. .PP \fBParameters:\fP .RS 4 \fIafu\fP The AFU to find the identifier of .RE .PP \fBReturns:\fP .RS 4 the identifier of the AFU .RE .PP .SS "uint32_t ocxl_afu_get_pasid (\fBocxl_afu_h\fP afu)" .PP 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\&. .PP \fBPrecondition:\fP .RS 4 \fBocxl_afu_open()\fP has been successfully called .RE .PP \fBParameters:\fP .RS 4 \fIafu\fP the AFU instance to get the PASID of .RE .PP \fBReturns:\fP .RS 4 the PASID .RE .PP \fBReturn values:\fP .RS 4 \fIUINT32_MAX\fP if the context has not been attached .RE .PP .SS "const char* ocxl_afu_get_sysfs_path (\fBocxl_afu_h\fP afu)" .PP Get the canonical sysfs path of the AFU\&. Returns the 'true' sysfs path of the AFU (within /sys/class/ocxl)\&. .PP \fBParameters:\fP .RS 4 \fIafu\fP The AFU to get the sysfs path of .RE .PP \fBReturns:\fP .RS 4 the sysfs path, or NULL if the device is invalid .RE .PP .SS "void ocxl_afu_get_version (\fBocxl_afu_h\fP afu, uint8_t * major, uint8_t * minor)" .PP 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\&. .PP \fBParameters:\fP .RS 4 \fIafu\fP The AFU to get the sysfs path of .br \fImajor\fP the major version number .br \fIminor\fP the minor version number .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libocxl from the source code\&.