CXL_ERRINFO_SIZE(3)

NAME
cxl_errinfo_size - returns the size of afu_err_buff in bytes

SYNOPSIS
#include<libcxl.h>

int cxl_errinfo_size(struct cxl_afu_h *afu, size_t *valp);

DESCRIPTION

cxl_errinfo_size stores the size (in bytes) of the AFU Error Buffer associated with the provided afu context handle at valp.

Applications can also use this function to determine if the afu_err_buff exists for the attached afu.

RETURN VALUE
On success, 0 is returned and size of the buffer is stored at valp On error, -1 is returned, errno is set appropriately and the contents at valp 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_read(3)