Skip to content

Drop tree typedefs and documentation cleanup - #3923

Merged
igaw merged 6 commits into
linux-nvme:masterfrom
igaw:review
Aug 26, 2026
Merged

Drop tree typedefs and documentation cleanup#3923
igaw merged 6 commits into
linux-nvme:masterfrom
igaw:review

Conversation

@igaw

@igaw igaw commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

I let claude review the API and the list of things to cleanup was mostly documentation update and the inconsistency use of typedefs or not. I decided to make it consistent and replace the typedefs and follow the kernel style here.

igaw added 5 commits August 26, 2026 11:37
Use the enum libnvmf_hmac_alg type consistently instead a plain int.

Signed-off-by: Daniel Wagner <wagi@monom.org>
The correct prefix is libnvme_, update the name of the function.

Signed-off-by: Daniel Wagner <wagi@monom.org>
Add additional information to the owner API related functions.

Signed-off-by: Daniel Wagner <wagi@monom.org>
Point out that the return string needs to be freed by the caller.

Signed-off-by: Daniel Wagner <wagi@monom.org>
The documentation is incorrect, it either returns a string or NULL.

Signed-off-by: Daniel Wagner <wagi@monom.org>
@igaw
igaw requested a balanced review from Copilot August 26, 2026 10:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Standardizes libnvme APIs on explicit structure pointers and improves type-safe HMAC handling.

Changes:

  • Replaces tree and MI pointer typedefs with explicit struct pointers.
  • Uses enum libnvmf_hmac_alg throughout TLS key APIs.
  • Updates related implementations, plugins, tests, examples, and documentation comments.

Reviewed changes

Copilot reviewed 58 out of 58 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/nvme-print.h Updates print interfaces.
src/nvme-print.c Updates print wrappers.
src/nvme-print-stdout.c Updates stdout tree handling.
src/nvme-print-stdout-top.c Updates dashboard tree handling.
src/nvme-print-json.c Updates JSON tree handling.
src/nvme-pci-ids-win.c Updates Windows controller type.
src/nvme-cmds-common.h Updates device filters.
src/global-ctx.c Updates MI endpoint type.
src/fabrics.c Updates fabrics tree handling.
src/cleanup.h Updates controller cleanup type.
plugins/zns/zns.c Updates ZNS tree handling.
plugins/solidigm/solidigm-get-drive-info.c Updates drive object types.
plugins/sandisk/sandisk-utils.c Updates PCI lookup types.
plugins/keys/keys-plugin.c Uses the HMAC enum.
libnvme/tests/zns.c Updates ZNS test types.
libnvme/tests/tree.c Updates tree test types.
libnvme/tests/tree-fabrics.c Updates fabrics tree tests.
libnvme/tests/test.c Updates general test types.
libnvme/tests/test-fabrics.c Updates fabrics test type.
libnvme/tests/sysfs/tree-scan.c Updates scan test types.
libnvme/tests/psk.c Tests enum-based HMAC outputs.
libnvme/tests/mi.c Updates MI test types.
libnvme/tests/mi-mctp.c Updates MCTP test types.
libnvme/tests/ioctl/discovery.c Updates discovery test types.
libnvme/tests/cpp.cc Updates C++ API usage.
libnvme/src/nvme/tree.c Converts tree implementation types.
libnvme/src/nvme/tree-win.c Converts Windows tree types.
libnvme/src/nvme/tree-linux.c Converts Linux tree types.
libnvme/src/nvme/tree-fabrics.c Converts fabrics tree types.
libnvme/src/nvme/scan.h Updates scan API signatures.
libnvme/src/nvme/scan-win.c Updates Windows scan signatures.
libnvme/src/nvme/scan-linux.c Updates Linux scan signatures.
libnvme/src/nvme/private.h Updates private declarations.
libnvme/src/nvme/private-tree.h Updates private tree declarations.
libnvme/src/nvme/private-fabrics.h Updates fabrics hook signature.
libnvme/src/nvme/no-fabrics.c Updates no-fabrics stubs.
libnvme/src/nvme/no-crypto.c Updates crypto stub types.
libnvme/src/nvme/mi.h Removes the MI endpoint typedef.
libnvme/src/nvme/mi.c Converts MI implementation types.
libnvme/src/nvme/mi-mctp.c Converts MCTP endpoint types.
libnvme/src/nvme/lib.h Improves API documentation.
libnvme/src/nvme/lib.c Updates endpoint cleanup types.
libnvme/src/nvme/fabrics.h Updates public fabrics signatures.
libnvme/src/nvme/fabrics.c Converts fabrics implementation types.
libnvme/src/nvme/exclusion.c Updates exclusion controller type.
libnvme/src/nvme/crypto.h Makes HMAC APIs enum-typed.
libnvme/src/nvme/crypto.c Implements enum-based HMAC handling.
libnvme/libnvme3/nvme.i Updates SWIG wrapper type usage.
libnvme/examples/telemetry-listen.c Updates telemetry example types.
libnvme/examples/mi-mctp.c Updates MI example types.
libnvme/examples/mi-mctp-csi-test.c Updates CSI example types.
libnvme/examples/mi-mctp-ae.c Updates AEM example types.
libnvme/examples/mi-conf.c Updates MI configuration types.
libnvme/examples/display-tree.c Updates tree example types.
libnvme/examples/display-columnar.c Updates columnar example types.
libnvme/examples/discover-loop.c Updates discovery example types.
discoverd/src/dlp.c Updates discovery controller type.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread libnvme/src/nvme/fabrics.h
Comment thread libnvme/src/nvme/mi.h
Comment thread libnvme/src/nvme/scan.h
Comment thread libnvme/src/nvme/fabrics.h Outdated
The other parts of the API avoid introducing typedefs which makes the
tree API stand out. Let's drop these and use kernel style how to handle
types.

Signed-off-by: Daniel Wagner <wagi@monom.org>
@igaw
igaw merged commit fd2fc63 into linux-nvme:master Aug 26, 2026
29 of 30 checks passed
@igaw
igaw deleted the review branch August 26, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants