Skip to content

Conversation

@amboar
Copy link
Collaborator

@amboar amboar commented Jul 30, 2025

Implement support for Configuration Get and Configuration Set. Along the way, reorganise the codebase and implement an interface to propagate command effects to the application.

amboar added 13 commits July 23, 2025 17:11
The current Configuration Get support snuck in during 5c6d725
("nvme: mi: Convert to deku"). I used these commands to experiment with
deku itself, and then must have done some over-enthusiastic squashing
when tidying up the change history.

In the process, fix the implementation of NVMe MI / Configuration Get /
MCTP Transmission Unit Size. The conversion to enum-based parsing makes
measuring from the buffer start a tricky prospect, and incorrect in
this case.

Signed-off-by: Andrew Jeffery <[email protected]>
Implementing RequestHandler on the struct allows reuse of the
NvmeMiConfigurationIdentifierRequestType enum for Configuration Set.

Signed-off-by: Andrew Jeffery <[email protected]>
Primarily, organise structs and enum definitions such that:

- The library data model is defined in src/lib.rs

- Base specification details are contained in src/nvme.rs

- MI specification details are contained in src/nvme/mi.rs

- The device implementation src/nvme/mi/dev.rs

In the process, drop the use of num-traits in favour of the Discriminant
trait.

Signed-off-by: Andrew Jeffery <[email protected]>
Many NVMe-MI commands change device state in ways that only
the implementing application can handle, as they require either
reconfiguring lower layers of the stack or persisting state. NVMe MI /
Configuration Set / MCTP Transmission Unit Size motivates the change.

Signed-off-by: Andrew Jeffery <[email protected]>
@amboar amboar merged commit a62256b into main Jul 30, 2025
2 checks passed
@amboar amboar deleted the dev/nvme-mi/configuration-set-get branch July 30, 2025 10:13
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