driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/6] staging: qlge: Re-writing the debugging features
@ 2020-10-08 11:58 Coiby Xu
  2020-10-08 11:58 ` [PATCH v1 1/6] staging: qlge: Initialize devlink health dump framework for the dlge driver Coiby Xu
                   ` (5 more replies)
  0 siblings, 6 replies; 32+ messages in thread
From: Coiby Xu @ 2020-10-08 11:58 UTC (permalink / raw)
  To: devel; +Cc: Benjamin Poirier, Shung-Hsi Yu

This patch set aims to avoid dumping registers, data structures and
coredump to dmesg and also to reduce the code size of the qlge driver.

As pointed out by Benjamin [1],

> At 2000 lines, qlge_dbg.c alone is larger than some entire ethernet
> drivers. Most of what it does is dump kernel data structures or pci
> memory mapped registers to dmesg. There are better facilities for that.
> My thinking is not simply to delete qlge_dbg.c but to replace it, making
> sure that most of the same information is still available. For data
> structures, crash or drgn can be used; possibly with a script for the
> latter which formats the data. For pci registers, they should be
> included in the ethtool register dump and a patch added to ethtool to
> pretty print them. That's what other drivers like e1000e do. For the
> "coredump", devlink health can be used.

So the debugging features are re-written following Benjamin's advice,
   - dump kernel data structures in drgn
   - use devlink to do coredump which also includes device status and
     general registers

[1] https://lkml.org/lkml/2020/6/30/19

Change since RFC:
 - select NET_DEVLINK in Kconfig [Benjamin Poirier]
 - Don't do a coredump when the interface is down [Shung-Hsi Yu]
 - Remove stray newlines [Benjamin Poirier]
 - force_coredump for devlink
 - Remove mpi_core_to_log which will output the coredump to the kernel
   ring buffer
 - Put drgn script under Documentation [Benjamin Poirier]
 - Rename qlge_health.* to qlge_devlink.*

Coiby Xu (6):
  staging: qlge: Initialize devlink health dump framework for the dlge
    driver
  staging: qlge: coredump via devlink health reporter
  staging: qlge: support force_coredump option for devlink health dump
  staging: qlge: remove mpi_core_to_log which sends coredump to the
    kernel ring buffer
  staging: qlge: clean up debugging code in the QL_ALL_DUMP ifdef land
  staging: qlge: add documentation for debugging qlge

 .../networking/device_drivers/index.rst       |   1 +
 .../device_drivers/qlogic/index.rst           |  18 +
 .../networking/device_drivers/qlogic/qlge.rst | 118 +++
 MAINTAINERS                                   |   6 +
 drivers/staging/qlge/Kconfig                  |   1 +
 drivers/staging/qlge/Makefile                 |   2 +-
 drivers/staging/qlge/qlge.h                   |  94 +--
 drivers/staging/qlge/qlge_dbg.c               | 699 ------------------
 drivers/staging/qlge/qlge_devlink.c           | 164 ++++
 drivers/staging/qlge/qlge_devlink.h           |   8 +
 drivers/staging/qlge/qlge_ethtool.c           |   3 -
 drivers/staging/qlge/qlge_main.c              |  37 +-
 drivers/staging/qlge/qlge_mpi.c               |   6 -
 13 files changed, 355 insertions(+), 802 deletions(-)
 create mode 100644 Documentation/networking/device_drivers/qlogic/index.rst
 create mode 100644 Documentation/networking/device_drivers/qlogic/qlge.rst
 create mode 100644 drivers/staging/qlge/qlge_devlink.c
 create mode 100644 drivers/staging/qlge/qlge_devlink.h

--
2.28.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-10-16 23:16 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08 11:58 [PATCH v1 0/6] staging: qlge: Re-writing the debugging features Coiby Xu
2020-10-08 11:58 ` [PATCH v1 1/6] staging: qlge: Initialize devlink health dump framework for the dlge driver Coiby Xu
2020-10-08 12:22   ` Willem de Bruijn
2020-10-08 12:54     ` Coiby Xu
2020-10-12  8:08     ` Coiby Xu
2020-10-08 13:31   ` Dan Carpenter
2020-10-09  0:12     ` Coiby Xu
2020-10-08 17:45   ` kernel test robot
2020-10-10  7:35   ` Benjamin Poirier
2020-10-10 10:24     ` Coiby Xu
2020-10-10 13:48       ` Benjamin Poirier
2020-10-12 11:24         ` Coiby Xu
2020-10-13  0:37           ` Benjamin Poirier
2020-10-15  3:37             ` Coiby Xu
2020-10-15 11:06               ` Benjamin Poirier
2020-10-16 23:08                 ` Coiby Xu
2020-10-08 11:58 ` [PATCH v1 2/6] staging: qlge: coredump via devlink health reporter Coiby Xu
2020-10-08 13:39   ` Dan Carpenter
2020-10-09  0:14     ` Coiby Xu
2020-10-10  7:48   ` Benjamin Poirier
2020-10-10 10:02     ` Coiby Xu
2020-10-10 13:22       ` Benjamin Poirier
2020-10-12 11:51         ` Coiby Xu
2020-10-13  1:18           ` Benjamin Poirier
2020-10-08 11:58 ` [PATCH v1 3/6] staging: qlge: support force_coredump option for devlink health dump Coiby Xu
2020-10-08 11:58 ` [PATCH v1 4/6] staging: qlge: remove mpi_core_to_log which sends coredump to the kernel ring buffer Coiby Xu
2020-10-08 11:58 ` [PATCH v1 5/6] staging: qlge: clean up debugging code in the QL_ALL_DUMP ifdef land Coiby Xu
2020-10-10  8:01   ` Benjamin Poirier
2020-10-10 10:00     ` Coiby Xu
2020-10-10 13:40       ` Benjamin Poirier
2020-10-12 11:29         ` Coiby Xu
2020-10-08 11:58 ` [PATCH v1 6/6] staging: qlge: add documentation for debugging qlge Coiby Xu

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).