Skip to content

Conversation

@igaw
Copy link

@igaw igaw commented Oct 14, 2025

There is an ongoing review of the libnvm3 branch, let's not disturb thus just use a temp branch to get the build fixed.

igaw and others added 21 commits July 28, 2025 14:29
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>
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 global context 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.

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 transport 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_transport_handle 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>
struct nvme_transport_handle was introduced to abstract the transport,
thus replace nvme_mi_ctrl_t with it.

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 struct nvme_transport_handle 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>
With the introduction of the link handle, it's possible to use the
generic nvme API. The transport selection happens on lower levels
depending on the link object type.

Note, the tests rely on using the ioctl interface and not the io_uring.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
The v1 design used the POSIX way to return errors, return -1 with errno
set.

Replace this design by returning directly the error code. That means non
trivial function have to return any data via a pointer so the function
is able to return proper error codes.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
MI doesn't access the complete identify data struct and thus
only transfers a port of it. Add a generic version of this
function.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Use the generic nvme_identify{_partial} interface and drop
the MI specific version.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Since the warning message output by kernel-doc-check.

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. The only stable API from the library is then
nvme_submit_passthru_cmd and struct nvme_passthru_cmd.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
@igaw igaw force-pushed the libnvme3-build-test branch 6 times, most recently from f95cd7a to cfc548a Compare October 14, 2025 18:19
igaw added 2 commits October 14, 2025 20:23
The fw download and fw commit test fail sometimes because struct args is
not properly initiliazed.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
@igaw igaw force-pushed the libnvme3-build-test branch from cfc548a to ae7c790 Compare October 14, 2025 18:26
@igaw
Copy link
Author

igaw commented Oct 15, 2025

branch not needed anymore

@igaw igaw closed this Oct 15, 2025
@igaw igaw deleted the libnvme3-build-test branch October 16, 2025 09:20
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.

3 participants