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

nvme-print: fix the result of I/O Command Set Profile feature #2713

Closed

Conversation

francispravin5
Copy link
Contributor

The Get Features command submitted for I/O Command Set Profile feature will return the I/O Command Set Combination Index [08:00] in Dword0 of completion queue entry. So, fixed the mask of the result.

@igaw
Copy link
Collaborator

igaw commented Feb 17, 2025

I've just updated the cross build containers, thus the newer build chain is complaining. I am fixing this up, so don't worry abou these.

@@ -3518,7 +3518,7 @@ static void json_feature_show_fields_endurance_evt_cfg(struct json_object *r, un

static void json_feature_show_fields_iocs_profile(struct json_object *r, unsigned int result)
{
obj_add_str(r, "I/O Command Set Profile", result & 0x1 ? "True" : "False");
obj_add_uint(r, "I/O Command Set Profile", NVME_GET(result, FEAT_IOCSP_IOCSCI));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would leave the True/False in place to avoid any compatibility issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@igaw Do you want to keep both json prints or True/False only?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, the output format should not change if possible, so we don't break any existing parser.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@igaw Addressed the review comment.
Thanks!

@igaw
Copy link
Collaborator

igaw commented Feb 17, 2025

I've just updated the cross build containers, thus the newer build chain is complaining. I am fixing this up, so don't worry abou these.

I've rebased your PR, the build works again.

The Get Features command submitted for I/O Command Set Profile feature
will return the I/O Command Set Combination Index [08:00] in Dword0 of
completion queue entry. So, fixed the mask of the result.

Signed-off-by: Francis Pravin <[email protected]>
@@ -5034,7 +5034,7 @@ static void stdout_feature_show_fields(enum nvme_features_id fid,
printf("\tEndurance Group Critical Warnings : %u\n", NVME_FEAT_EG_EGCW(result));
break;
case NVME_FEAT_FID_IOCS_PROFILE:
printf("\tI/O Command Set Profile: %s\n", result & 0x1 ? "True" : "False");
printf("\tI/O Command Set Profile: %u\n", NVME_GET(result, FEAT_IOCSP_IOCSCI));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please, keep the True/False in place. There other parts in the print function use these strings as well.

@francispravin5
Copy link
Contributor Author

Closing this PR as we want to keep True/False in place to avoid any compatibility issues and we don't break any existing parser
Thanks!

@francispravin5 francispravin5 deleted the feature_iocsp branch February 27, 2025 10:55
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