All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Cree <ecree.xilinx@gmail.com>
To: netdev@vger.kernel.org
Subject: [RFG] sfc: nvlog and devlink health
Date: Tue, 15 Apr 2025 15:51:39 +0100	[thread overview]
Message-ID: <7ec94666-791a-39b2-fffd-eed8b23a869a@gmail.com> (raw)

Solarflare NICs have a flash partition to which the MCPU logs various
 errors, warnings, and other diagnostic info.  We want to expose this
 'nvlog' data, and the best fit we've found so far is devlink health.
Reading it is simple enough — plan is to have a reporter whose diagnose
 method reads the partition and returns the contents (could potentially
 use dump instead but the extra layer of triggering and saving seems
 unnecessary).
The problem is how to clear it (since it fills up after comparatively
 few boots, so when debugging field issues you'll usually need to clear
 it first and then reproduce the issue).
 DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR is no use here, because it only
 clears the kernel-saved copy; it doesn't call any driver method.
The code we've developed internally, that I'm now preparing to submit
 upstream, handles this by having *two* reporters, 'nvlog' and
 'nvlog-clear'; both read the flash in their diagnose method but
 nvlog-clear additionally clears it afterwards.  It works, but it
 doesn't feel very clean.
Is this approach acceptable?  Is there a better way?

-ed

             reply	other threads:[~2025-04-15 14:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-15 14:51 Edward Cree [this message]
2025-04-15 16:41 ` [RFG] sfc: nvlog and devlink health Jiri Pirko
2025-04-16 10:24   ` Edward Cree
2025-04-16 11:27     ` Jiri Pirko
2025-04-22 13:21     ` Przemek Kitszel

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=7ec94666-791a-39b2-fffd-eed8b23a869a@gmail.com \
    --to=ecree.xilinx@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.