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

Add Support for Phy rx eom log #2056

Merged
merged 3 commits into from
Sep 25, 2023
Merged

Conversation

bpaupore-wdc
Copy link
Contributor

This primarily introduces a new command phy-rx-eom-log for getting that log page and allowing the user to specify the lsi/lsp values for it. These changes depend on libnvme commit e923016.

One question I have is how to handle failing allocations in nvme-print-json.c. Currently these changes just silently fail to include the printable eye data in the json root, but if there's some way this error should be reported I can make that change.

The second commit addresses a very minor bug obscuring non-zero reserved fields for fdpa. I could split this out into its own PR if that would be preferred, otherwise it seemed simple enough to include here as a separate commit.

@igaw
Copy link
Collaborator

igaw commented Sep 21, 2023

rebased on current master to get latest libnvme changes.

@igaw
Copy link
Collaborator

igaw commented Sep 21, 2023

One question I have is how to handle failing allocations in nvme-print-json.c. Currently these changes just silently fail to include the printable eye data in the json root, but if there's some way this error should be reported I can make that change.

The printing backend rework is still WIP. The goal is to have all commands producing output for all formats (at least stdout and json). Currently there are a lot of missing hooks. So it would be great to have also the json output part added. I am unsure if we want have a binary output as well. I suspect for some commands it would make sense.

@igaw
Copy link
Collaborator

igaw commented Sep 21, 2023

The second commit addresses a very minor bug obscuring non-zero reserved fields for fdpa. I could split this out into its own PR if that would be preferred, otherwise it seemed simple enough to include here as a separate commit.

I don't mind it that it is in this PR.

Copy link
Collaborator

@igaw igaw left a comment

Choose a reason for hiding this comment

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

Looks good overall. Thanks for the different print implementations. That is very cool!

I've just added the auto cleanup hooks to get rid of the many gotos which makes the code a bit more readable (there are more places to cleanup WIP).

nvme.c Outdated Show resolved Hide resolved
nvme.c Outdated Show resolved Hide resolved
nvme.c Outdated Show resolved Hide resolved
nvme.c Outdated Show resolved Hide resolved
nvme.c Outdated Show resolved Hide resolved
nvme.c Outdated Show resolved Hide resolved
Noticed this when adding similar behavior for phy_rx_eom_log's odp, it
doesn't make much sense to right-shift the byte by 8.

Signed-off-by: Brandon Paupore <[email protected]>
This attempts to preserve the functionality of realloc while also
ensuring the final memory is aligned.

Signed-off-by: Brandon Paupore <[email protected]>
This implements support for TP4119a, adding a new command nvme
phy-rx-eom-log for issuing Get Log Page with the new Log Identifier and
allowing for configuration/validation of the Log Specific Parameters.

Signed-off-by: Brandon Paupore <[email protected]>
@igaw igaw merged commit 25916bc into linux-nvme:master Sep 25, 2023
11 checks passed
@igaw
Copy link
Collaborator

igaw commented Sep 25, 2023

Thanks a lot!

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