[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230209190702.3638688-1-anthony.l.nguyen@intel.com>
Date: Thu, 9 Feb 2023 11:06:57 -0800
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com
Cc: Tony Nguyen <anthony.l.nguyen@...el.com>, netdev@...r.kernel.org,
paul.m.stillwell.jr@...el.com, jacob.e.keller@...el.com,
jiri@...dia.com, idosch@...sch.org
Subject: [PATCH net-next 0/5][pull request] add v2 FW logging for ice driver
Paul Stillwell says:
FW log support was added to the ice driver, but that version is no
longer supported. There is a newer version of FW logging (v2) that
adds more control knobs to get the exact data out of the FW
for debugging.
Additionally, instead of dumping the FW log output to syslog,
dump it to debugfs. The FW log data is really just binary
data that the FW log team decodes to determine what happens so the
translation from binary to some text output just slows things down
and results in potential dropped data. The structure for the debugfs
entry is: /sys/kernel/debug/ice/<pci device>/fwlog
Once enabled the FW log data is received as ARQ events that the driver
processes.
The FW logging is across all the PFs on the device, so restrict the
commands to only PF0.
The following new device parameters are added:
- fwlog_supported (read-only): does the FW support FW logging
- fwlog_enabled (read/write): is FW logging currently running
- fwlog_level (read/write): the log level enabled, valid values are
Each level includes the messages from the previous/lower level
0 - no logging
1 - error logging
2 - warning logging
3 - normal logging
4 - verbose logging
- fwlog_resolution (read/write): the number of log messages to included
in a single ARQ event. The range is 1-128 (1 means push every log
message, 128 means push only when the max AQ command buffer is full).
The suggested value is 10.
This patch series adds the following set of devlink commands:
devlink dev param set <pci dev> name fwlog_enabled value <true/false> cmode runtime
devlink dev param set <pci dev> name fwlog_level value <0-4> cmode runtime
devlink dev param set <pci dev> name fwlog_resolution value <1-128> cmode runtime
---
Previous discussion:
https://lore.kernel.org/netdev/fea3e7bc-db75-ce15-1330-d80483267ee2@intel.com/
The following are changes since commit 5131a053f2927158fb42880c69b5dc0d2e28ddee:
Merge tag 'linux-can-next-for-6.3-20230208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 100GbE
Paul M Stillwell Jr (5):
ice: remove FW logging code
ice: enable devlink to check FW logging status
ice: add ability to query/set FW log level and resolution
ice: disable FW logging on driver unload
ice: use debugfs to output FW log data
Documentation/networking/devlink/ice.rst | 39 ++
drivers/net/ethernet/intel/ice/Makefile | 5 +-
drivers/net/ethernet/intel/ice/ice.h | 22 ++
.../net/ethernet/intel/ice/ice_adminq_cmd.h | 160 ++++----
drivers/net/ethernet/intel/ice/ice_common.c | 218 +----------
drivers/net/ethernet/intel/ice/ice_common.h | 1 -
drivers/net/ethernet/intel/ice/ice_debugfs.c | 116 ++++++
drivers/net/ethernet/intel/ice/ice_devlink.c | 181 ++++++++-
drivers/net/ethernet/intel/ice/ice_fwlog.c | 367 ++++++++++++++++++
drivers/net/ethernet/intel/ice/ice_fwlog.h | 57 +++
drivers/net/ethernet/intel/ice/ice_main.c | 101 ++++-
drivers/net/ethernet/intel/ice/ice_type.h | 23 +-
12 files changed, 973 insertions(+), 317 deletions(-)
create mode 100644 drivers/net/ethernet/intel/ice/ice_debugfs.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_fwlog.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_fwlog.h
--
2.38.1
Powered by blists - more mailing lists