Skip to content

RFC add support for IDENTIFY command

Jehoon Park linux-cxl 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libcxl: add accessors for IDENTIFY commandcxl/lib/libcxl.c cxl/lib/libcxl.sym cxl/lib/private.h +1 more+111 -00 replies
2/2cxl: add identify command to cxl toolDocumentation/cxl/cxl-identify.txt Documentation/cxl/meson.build cxl/builtin.h +2 more+201 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [ndctl patch RFC 0/2] add support for IDENTIFY command

From: jehoon park <[email protected]>

This patchset supports CXL IDENTIFY mailbox command and corresponding cxl tool interface command.

CXL 3.0 Spec 8.2.9.8.1 defines IDENTIFY command which retrieves basic information about CXL memory device. The information consist of device's firmware version, capacity, LSA size, event log size, poison list size, inject poison limit, poison handling capabilities and QoS telemetry capabilities. Firmware version, capacity and LSA size are already supported and used for partition commands or sysfs attributes while others are not. Since patches about event log [1] and poison [2] are discussed recently, support for those information will be helpful.

Example:

# cxl identify mem0
FW Revision                              : BWFW VERSION 00
Total Capacity                           : 1.00 GB
Volatile Only Capacity                   : 1.00 GB
Persistent Only Capacity                 : 0 B
Partition Alignment                      : 0 B
Informational Event Log Size             : 0
Warning Event Log Size                   : 0
Failure Event Log Size                   : 0
Fatal Event Log Size                     : 0
LSA Size                                 : 0 B
Poison List Maximum Media Error Records  : 256
Inject Poison Limit                      : 0
Poison Handling Capabilities
Injects Persistent Poison                : Not Supported
Scans for Poison                         : Not Supported
QoS Telemetry Capabilities
Egress Port Congestion                   : Not Supported
Temporary Throughput Reduction           : Not Supported
cxl memdev: cmd_identify: identified 1 mem

This patch is RFC because some of the information are already provided by "list -m <memdev>" command and sysfs attributes.
I think a separate cxl tool interface command for identify is useful to provide device's information clearly. In case of nvme-cli, there are separate interface commands for identifying controller and namespace: id-ctrl and id-ns.

[1] https://lore.kernel.org/linux-cxl/[email protected]/
[2] https://lore.kernel.org/linux-cxl/[email protected]/

jehoon park (2):
libcxl: add accessors for IDENTIFY command
cxl: add identify command to cxl tool

 Documentation/cxl/cxl-identify.txt |  57 ++++++++++++
 Documentation/cxl/meson.build      |   1 +
 cxl/builtin.h                      |   1 +
 cxl/cxl.c                          |   1 +
 cxl/lib/libcxl.c                   |  73 +++++++++++++++
 cxl/lib/libcxl.sym                 |  11 +++
 cxl/lib/private.h                  |  11 +++
 cxl/libcxl.h                       |  16 ++++
 cxl/memdev.c                       | 141 +++++++++++++++++++++++++++++
 9 files changed, 312 insertions(+)
 create mode 100644 Documentation/cxl/cxl-identify.txt

base-commit: b830c4af984e72e5849c0705669aad2ffa19db13

Signature · 1 line
2.17.1