Skip to content

ndctl: Add support and test for CXL Features support

Dave Jiang linux-cxl nvdimm 10 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest4 patches 3 repliesIn review
  2. v84 patches 1 replySuperseded
  3. v74 patches 5 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v64 patches5 repliesSuperseded
v53 patches6 repliesSuperseded
v43 patches7 repliesSuperseded
v33 patches0 repliesSuperseded
v23 patches2 repliesSuperseded
v1 posting 2/25 patches0 repliesSuperseded
v1 posting 1/25 patches0 repliesSuperseded

Changes in v9 from the cover letter

- Move script body to main(). (Marc)
- Remove uuid dep for test module. (Marc)
- Remove removal of error trap. (Marc)

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4cxl: Add cxl_bus_get_by_provider()Documentation/cxl/lib/libcxl.txt cxl/lib/libcxl.c cxl/lib/libcxl.sym +1 more+20 -00 replies
2/4cxl: Enumerate major/minor of FWCTL char deviceDocumentation/cxl/lib/libcxl.txt config.h.meson cxl/lib/libcxl.c +5 more+127 -01 reply
3/4ndctl: Add features.h from kernel UAPIcxl/fwctl/cxl.h cxl/fwctl/features.h cxl/fwctl/fwctl.h+384 -00 replies
4/4cxl/test: Add test for cxl features devicecxl/fwctl/cxl.h test/cxl-features.sh test/fwctl.c +1 more+495 -11 reply

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchDan Williams
1/4A-b
2/4A-b
3/4
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v9 thread

Cover letter [NDCTL PATCH v9 0/4] ndctl: Add support and test for CXL Features support

v9:
- Move script body to main(). (Marc)
- Remove uuid dep for test module. (Marc)
- Remove removal of error trap. (Marc)

v8:
- Stash fwctl discovery functions behind ifdef (Alison)
- Deal with old compilers and __counted_by(). (Alison)

v7:
- Move enumeration of fwctl behind meson option 'fwctl'. (Dan)

v6:
- Rename cxl-features.control.c back to fwctl.c. (Dan)
- Move features behind a meson option. (Dan)
- See individual commits for specific changes from v5.

v5:
- Add documentation for exported symbols. (Alison)
- Create 'struct cxl_fwctl' as object under cxl_memdev. (Dan)
- Make command prep common code. (Alison)
- Rename fwctl.c to cxl-features-control.c. (Alison)
- See individual commits for specific changes from v4.

v4:
- Adjust to kernel changes of input/output structs
- Fixup skip/pass/fail logic
- Added new kernel headers detection and dependency in meson.build

v3:
- Update test to use opcode instead of command id.

v2:
- Drop features device enumeration
- Add discovery of char device under memdev

The series provides support of libcxl enumerating FWCTL character device under the cxl_memdev device. It discovers the char device major and minor numbers for the CXL features device in order to allow issuing of ioctls to the device.

A unit test is added to locate cxl_memdev exported by the cxl_test kernel module and issue all the supported ioctls to the associated FWCTL char device to verify that all the ioctl paths are working as expected.

Kernel series: https://lore.kernel.org/linux-cxl/[email protected]/T/#t

Dave Jiang (4):
cxl: Add cxl_bus_get_by_provider()
cxl: Enumerate major/minor of FWCTL char device
ndctl: Add features.h from kernel UAPI
cxl/test: Add test for cxl features device

 Documentation/cxl/lib/libcxl.txt |  26 ++
 config.h.meson                   |   3 +
 cxl/fwctl/cxl.h                  |  56 ++++
 cxl/fwctl/features.h             | 187 +++++++++++++
 cxl/fwctl/fwctl.h                | 141 ++++++++++
 cxl/lib/libcxl.c                 |  94 +++++++
 cxl/lib/libcxl.sym               |   8 +
 cxl/lib/private.h                |   6 +
 cxl/libcxl.h                     |   7 +
 meson.build                      |   1 +
 meson_options.txt                |   2 +
 test/cxl-features.sh             |  37 +++
 test/fwctl.c                     | 439 +++++++++++++++++++++++++++++++
 test/meson.build                 |  18 ++
 14 files changed, 1025 insertions(+)
 create mode 100644 cxl/fwctl/cxl.h
 create mode 100644 cxl/fwctl/features.h
 create mode 100644 cxl/fwctl/fwctl.h
 create mode 100755 test/cxl-features.sh
 create mode 100644 test/fwctl.c

base-commit: 1850ddcbcbf9eebd343c6e87a2c55f3f5e3930c4

Signature · 1 line
2.49.0