-
Notifications
You must be signed in to change notification settings - Fork 668
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
Conversation
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. |
nvme-print-json.c
Outdated
@@ -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)); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
I've rebased your PR, the build works again. |
e8a42ca
to
003ce81
Compare
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]>
215e322
to
b67af14
Compare
@@ -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)); |
There was a problem hiding this comment.
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.
Closing this PR as we want to keep |
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.