Re: [PATCH net] devlink: Fix reload stats structure

From: Moshe Shemesh
Date: Mon Nov 23 2020 - 00:23:31 EST



On 11/22/2020 12:53 AM, Jakub Kicinski wrote:
External email: Use caution opening links or attachments


On Fri, 20 Nov 2020 15:40:37 +0200 Moshe Shemesh wrote:
Fix reload stats structure exposed to the user. Change stats structure
hierarchy to have the reload action as a parent of the stat entry and
then stat entry includes value per limit. This will also help to avoid
string concatenation on iproute2 output.

Reload stats structure before this fix:
"stats": {
"reload": {
"driver_reinit": 2,
"fw_activate": 1,
"fw_activate_no_reset": 0
}
}

After this fix:
"stats": {
"reload": {
"driver_reinit": {
"unspecified": 2
},
"fw_activate": {
"unspecified": 1,
"no_reset": 0
}
}

Fixes: a254c264267e ("devlink: Add reload stats")
Signed-off-by: Moshe Shemesh <moshe@xxxxxxxxxxxx>
Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxx>
At least try to fold the core networking code at 80 characters *please*.

You folded the comments at 86 chars, neither 100 nor 80.


Oh, I missed that comment folding while replacing it in this patch. I will fix, thanks.