All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/5][pull request] add v2 FW logging for ice driver
@ 2023-08-15 16:57 Tony Nguyen
  2023-08-15 16:57 ` [PATCH net-next v3 1/5] ice: remove FW logging code Tony Nguyen
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Tony Nguyen @ 2023-08-15 16:57 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet, netdev
  Cc: Tony Nguyen, paul.m.stillwell.jr, jacob.e.keller, horms

Paul Stillwell says:

Firmware (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.

The interface for FW logging is debugfs. This was chosen based on a
discussion here:
https://lore.kernel.org/netdev/20230214180712.53fc8ba2@kernel.org/
We talked about using devlink in a variety of ways, but none of those
options made any sense for the way the FW reports data. We briefly talked
about using ethtool, but that seemed to go by the wayside. Ultimately it
seems like using debugfs is the way to go so re-implement the code to use
that.

FW logging is across all the PFs on the device so restrict the commands to
only PF0.

If FW logging is supported then a directory named 'fwlog' will be created
under '/sys/kernel/debug/ice/<pci_dev>'. A variety of files will be created
to manage the behavior of logging. The following files will be created:
- modules
- resolution
- enable
- nr_buffs
- data

where modules is used to read/write the configuration for FW logging

resolution is used to determine how often to send FW logging events to the
driver

enable is used to start/stop FW logging. This is a boolean value so only 1
or 0 are permissible values

nr_buffs is used to configure the number of data buffers the driver uses
for log data

data is used to read/clear the log data

Generally there is a lot of data and dumping that data to syslog will
result in a loss of data. This causes problems when decoding the data and
the user doesn't know that data is missing until later. Instead of dumping
the FW log output to syslog use debugfs. This ensures that all the data the
driver has gets retrieved correctly.

The FW log data is binary data that the FW team decodes to determine what
happened in firmware. The binary blob is sent to Intel for decoding.
---
v3:
- Adjust error path cleanup in ice_module_init() for unreachable code.

v2: https://lore.kernel.org/netdev/20230810170109.1963832-1-anthony.l.nguyen@intel.com/
- Rewrote code to use debugfs instead of devlink

v1: https://lore.kernel.org/netdev/20230209190702.3638688-1-anthony.l.nguyen@intel.com/

Previous discussion:
https://lore.kernel.org/netdev/fea3e7bc-db75-ce15-1330-d80483267ee2@intel.com/

The following are changes since commit 479b322ee6feaff612285a0e7f22c022e8cd84eb:
  net: dsa: mv88e6060: add phylink_get_caps implementation
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: configure FW logging
  ice: enable FW logging
  ice: add ability to read FW log data and configure the number of log
    buffers
  ice: add documentation for FW logging

 .../device_drivers/ethernet/intel/ice.rst     | 117 +++
 drivers/net/ethernet/intel/ice/Makefile       |   4 +-
 drivers/net/ethernet/intel/ice/ice.h          |  18 +
 .../net/ethernet/intel/ice/ice_adminq_cmd.h   | 161 ++--
 drivers/net/ethernet/intel/ice/ice_common.c   | 219 +----
 drivers/net/ethernet/intel/ice/ice_common.h   |   1 -
 drivers/net/ethernet/intel/ice/ice_debugfs.c  | 807 ++++++++++++++++++
 drivers/net/ethernet/intel/ice/ice_fwlog.c    | 450 ++++++++++
 drivers/net/ethernet/intel/ice/ice_fwlog.h    |  78 ++
 drivers/net/ethernet/intel/ice/ice_main.c     |  51 +-
 drivers/net/ethernet/intel/ice/ice_type.h     |  23 +-
 11 files changed, 1614 insertions(+), 315 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


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2023-08-23 22:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15 16:57 [PATCH net-next v3 0/5][pull request] add v2 FW logging for ice driver Tony Nguyen
2023-08-15 16:57 ` [PATCH net-next v3 1/5] ice: remove FW logging code Tony Nguyen
2023-08-15 18:34   ` Leon Romanovsky
2023-08-15 16:57 ` [PATCH net-next v3 2/5] ice: configure FW logging Tony Nguyen
2023-08-15 18:38   ` Leon Romanovsky
2023-08-17 21:25     ` Paul M Stillwell Jr
2023-08-18 11:10       ` Leon Romanovsky
2023-08-18 12:31         ` Przemek Kitszel
2023-08-21 23:20           ` Paul M Stillwell Jr
2023-08-22  7:33             ` Przemek Kitszel
2023-08-22 20:44             ` Keller, Jacob E
2023-08-22 20:58               ` Paul M Stillwell Jr
2023-08-22 21:16                 ` Paul M Stillwell Jr
2023-08-22 20:45             ` Keller, Jacob E
2023-08-22 20:59               ` Paul M Stillwell Jr
2023-08-23 22:23     ` Paul M Stillwell Jr
2023-08-15 16:57 ` [PATCH net-next v3 3/5] ice: enable " Tony Nguyen
2023-08-15 16:57 ` [PATCH net-next v3 4/5] ice: add ability to read FW log data and configure the number of log buffers Tony Nguyen
2023-08-15 16:57 ` [PATCH net-next v3 5/5] ice: add documentation for FW logging Tony Nguyen
2023-08-16 22:43   ` Randy Dunlap
2023-08-23 22:25     ` Paul M Stillwell Jr

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.