public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: PCI: Document decoding of TLP Header in AER messages
@ 2026-03-23  6:52 Lukas Wunner
  2026-03-23 11:03 ` Mika Westerberg
  2026-03-23 16:50 ` Bjorn Helgaas
  0 siblings, 2 replies; 8+ messages in thread
From: Lukas Wunner @ 2026-03-23  6:52 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Jonathan Corbet, linux-pci, linux-doc, Mika Westerberg,
	Ilpo Jarvinen, Maciej Grochowski, Kai-Heng Feng

The prefix/header of the TLP that caused an error is recorded by the Root
Complex and emitted to the kernel log in raw hex format.  Document the
existence and usage of tlp-tool, which allows decoding the TLP Header
into human-readable form.

The TLP Header hints at the root cause of an error, yet is often ignored
because of its seeming opaqueness.  Instead, PCIe errors are frequently
worked around by a change in the kernel without fully understanding the
actual source of the problem.  With more documentation on available tools
we'll hopefully come up with better solutions.

There are also wireshark dissectors for TLPs, but it seems they expect a
complete TLP, not just the header, and they cannot grok the hex format
emitted by the kernel directly.  tlp-tool appears to be the most cut and
dried solution out there.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: Maciej Grochowski <mx2pg@pm.me>
---
We could also go one step further and point users to this tool
in a printk_once() message when the first error occurs.
For now, just amending the documentation is probably sufficient.

 Documentation/PCI/pcieaer-howto.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/PCI/pcieaer-howto.rst b/Documentation/PCI/pcieaer-howto.rst
index 3210c47..90fdfdd 100644
--- a/Documentation/PCI/pcieaer-howto.rst
+++ b/Documentation/PCI/pcieaer-howto.rst
@@ -85,6 +85,16 @@ In the example, 'Requester ID' means the ID of the device that sent
 the error message to the Root Port. Please refer to PCIe specs for other
 fields.
 
+The 'TLP Header' is the prefix/header of the TLP that caused the error
+in raw hex format. To decode the TLP Header into human-readable form
+one may use tlp-tool:
+
+https://github.com/mmpg-x86/tlp-tool
+
+Example usage::
+
+  curl -L https://git.kernel.org/linus/2ca1c94ce0b6 | rtlp-tool --aer
+
 AER Ratelimits
 --------------
 
-- 
2.51.0


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

end of thread, other threads:[~2026-03-25  5:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23  6:52 [PATCH] Documentation: PCI: Document decoding of TLP Header in AER messages Lukas Wunner
2026-03-23 11:03 ` Mika Westerberg
2026-03-23 16:50 ` Bjorn Helgaas
2026-03-24  5:53   ` mx2pg
2026-03-24 10:09     ` Lukas Wunner
2026-03-24 10:22       ` Lukas Wunner
2026-03-24 11:18     ` Ilpo Järvinen
2026-03-25  5:18       ` mx2pg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox