netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>, <davem@davemloft.net>,
	<pabeni@redhat.com>, <edumazet@google.com>,
	<netdev@vger.kernel.org>, <jacob.e.keller@intel.com>,
	<vaishnavi.tipireddy@intel.com>, <horms@kernel.org>,
	<leon@kernel.org>, <corbet@lwn.net>, <linux-doc@vger.kernel.org>,
	<rdunlap@infradead.org>
Subject: Re: [PATCH net-next v4 5/5] ice: add documentation for FW logging
Date: Tue, 10 Oct 2023 18:18:32 -0700	[thread overview]
Message-ID: <20231010181832.176d9e2b@kernel.org> (raw)
In-Reply-To: <bc8fe848-b590-fa4c-cc6b-5ccdf89ce0fa@intel.com>

On Tue, 10 Oct 2023 16:00:13 -0700 Paul M Stillwell Jr wrote:
> >> +Retrieving FW log data
> >> +~~~~~~~~~~~~~~~~~~~~~~
> >> +The FW log data can be retrieved by reading from 'fwlog/data'. The user can
> >> +write to 'fwlog/data' to clear the data. The data can only be cleared when FW
> >> +logging is disabled.  
> > 
> > Oh, now it sounds like only one thing can be enabled at a time.
> > Can you clarify?
> >   
> 
> What I'm trying to describe here is a mechanism to read all the data 
> (whatever modules have been enabled) as it's coming in and to also be 
> able to clear the data in case the user wants to start fresh (by writing 
> 0 to the file). Does that make sense?

Yes that part does.

> I probably wasn't clear in the 
> previous section that the user can enable many modules at the same time.

Probably best if you describe enabling of multiple modules in the
example. I'm not sure how one disables a module with the current API.

> > Why 4K? The number of buffers is irrelevant to the user, why not let
> > the user configure the size in bytes (which his how much DRAM the
> > driver will hold hostage)?  
> 
> I'm trying to keep the numbers small for the user :). I could say 
> 1048576 bytes (256 x 4096), but those kinds of numbers get unwieldy to a 
> user (IMO).

echo $((256 * 4096)) >> $the_file

But also...

> The FW logs generate a LOT of data depending on what modules are enabled 
> so we typically need a lot of buffers to handle them.
> 
> In the past we have tried to use the syslog mechanism, but we generate 
> SO much data that we overwhelm that and lose data. That's why the idea 
> of using static buffers is appealing to us. We could still overrun the 
> buffers, but at least we will have contiguous data. The problem then 
> becomes one of allocating enough space for what the user is trying to 
> catch instead of trying to start/stop logging and hoping you get all the 
> events in the log.
> 
> I can drop the mention of 4K buffers in the documentation. Or we could 
> use terms like 1M, 2M, 512K, et al. That would require string parsing in 
> the driver though and I'm trying to avoid that if possible. What do you 
> think?

.. I thought such helpers already existed.

  reply	other threads:[~2023-10-11  1:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 17:01 [PATCH net-next v4 0/5][pull request] add v2 FW logging for ice driver Tony Nguyen
2023-10-05 17:01 ` [PATCH net-next v4 1/5] ice: remove FW logging code Tony Nguyen
2023-10-05 17:01 ` [PATCH net-next v4 2/5] ice: configure FW logging Tony Nguyen
2023-10-07  0:02   ` Jakub Kicinski
2023-10-10 23:26     ` Paul M Stillwell Jr
2023-10-11  2:01       ` Jakub Kicinski
2023-10-12  0:40         ` Paul M Stillwell Jr
2023-10-12 23:40           ` Jakub Kicinski
2023-10-17 20:38             ` Paul M Stillwell Jr
2023-10-05 17:01 ` [PATCH net-next v4 3/5] ice: enable " Tony Nguyen
2023-10-05 17:01 ` [PATCH net-next v4 4/5] ice: add ability to read FW log data and configure the number of log buffers Tony Nguyen
2023-10-05 17:01 ` [PATCH net-next v4 5/5] ice: add documentation for FW logging Tony Nguyen
2023-10-06 23:46   ` Jakub Kicinski
2023-10-10 23:00     ` Paul M Stillwell Jr
2023-10-11  1:18       ` Jakub Kicinski [this message]
2023-10-12  0:43         ` Paul M Stillwell Jr

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=20231010181832.176d9e2b@kernel.org \
    --to=kuba@kernel.org \
    --cc=anthony.l.nguyen@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=leon@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paul.m.stillwell.jr@intel.com \
    --cc=rdunlap@infradead.org \
    --cc=vaishnavi.tipireddy@intel.com \
    /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).