Skip to content
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

mi_xfer: Added nvme_mi_mi_xfer API #939

Merged
merged 1 commit into from
Jan 10, 2025
Merged

Conversation

chorkin
Copy link
Contributor

@chorkin chorkin commented Jan 6, 2025

Exposed an nvme_mi_mi_xfer for MI messages. This is similar to the Admin passthrough, nvme_mi_admin_xfer.

Added new API and test cases in test-mi
Signed-off-by: Chuck Horkin chorkin@microsoft.com

@igaw
Copy link
Collaborator

igaw commented Jan 7, 2025

@jk-ozlabs could you have a look? Thanks!

Copy link
Collaborator

@jk-ozlabs jk-ozlabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with the concept here, but could you elaborate on what the intended use-case is here? If it's just for coverage of specified MI commands, then we may want to add those (rather than leaking the implementations out the caller). Or is this for vendor-defined MI interactions?

It may be helpful to include a bit of a rationale/use-case in the commit message, if that's applicable - your call on that.

I have a couple of comments inline. You'll also need to update the .map file, otherwise the new function will not be visible.

src/nvme/mi.c Outdated Show resolved Hide resolved
src/nvme/mi.h Outdated Show resolved Hide resolved
src/nvme/mi.h Outdated Show resolved Hide resolved
test/mi.c Outdated Show resolved Hide resolved
src/nvme/mi.c Outdated Show resolved Hide resolved
src/nvme/mi.c Outdated Show resolved Hide resolved
@chorkin
Copy link
Contributor Author

chorkin commented Jan 8, 2025

I'm fine with the concept here, but could you elaborate on what the intended use-case is here? If it's just for coverage of specified MI commands, then we may want to add those (rather than leaking the implementations out the caller). Or is this for vendor-defined MI interactions?

It may be helpful to include a bit of a rationale/use-case in the commit message, if that's applicable - your call on that.

I have a couple of comments inline. You'll also need to update the .map file, otherwise the new function will not be visible.

Thanks for the review. Regarding the use-case, we have a service we're writing and it's meant to be mostly pass through to allow multiple processes to talk to the device we are working on. The device will also have some custom vendor-defined MI interactions. For both of those reasons I wanted to expose this pass through API.

Noted on the .map. I will fix this.

@chorkin chorkin force-pushed the mi_xfer branch 2 times, most recently from 119ffb3 to d7dd341 Compare January 8, 2025 17:43
src/libnvme-mi.map Outdated Show resolved Hide resolved
src/nvme/mi.c Outdated Show resolved Hide resolved
@jk-ozlabs
Copy link
Collaborator

We're at the stage of me doing minor tweaks in comments, so all looks pretty good to me with the .map fix that @igaw has mentioned.

This is added to be analogous to nvme_mi_admin_xfer, providing a way for
the application to implement vendor specific mi commands.

Signed-off-by: Chuck Horkin <chorkin@microsoft.com>
@igaw igaw merged commit d45e9a1 into linux-nvme:master Jan 10, 2025
15 checks passed
@igaw
Copy link
Collaborator

igaw commented Jan 10, 2025

Thanks!

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