Add remote reload stats to hold the history of actions performed due devlink reload commands initiated by remote host. For example, in case firmware activation with reset finished successfully but was initiated by remote host. The function devlink_remote_reload_actions_performed() is exported to enable drivers update on remote reload actions performed as it was not initiated by their own devlink instance. Expose devlink remote reload stats to the user through devlink dev get command. Examples: $ devlink dev show pci/0000:82:00.0: stats: reload: driver_reinit 2 fw_activate 1 fw_activate_no_reset 0 remote_reload: driver_reinit 0 fw_activate 0 fw_activate_no_reset 0 pci/0000:82:00.1: stats: reload: driver_reinit 1 fw_activate 0 fw_activate_no_reset 0 remote_reload: driver_reinit 1 fw_activate 1 fw_activate_no_reset 0 $ devlink dev show -jp { "dev": { "pci/0000:82:00.0": { "stats": { "reload": { "driver_reinit": 2, "fw_activate": 1, "fw_activate_no_reset": 0 }, "remote_reload": { "driver_reinit": 0, "fw_activate": 0, "fw_activate_no_reset": 0 } } }, "pci/0000:82:00.1": { "stats": { "reload": { "driver_reinit": 1, "fw_activate": 0, "fw_activate_no_reset": 0 }, "remote_reload": { "driver_reinit": 1, "fw_activate": 1, "fw_activate_no_reset": 0 } } } } }
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -525,6 +525,7 @@ enum devlink_attr { · 524 unmodified lines | |||
| 525 | DEVLINK_ATTR_RELOAD_STATS_ENTRY, /* nested */ | 525 | DEVLINK_ATTR_RELOAD_STATS_ENTRY, /* nested */ |
| 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 | 529 | ||
| 529 | /* add new attributes above here, update the policy in devlink.c */ | 530 | /* add new attributes above here, update the policy in devlink.c */ |
| 530 | 531 | ||