CXL_ERRINFO_READ(3)

NAME
cxl_errinfo_read - Read and copy the contents of afu_err_info buffer

SYNOPSIS
#include<libcxl.h>

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

DESCRIPTION

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.

RETURN VALUE
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.

ERRORS

ENOENT
    The AFU does not export afu_err_buff region.

EACCES
    Permission to read the contents of AFU Error buffer is denied.

ENOMEM
    Insufficient memory.

ENOSPC
    No AFU context available.

EPROTO
    Unsupported kernel CXL API version.

FILES

/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.

SEE ALSO
cxl(3), cxl_errinfo_size(3)