forked from linux-nvme/libnvme
-
Notifications
You must be signed in to change notification settings - Fork 2
set and get features #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
set and get features #105
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just added only functions frequently used in nvme-cli. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com> [wagi: - addded documentation] Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the struct args approach by providing init function for initializing the passthru commands. This reduces the dependency between callside and library. Signed-off-by: Daniel Wagner <wagi@kernel.org>
There is no user left of this type in ioctl.c. Remove it. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Refactore so we maintain nvme_get_log_partial easier. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Since the following warnings output. $ ./scripts/kernel-doc-check test/zns.c test/zns.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst test/zns.c:10: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
examples/mi-mctp.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Since checked by kernel-doc-check then the warning message output. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
To fix the warning message below. test/mi.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
The api-types.h include file provided struct args definition. These are all gone. But some basic types have been added in the meantime, which need to be present when using the types.h header. Signed-off-by: Daniel Wagner <wagi@kernel.org>
As we have renamed nvme_root to nvme_global_ctx, the Python bindings example needs to be adjusted to reflect the refactoring. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
The error handling has changed from returning -1 and errno set to just returing the error code. Negative values are internal errors, e.g. -ENOMEM. Positive values are status code from the transport. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
This is to resolve the build warnings below.
In function ‘nvme_init_app_tag’,
inlined from ‘test_verify’ at ../test/ioctl/misc.c:961:2:
../src/nvme/ioctl.h:4514:20: warning: array subscript ‘struct nvme_passthru_cmd64[0]’ is partly outside array bounds of ‘struct nvme_passthru_cmd[1]’ [-Warray-bounds=]
4514 | cmd->cdw15 = NVME_FIELD_ENCODE(lbat,
| ^
../test/ioctl/misc.c: In function ‘test_verify’:
../test/ioctl/misc.c:955:34: note: object ‘cmd’ of size 72
955 | struct nvme_passthru_cmd cmd;
| ^~~
In function ‘nvme_init_app_tag’,
inlined from ‘test_compare’ at ../test/ioctl/misc.c:865:2:
../src/nvme/ioctl.h:4514:20: warning: array subscript ‘struct nvme_passthru_cmd64[0]’ is partly outside array bounds of ‘struct nvme_passthru_cmd[1]’ [-Warray-bounds=]
4514 | cmd->cdw15 = NVME_FIELD_ENCODE(lbat,
| ^
../test/ioctl/misc.c: In function ‘test_compare’:
../test/ioctl/misc.c:857:34: note: object ‘cmd’ of size 72
857 | struct nvme_passthru_cmd cmd;
| ^~~
In function ‘nvme_init_app_tag’,
inlined from ‘test_write’ at ../test/ioctl/misc.c:830:2:
../src/nvme/ioctl.h:4514:20: warning: array subscript ‘struct nvme_passthru_cmd64[0]’ is partly outside array bounds of ‘struct nvme_passthru_cmd[1]’ [-Warray-bounds=]
4514 | cmd->cdw15 = NVME_FIELD_ENCODE(lbat,
| ^
../test/ioctl/misc.c: In function ‘test_write’:
../test/ioctl/misc.c:823:34: note: object ‘cmd’ of size 72
823 | struct nvme_passthru_cmd cmd;
| ^~~
In function ‘nvme_init_app_tag’,
inlined from ‘test_read’ at ../test/ioctl/misc.c:794:2:
../src/nvme/ioctl.h:4514:20: warning: array subscript ‘struct nvme_passthru_cmd64[0]’ is partly outside array bounds of ‘struct nvme_passthru_cmd[1]’ [-Warray-bounds=]
4514 | cmd->cdw15 = NVME_FIELD_ENCODE(lbat,
| ^
../test/ioctl/misc.c: In function ‘test_read’:
../test/ioctl/misc.c:787:34: note: object ‘cmd’ of size 72
787 | struct nvme_passthru_cmd cmd;
| ^~~
In function ‘nvme_init_app_tag’,
inlined from ‘test_write_zeros’ at ../test/ioctl/misc.c:898:2:
../src/nvme/ioctl.h:4514:20: warning: array subscript ‘struct nvme_passthru_cmd64[0]’ is partly outside array bounds of ‘struct nvme_passthru_cmd[1]’ [-Warray-bounds=]
4514 | cmd->cdw15 = NVME_FIELD_ENCODE(lbat,
| ^
../test/ioctl/misc.c: In function ‘test_write_zeros’:
../test/ioctl/misc.c:892:34: note: object ‘cmd’ of size 72
892 | struct nvme_passthru_cmd cmd;
| ^~~
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Since the almost nvme-cli caller functions expected the base name. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Adding the data buffer and its length to the nvme passthru cmd. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Add get features helper functions that are frequently called in nvme-cli. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
46b191a to
d1866db
Compare
|
Looks good. |
ikegami-t
approved these changes
Oct 28, 2025
|
I've merged these changed into 9f8dd99 ("ioctl: introduce get/set feature helper functions"). Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.