nvme-print: fix the result of I/O Command Set Profile feature#2713
nvme-print: fix the result of I/O Command Set Profile feature#2713francispravin5 wants to merge 1 commit intolinux-nvme:masterfrom
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
| 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.
I would leave the True/False in place to avoid any compatibility issues.
There was a problem hiding this comment.
@igaw Do you want to keep both json prints or True/False only?
There was a problem hiding this comment.
Yes, the output format should not change if possible, so we don't break any existing parser.
There was a problem hiding this comment.
@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 <francis.p@samsung.com>
215e322 to
b67af14
Compare
| 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.
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.