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 } }
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -526,6 +526,8 @@ enum devlink_attr { · 525 unmodified lines | |||
| 526 | DEVLINK_ATTR_RELOAD_STATS_LIMIT, /* u8 */ | 526 | DEVLINK_ATTR_RELOAD_STATS_LIMIT, /* u8 */ |
| 527 | DEVLINK_ATTR_RELOAD_STATS_VALUE, /* u32 */ | 527 | DEVLINK_ATTR_RELOAD_STATS_VALUE, /* u32 */ |
| 528 | DEVLINK_ATTR_REMOTE_RELOAD_STATS, /* nested */ | 528 | DEVLINK_ATTR_REMOTE_RELOAD_STATS, /* nested */ |
| 529 | DEVLINK_ATTR_RELOAD_ACTION_INFO, /* nested */ | ||
| 530 | DEVLINK_ATTR_RELOAD_ACTION_STATS, /* nested */ | ||
| 529 | 531 | ||
| 530 | /* add new attributes above here, update the policy in devlink.c */ | 532 | /* add new attributes above here, update the policy in devlink.c */ |
| 531 | 533 | ||