-
Notifications
You must be signed in to change notification settings - Fork 662
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
plugins/micron: Added support for OCP telemetry (internal) log parsing. Datacenter NVMe SSD Specification v2.5r9 section 4.9 #2354
plugins/micron: Added support for OCP telemetry (internal) log parsing. Datacenter NVMe SSD Specification v2.5r9 section 4.9 #2354
Conversation
From a quick look, there are coding style issues, please see the output from checkpatch. It should help to identify the issues. |
Fixed the coding style issues. Please review |
You should update the first commit instead of adding a new commit. The reason is that we follow the coding and submission rules from the linux kernel. Thus we are explicitly not allowing the github style submissions. Also the commit message should be properly format and containing some information why you are changing thigns:
After looking at the changes, it contains several unrelated changes in one PR. Please split them up, see the kernel documentation https://docs.kernel.org/process/submitting-patches.html# The checkpatch.pl tool is very unhappy with this change: $ ../linux/scripts/checkpatch.pl -g HEAD
[...]
ERROR: trailing whitespace
#5360: FILE: plugins/micron/micron-utils.h:48:
+ * @return integer value of hexadecimal $
ERROR: "foo* bar" should be "foo *bar"
#5372: FILE: plugins/micron/micron-utils.h:60:
+char* hex_to_ascii(const char *hex);
ERROR: "foo* bar" should be "foo *bar"
#5384: FILE: plugins/micron/micron-utils.h:72:
+unsigned char* read_binary_file(char *data_dir_path, const char *bin_path, long *buffer_size,
WARNING: line length of 104 exceeds 100 columns
#5400: FILE: plugins/micron/micron-utils.h:88:
+ struct json_object *stats, __u8 spec, FILE *fp);
ERROR: Missing Signed-off-by: line by nominal patch author 'Chaithanya shoba <[email protected]>'
total: 230 errors, 877 warnings, 5229 lines checked |
@saskchaithanya |
@saskchaithanya WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 ERROR: "foo* bar" should be "foo bar" ERROR: "foo* bar" should be "foo bar" WARNING: line length of 104 exceeds 100 columns
ERROR: Missing Signed-off-by: line(s) total: 200 errors, 773 warnings, 6430 lines checked |
Thanks @igaw and @Arunpandian15 for the review suggestions. |
Please squash all changes into one patch, there is no need to see the development version of a change. And please no merges into the PR. Thanks. |
Datacenter NVMe SSD Specification v2.5r9.pdf Addressed the review comments and fixed the check-patch issues. |
Fixed the coding-style issues. |
Thanks a lot for the suggestion, Squashed the changes to one patch! |
Fixed check-patch issues and updated the commit message. |
Done, Thanks! |
plugins/micron/micron-utils.c
Outdated
} | ||
|
||
|
||
void print_micron_vs_logs(__u8 *buf, struct micron_vs_logpage *log_page, int field_count, |
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.
Still seems the switch case functions can be split more as below. Thank you.
func_bbb()
{
...
}
func_***()
{
...
}
func_aaa()
{
switch () {
case bbb:
func_bbb();
break;
...
default:
func_***();
break;
}
}
Still checkpatch.pl failed. |
I am in-progress of addressing those issues. Thanks for checking. I will address the issues ASAP! |
Could you please help running checkpatch.pl again. I missed to save the earlier failures? |
The script included by the linux kernel and can be cloned from the repository below.
Also the script can be executed as below for example. tokunori@tokunori-desktop:~/nvme-cli$ ../linux/scripts/checkpatch.pl -g HEAD |
Thanks a lot, for the information! |
Address the checkpatch issues and review comments. |
Almost there. There are some checkpatch complains left, nothing serious. Though clang is not happy:
You can trigger this build locally with $ scripts/build.sh -c clang |
Datacenter NVMe SSD Specification v2.5r9, section 4.9. Signed-off-by: Chaithanya Shoba <[email protected]>
Thanks for the suggestion, Fixed the issues. |
Addressed the checkpatch issues and review comments. |
Thanks! |
Thanks @igaw and all! |
Move OCP internal log parsing from Micron to OCP Plugin.Datacenter NVMe SSD Specification v2.5r9 section 4.9. Previous PR linux-nvme#2354 Signed-off-by: Chaithanya Shoba <[email protected]>
Move OCP internal log parsing from Micron to OCP Plugin. Datacenter NVMe SSD Specification v2.5r9 section 4.9. Previous PR linux-nvme#2354 Signed-off-by: Chaithanya Shoba <[email protected]>
Move OCP internal log parsing from Micron to OCP Plugin. Previous PR linux-nvme#2354. Datacenter NVMe SSD Specification v2.5r9, section 4.9. Signed-off-by: Chaithanya shoba <[email protected]>
Move OCP internal log parsing from Micron to OCP Plugin. Previous PR linux-nvme#2354. Datacenter NVMe SSD Specification v2.5r9, section 4.9. Signed-off-by: Chaithanya shoba <[email protected]>
Move OCP internal log parsing from Micron to OCP Plugin. Previous PR #2354. Datacenter NVMe SSD Specification v2.5r9, section 4.9. Signed-off-by: Chaithanya shoba <[email protected]>
Description:
Added support for OCP telemetry (internal) log parsing as per OCP 2.5 specification - Datacenter NVMe SSD Specification v2.5r9.pdf section 4.9.
The CLI command will take the input binary files (telemetry/internal logs LOG ID 0x07 or 0x08) and string log (0xC9) as inputs and provides a parsed JSON or text file as attached below:
CLI Examples:
$ sudo ./nvme micron ocp-telemetry-log-parse --format=normal --string-log="nvmelog_ocp_c9.bin" --telemetry-log="nvme_host_telemetry_log.bin" --output-file="nvme_cli_telemetry_host_normal.txt" /dev/nvme0
$ sudo ./nvme micron ocp-telemetry-log-parse --format=json --string-log="nvmelog_ocp_c9.bin" --telemetry-log="nvme_host_telemetry_log.bin" --output-file="nvme_cli_telemetry_host_normal.json" /dev/nvme0
$ sudo ./nvme micron ocp-telemetry-log-parse --format=normal --string-log="nvmelog_ocp_c9.bin" --telemetry-log="nvme_host_telemetry_log.bin" > nvme_cli_telemetry_host_console.txt /dev/nvme0
$ sudo ./nvme micron ocp-telemetry-log-parse --format=json --string-log="nvmelog_ocp_c9.bin" --telemetry-log="nvme_host_telemetry_log.bin" > nvme_cli_telemetry_host_console.json /dev/nvme0
Output Files:
nvme_cli_telemetry_host_console.json
nvme_cli_telemetry_host_console.txt
nvme_cli_telemetry_host_normal.json
nvme_cli_telemetry_host_normal.txt