]> git.proxmox.com Git - mirror_iproute2.git/commit
devlink: display elapsed time during flash update
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 14 Oct 2020 22:31:04 +0000 (15:31 -0700)
committerDavid Ahern <dsahern@gmail.com>
Sat, 17 Oct 2020 15:30:06 +0000 (09:30 -0600)
commit3342688a6645cbe8d15a3ebd89a38cea637f969b
treed03f3adcd30a721c470d78930db5701c665d02e4
parentb5a583fb32950aaad62ddefa64f791ab432e30e3
devlink: display elapsed time during flash update

For some devices, updating the flash can take significant time during
operations where no status can meaningfully be reported. This can be
somewhat confusing to a user who sees devlink appear to hang on the
terminal waiting for the device to update.

Recent changes to the kernel interface allow such long running commands
to provide a timeout value indicating some upper bound on how long the
relevant action could take.

Provide a ticking counter of the time elapsed since the previous status
message in order to make it clear that the program is not simply stuck.

Display this message whenever the status message from the kernel
indicates a timeout value. Additionally also display the message if
we've received no status for more than couple of seconds. If we elapse
more than the timeout provided by the status message, replace the
timeout display with "timeout reached".

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
devlink/devlink.c