-
Notifications
You must be signed in to change notification settings - Fork 2
ioctl: nvme_get_features use nvme_passthru_cmd directly #6
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
ioctl: nvme_get_features use nvme_passthru_cmd directly #6
Conversation
Signed-off-by: Daniel Wagner <[email protected]>
The next change will add a static inline implementation of nvme_get_log which uses nvme_get_log_page. Thus move the nvme_get_log_page function up so it can be used directly. Signed-off-by: Daniel Wagner <[email protected]>
Refactor nvme_get_log and nvme_get_log_page to use use struct nvme_passthru_cmd directly and drop the struct nvme_get_log_args. The struct args have are ABI thus it's hard to change it after a release. The nvme_passthru_cmd buffer is a generic buffer and it's possible to use the setters directly on the buffer in an inline function. Besides a reduced API to maintain it also generates better code and avoids one call less when issue a command. Signed-off-by: Daniel Wagner <[email protected]> merge with: 532c209 ("ioctl: nvme_get_log use nvme_passthru_cmd directly")
The compiler warns with
../test/ioctl/logs.c: In function ‘test_get_log_reachability_groups’:
../test/ioctl/logs.c:725:28: warning: enum constant in boolean context [-Wint-in-bool-context]
725 | (!!TEST_LSP << 8) | (!!TEST_RAE << 15) |
| ^
../test/ioctl/logs.c:733:70: warning: enum constant in boolean context [-Wint-in-bool-context]
733 | err = nvme_get_log_reachability_groups(test_link, TEST_RAE, !!TEST_LSP,
| ^
Update the tests so the types are correctly handled. It also addresses
the problem with the wrong lsp value testing.
Signed-off-by: Daniel Wagner <[email protected]>
Drop struct nvme_format_nvm_args. Signed-off-by: Daniel Wagner <[email protected]>
Drop struct nvme_ns_mgmt_args. Signed-off-by: Daniel Wagner <[email protected]>
Drop struct nvme_ns_attach_args. Signed-off-by: Daniel Wagner <[email protected]>
Drop struct nvme_fw_download_args. Signed-off-by: Daniel Wagner <[email protected]>
Drop struct nvme_fw_commit_args. Signed-off-by: Daniel Wagner <[email protected]>
Drop struct nvme_security_send_args. Signed-off-by: Daniel Wagner <[email protected]>
Drop struct nvme_set_features_args. Signed-off-by: Dennis Maisenbacher <[email protected]>
Drop struct nvme_dsm_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_io_args. Signed-off-by: Tokunori Ikegami <[email protected]> ioctl: reorder nsid argument Also order the pointer and its length member go to the end of the list. Signed-off-by: Tokunori Ikegami <[email protected]>
To use the fields in nvme_io() and nvme_dsm() functions. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_copy_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_resv_acquire_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_resv_register_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_resv_release_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_resv_report_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_io_mgmt_recv_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_io_mgmt_send_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_zns_mgmt_send_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_zns_mgmt_recv_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_zns_append_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_dim_args. Signed-off-by: Tokunori Ikegami <[email protected]>
Since the warning message output by kernel-doc-check. Signed-off-by: Tokunori Ikegami <[email protected]>
Drop struct nvme_get_features_args. Signed-off-by: Dennis Maisenbacher <[email protected]>
|
I've merged this PR directly into libnvme2. Thanks! |
|
Sorry @MaisenbacherD I've dropped your patch because @ikegami-t had many more changes which I could apply directly. Otherwise the merging would have been too much of an hassle. |
|
oh i screwed up in the merge... |
|
and your patch is back in the queue. I've just got very confused. |
|
Sorry for the delay. Finally catching up with my inbox. Should I rebase this PR again? :) |
|
All good, I've added the patch to the queue. I am going through all the API updating patches and fixup the ordering and missing arguments. Started to create issues to things to work on later. Basically everything which doesn't break the API. |
Drop struct nvme_get_features_args.