DOKK / manpages / debian 10 / libcxl-dev / cxl_errinfo_read.3.en
CXL_ERRINFO_READ(3) CXL Programmer's Manual CXL_ERRINFO_READ(3)

cxl_errinfo_read - Read and copy the contents of afu_err_info buffer

#include<libcxl.h>

ssize_t cxl_errinfo_read(struct cxl_afu_h *afu, void *dst, off_t off, size_t len);

cxl_errinfo_read attempts to read upto len bytes located at offset off in AFU Error Buffer and copy it to user provided buffer located at dst.

AFU Error Buffer is used by the afu to report application specific errors. The contents of this buffer are afu specific and are intended to be interpreted by the application interacting with the afu.

On success, returns the number of bytes copied from the afu_err_buff to dst.

On error, -1 is returned, errno is set appropriately and the contents at dst are not touched.

The AFU does not export afu_err_buff region.
Permission to read the contents of AFU Error buffer is denied.
Insufficient memory.
No AFU context available.
Unsupported kernel CXL API version.

/dev/cxl/afu<i>.<j>d
AFU device in dedicated process mode.
/dev/cxl/afu<i>.<j>m
AFU device in AFU directed mode, master context.
/dev/cxl/afu<i>.<j>s
AFU device in AFU directed mode, slave context.
/dev/cxl/afu<i>.<j>/afu_err_buff
AFU Error Buffer contents. The contents of this file are application specific and depends on the AFU being used.

cxl(3), cxl_errinfo_size(3)

2017-05-24 LIBCXL 1.5