'\" t .\" Title: libcxl .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.12 .\" Date: 2022-04-08 .\" Manual: libcxl Manual .\" Source: libcxl .\" Language: English .\" .TH "LIBCXL" "3" "2022-04-08" "libcxl" "libcxl Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" libcxl \- A library to interact with CXL devices through sysfs(5) and ioctl(2) interfaces .SH "SYNOPSIS" .sp .sp .nf #include cc ... \-lcxl .fi .br .SH "DESCRIPTION" .sp libcxl provides interfaces to interact with CXL devices in Linux, using sysfs interfaces for most kernel interactions, and the ioctl() interface for command submission. .sp The starting point for all library interfaces is a \fIcxl_ctx\fP object, returned by cxl_new(3). CXL \fIType 3\fP memory devices are children of the cxl_ctx object, and can be iterated through using an iterator API. .sp Library level interfaces that are agnostic to any device, or a specific subclass of operations have the prefix \fIcxl_\fP .sp The object representing a CXL Type 3 device is \fIcxl_memdev\fP. Library interfaces related to these devices have the prefix \fIcxl_memdev_\fP. These interfaces are mostly associated with sysfs interactions (unless otherwise noted in their respective documentation pages). They are typically used to retrieve data published by the kernel, or to send data or trigger kernel operations for a given device. .sp A \fIcxl_cmd\fP is a reference counted object which is used to perform \fIMailbox\fP commands as described in the CXL Specification. A \fIcxl_cmd\fP object is tied to a \fIcxl_memdev\fP. Associated library interfaces have the prefix \fIcxl_cmd_\fP. Within this sub\-class of interfaces, there are: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} \fIcxl_cmd_new_*\fP interfaces that allocate a new cxl_cmd object for a given command type. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} \fIcxl_cmd_submit\fP which submits the command via ioctl() .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} \fIcxl_cmd__get_\fP interfaces that get specific fields out of the command response .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} \fIcxl_cmd_get_*\fP interfaces to get general command related information. .RE .SH "COPYRIGHT" .sp Copyright \(co 2016 \- 2020, Intel Corporation. License GPLv2: GNU GPL version 2 \c .URL "http://gnu.org/licenses/gpl.html" "" "." This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" .sp cxl(1)