netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jacob Keller <jacob.e.keller@intel.com>,
	netdev@vger.kernel.org, Jiri Pirko <jiri@resnulli.us>
Cc: Shannon Nelson <snelson@pensando.io>
Subject: Re: [iproute2-next v3] devlink: display elapsed time during flash update
Date: Sat, 17 Oct 2020 09:34:53 -0600	[thread overview]
Message-ID: <f510e3b5-b856-e1a0-3c2b-149b85f9588f@gmail.com> (raw)
In-Reply-To: <20201014223104.3494850-1-jacob.e.keller@intel.com>

On 10/14/20 4:31 PM, Jacob Keller wrote:
> 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>
> ---
> Changes since v2
> * use clock_gettime on CLOCK_MONOTONIC instead of gettimeofday
> * remove use of timersub since we're now using struct timespec
> 
>  devlink/devlink.c | 105 +++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 104 insertions(+), 1 deletion(-)
> 

applied to iproute2-next.

The DEVLINK attributes are ridiculously long --
DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT is 40 characters -- which
forces really long code lines or oddly wrapped lines. Going forward
please consider abbreviations on name components to reduce their lengths.

  parent reply	other threads:[~2020-10-17 15:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 22:31 [iproute2-next v3] devlink: display elapsed time during flash update Jacob Keller
2020-10-15 17:11 ` Jiri Pirko
2020-10-17 15:34 ` David Ahern [this message]
2020-10-19 19:05   ` Keller, Jacob E
2020-10-19 19:20     ` Jakub Kicinski
2020-10-20  3:21       ` David Ahern
2020-10-20  6:45     ` Jiri Pirko
2020-10-20 14:32       ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f510e3b5-b856-e1a0-3c2b-149b85f9588f@gmail.com \
    --to=dsahern@gmail.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=snelson@pensando.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).