-
Notifications
You must be signed in to change notification settings - Fork 2
libnvme v2 #35
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
libnvme v2 #35
Conversation
Merge all existing symbols into a new 2.0 section. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Get rid of deprecated functions. Signed-off-by: Daniel Wagner <wagi@kernel.org>
e8528de to
e10ee25
Compare
|
Just fixed many checkpath warnings/errors, added commit messages, fixed style issues and a real errors. This means the series is fairly clean at least in the context of checkpath |
|
Closing this, as this was just a means to get the CI to build. |
Darn it! I didn't read your latest commend before closing this. Sorry I am reopening this. |
e4ddb45 to
904763c
Compare
|
@igaw Ohh! Very smart to keep this PR open, that way we always trigger the build action with changes on the libnvme2 branch. |
575d604 to
a5c7768
Compare
libnvme-mi was added after the initial 1.x release and it was decided to ship it independ of libnvme. With the upcoming 2.x work, merge the two libraries so it's possible to use common code, that is unify the APIs. Signed-off-by: Daniel Wagner <wagi@kernel.org>
The root object will not only be used by the tree API, instead it will be used as default context for the complete API. This addresses the shortcoming that 'global' variables such as the logging infrastructure should not be library global variables. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Abstract the file descriptor handle to a more abstract type so it's possible to use different 'backends' to send/receive commands, e.g. via MI instead direct. The name 'link' was chosen because this name is not in use and thus we avoid overloading existing names, such ctrl. The specification is using 'link' to describe the connection on a PCI bus which is kind of matching how the handle is used in the library. It is the means to talk to a controller. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Since uring not supported for link type mi. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
There is no user left for the file descriptor in the args structs, thus remove it. Signed-off-by: Daniel Wagner <wagi@kernel.org>
When the user provides their own implementation of the passtrhu function, it is necessary to use the file descriptor for the ioctl call. Thus allow to retrieve the file descriptor from the link handle. Signed-off-by: Daniel Wagner <wagi@kernel.org>
nvme-cli wants to retrieve the name of the device, add a getter for this. Signed-off-by: Daniel Wagner <wagi@kernel.org>
The nvme_link_t type is used for block device and char device. User application sometimes need to figure out which type of device is used. Because libnvme already knows the type of device expose this. This avoids tracking of the device type in the user application. Signed-off-by: Daniel Wagner <wagi@kernel.org>
nvme_link_t in place, it's possible to replace nvme_mi_ctrl_t with the generic transport abstraction type. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Extend nvme_open and nvme_close to handle MI devices. Signed-off-by: Daniel Wagner <wagi@kernel.org>
The nvme_link_t type is used to abstract the transport type. User application sometimes need to figure out which type of device is used. Because libnvme already knows the type of device expose this. This avoids tracking of the device type in the user application. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Hook up the MI backend to the generic commands API. Signed-off-by: Daniel Wagner <wagi@kernel.org>
The MI code has an alignment and length check which the direct APIs are missing. Without these checks the download tests for MI will fail after using the generic APIs. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_lm_migration_recv_args. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Drop struct nvme_security_receive_args. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com> [wagi: reordered arguments] Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_get_lba_status_args. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com> [wagi: reordering arguments] Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_directive_send_args.
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
[wagi: updated nvme_directive_send_id_endir
reordered arguments]
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_directive_recv_args.
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
[wagi: removed libnvme.map entry
reordered arguments]
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_virtual_mgmt_args. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com> [wagi: remove libnvme.map entry] Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_dev_self_test_args. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com> [wagi: removed libnvme.map entry] Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_sanitize_nvm_args.
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
[wagi: remove libnvme.map entry
reorder and rename arguments]
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_get_property_args. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com> [wagi: remove libnvme.map entry] Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_set_property_args. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com> [wagi: remove libnvme.map entry] Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_lockdown_args. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com> [wagi: remove libnvme.map entry] Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_capacity_mgmt_args.
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
[wagi: remove libnvme.map entry
reordered/renamed arguments]
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Drop struct nvme_get_features_args. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com> [wagi: reordered/renamed arguments] 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>
This is to maintain nvme_get_log_partial easily. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Renaming NVME_NVM_CDW* SHIFT and MASK enum members to NVME_IOCS_COMMON_CDW*. The ZNS IO command set (IOCS) has the same fields and offsets for the CDWs in question. Replacing STCR with two enum entries for CDW12 bit 25 as this bit can only be Reserved, DEAC or PIREMAP. STCR is part of the copy command which has its own enum members for CDW12. The NVME_IOCS_COMMON_CDW* entries cover now nvme_read nvme_write nvme_compare nvme_write_zeros nvme_write_uncorrectable nvme_zns_append This is in preparation for the following commit which introduces the shift masks for the zone append command. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Replace hardcoded MASK and SHIFT values with enum entries for nvme_zns_append. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Replace hardcoded MASK and SHIFT values with enum entries for nvme_capacity_mgmt. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Replace hardcoded MASK and SHIFT values with enum entries for nvme_lockdown. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Replace hardcoded MASK and SHIFT values with enum entries for nvme_io_mgmt_recv. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Replace hardcoded MASK and SHIFT values with enum entries for nvme_resv_*. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
The spec specifies that this command returns the currently selected IOCSCI upon successful completion. Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.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>
PR to trigger CI build