Message ID | 1602050457-21700-1-git-send-email-moshe@mellanox.com |
---|---|
Headers | show |
Series | Add devlink reload action and limit options | expand |
Wed, Oct 07, 2020 at 08:00:45AM CEST, moshe@mellanox.com wrote: >Add reload stats to hold the history per reload action type and limit. > >For example, the number of times fw_activate has been performed on this >device since the driver module was added or if the firmware activation >was performed with or without reset. > >Add devlink notification on stats update. > >Expose devlink 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 >pci/0000:82:00.1: > stats: > reload: > driver_reinit 1 fw_activate 0 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 > } > } > }, > "pci/0000:82:00.1": { > "stats": { > "reload": { > "driver_reinit": 1, > "fw_activate": 0, > "fw_activate_no_reset": 0 > } > } > } > } >} > >Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Wed, Oct 07, 2020 at 08:00:46AM CEST, moshe@mellanox.com wrote: >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 > } > } > } > } >} > >Signed-off-by: Moshe Shemesh <moshe@mellanox.com> >Reviewed-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
On Wed, 7 Oct 2020 09:00:41 +0300 Moshe Shemesh wrote: > Introduce new options on devlink reload API to enable the user to select > the reload action required and constrains limits on these actions that he > may want to ensure. Complete support for reload actions in mlx5. > The following reload actions are supported: > driver_reinit: driver entities re-initialization, applying devlink-param > and devlink-resource values. > fw_activate: firmware activate. Applied, thanks everyone!