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

NBFT parser SSNS flags #781

Merged
merged 6 commits into from
Mar 18, 2024
Merged

NBFT parser SSNS flags #781

merged 6 commits into from
Mar 18, 2024

Conversation

tbzatek
Copy link
Contributor

@tbzatek tbzatek commented Feb 9, 2024

There are significant differences in different vendor implementations of the NVMe Boot Specification and as it turned out not everything is supported by the libnvme NBFT parser.

@tbzatek
Copy link
Contributor Author

tbzatek commented Feb 9, 2024

This is pretty much work in progress and we might need some more flags. nvme-cli patches will follow.
I'm keeping future expansion with TP8029 in mind, though it's not a subject of this pull request.

The most important question: is the addition of new struct members at the end of structs okay with you?

@igaw
Copy link
Collaborator

igaw commented Feb 11, 2024

Hmm, as long we can figure out that we don't break existing users, you can do whatever is needed. That means older binary version of nvme-cli should still work against newer libnvme versions. If I get this right, this should work if you extend at the end of the struct.

The other dependency order should be handled in nvme-cli. Which I think we do with the version check.

@tbzatek
Copy link
Contributor Author

tbzatek commented Feb 13, 2024

Thanks, I'm not aware of any user other than nvme-cli. Potentially network management daemons (NetworkManager, wicked) may need to parse some extra info, but I'm not aware of such thing happening at the moment.

We do plan to further extend these convenient nbft_info_* structs with TP-8029 and TP-8027 (along with the usual 1:1 spec translation to C headers). Also, NBFT ACPI table is versioned and the parser is already covered by unit tests.

@igaw
Copy link
Collaborator

igaw commented Feb 14, 2024

Yes this code is pretty fresh so I am not really concerned about breaking stuff. Maybe we should mark certain features as experimental until we are happy with it. Just as idea.

Added an explicit note about unstable API, that is in fact
semi-unstable whereas existing structures are stable and
new API will possibly be added at the end of the structs.

Signed-off-by: Tomas Bzatek <[email protected]>
@tbzatek tbzatek force-pushed the nbft-flags-1 branch 2 times, most recently from b4f7c28 to 25311cf Compare March 7, 2024 16:32
@tbzatek tbzatek marked this pull request as ready for review March 8, 2024 16:55
@tbzatek tbzatek changed the title [WIP] NBFT parser SSNS flags NBFT parser SSNS flags Mar 8, 2024
@tbzatek
Copy link
Contributor Author

tbzatek commented Mar 8, 2024

Okay, this is ready for review. We're far from done but this is an independent chunk of changes at least.

Cc: @mwilck

Copy link
Contributor

@mwilck mwilck left a comment

Choose a reason for hiding this comment

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

LGTM. I didn't bother to review the "diffs" in detail.

Copy link

@johnmeneghini johnmeneghini left a comment

Choose a reason for hiding this comment

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

Clean up the no space before tabs problem and commit - please.

@tbzatek
Copy link
Contributor Author

tbzatek commented Mar 18, 2024

Clean up the no space before tabs problem and commit - please.

Fixed in a separate commit, required more changes across the header file.

tbzatek added 5 commits March 18, 2024 15:08
Certain pre-OS driver implementations (i.e. UEFI) may opt
to include SSNS records that failed to connect, caused either
by a temporary target inaccessibility or an invalid
configuration. Such reason is further indicated by TP8029
extended information.

This commit adds a flag indicating namespace availability
so that clients (nvme-cli) may either decide to skip such
record or make another connection attempt.

Signed-off-by: Tomas Bzatek <[email protected]>
Indicates that the SSNS record was obtained through discovery.

Signed-off-by: Tomas Bzatek <[email protected]>
+ regenerate the sample table outputs.

Signed-off-by: Tomas Bzatek <[email protected]>
Two HFIs, four discovery records (only two visible in the
table) and some form of multipath. Two SSNS records marked
as unavailable due to subnet mismatch.

Signed-off-by: Tomas Bzatek <[email protected]>
Code style fixes to satisfy the checkpatch
"please, no space before tabs" warnings.

Signed-off-by: Tomas Bzatek <[email protected]>
@igaw igaw merged commit 93f83b9 into linux-nvme:master Mar 18, 2024
14 checks passed
@igaw
Copy link
Collaborator

igaw commented Mar 18, 2024

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.

4 participants