Skip to content

Enhance TLP packet decoder with field-level parsing and versioning

Sizhe Liu linux-arm-kernel linux-doc linux-pci linux-perf-users lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 2 repliesIn review
  2. v38 patches 0 repliesSuperseded
  3. v28 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v110 patches4 repliesSuperseded

Changes in v4 from the cover letter

- Add missing space in hisi-ptt.rst (Sashiko).
- Widen the pattern bit field in struct hisi_ptt_trace_ctrl (Sashiko).
- Add protocol defined TLP header length parsing in patch 05/08.
- Add MRd and DMRr message types parsing in patch 05/08.
- Add comment for enum hisi_ptt_pkt_msg_type in patch 05/08.
- Add DW0 and DW1 fields analysing in patch 06/08.
- Refine bit-fields parsing of DW0/DW1/DW2/DW3 based on different requests
in patch 06/08.
- Refine the description of pattern=1 in the document in patch 07/08.
- Extract the bit-field printing of v1 version into functions in
patch 08/08.
- Link to v3: https://lore.kernel.org/linux-pci/[email protected]/

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8perf hisi-ptt: Abstract trace data buf and offsettools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h tools/perf/util/hisi-ptt.c+37 -340 replies
2/8perf hisi-ptt: Complete the field names for 4DW and 8DW packetstools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c+12 -80 replies
3/8perf hisi-ptt: Extract the raw data printing parttools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c+15 -160 replies
4/8perf hisi-ptt: Merge 4DW and 8DW HEAD0 printingtools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c+33 -230 replies
5/8perf hisi-ptt: Add parsing of supported message types and proto lengthtools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h tools/perf/util/hisi-ptt.c+126 -40 replies
6/8perf hisi-ptt: Add field-level parsing for header DW0/DW1/DW2/DW3tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h+545 -350 replies
7/8hwtracing: hisi_ptt: Add pattern PMU config for trace format selectionDocumentation/trace/hisi-ptt.rst drivers/hwtracing/ptt/hisi_ptt.c drivers/hwtracing/ptt/hisi_ptt.h+52 -30 replies
8/8perf hisi-ptt: Pass pattern version to decoder for compatibilitytools/perf/arch/arm64/util/hisi-ptt.c tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h +2 more+133 -530 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchYushan Wang
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/8] Enhance TLP packet decoder with field-level parsing and versioning

The original hisi-ptt-decoder only prints raw hex values with generic field names for DW0/DW1/DW2/DW3, without classifying TLP types or decoding DW0/DW1/DW2/DW3 fields according to the hardware-defined packet format.

This series enhances the HiSilicon PTT (PCIe Trace and Tuning) packet decoder in perf tool to provide detailed field-level parsing of TLP headers based on message type, and adds a versioning mechanism for backward compatibility both in hisi_ptt driver and perf tool.

---
Changes in v4:
- Add missing space in hisi-ptt.rst (Sashiko).
- Widen the pattern bit field in struct hisi_ptt_trace_ctrl (Sashiko).
- Add protocol defined TLP header length parsing in patch 05/08.
- Add MRd and DMRr message types parsing in patch 05/08.
- Add comment for enum hisi_ptt_pkt_msg_type in patch 05/08.
- Add DW0 and DW1 fields analysing in patch 06/08.
- Refine bit-fields parsing of DW0/DW1/DW2/DW3 based on different requests
in patch 06/08.
- Refine the description of pattern=1 in the document in patch 07/08.
- Extract the bit-field printing of v1 version into functions in
patch 08/08.
- Link to v3: https://lore.kernel.org/linux-pci/[email protected]/

Changes in v3:
- Add explicit inclusion of <stdbool.h> (Sashiko).
- Make patch 07/08 apply cleanly to mainline (Yushan).
- Pick up the reviewed-by tag (Yushan).
- Link to v2: https://lore.kernel.org/linux-pci/[email protected]/

Changes in v2:
- Split patch 01/10 and patch 02/10 from series v1 into independent patch series for backporting (Bjorn).
- Use bitwise operations instead of C bitfields for cross-platform cases (Sashiko).
- Add pattern parameter in hisi_ptt driver for layout compatibility.
- Link to v1: https://lore.kernel.org/linux-pci/[email protected]/

---
Sizhe Liu (8):
perf hisi-ptt: Abstract trace data buf and offset
perf hisi-ptt: Complete the field names for 4DW and 8DW packets perf hisi-ptt: Extract the raw data printing part
perf hisi-ptt: Merge 4DW and 8DW HEAD0 printing
perf hisi-ptt: Add parsing of supported message types and proto length perf hisi-ptt: Add field-level parsing for header DW0/DW1/DW2/DW3
hwtracing: hisi_ptt: Add pattern PMU config for trace format selection perf hisi-ptt: Pass pattern version to decoder for compatibility

 Documentation/trace/hisi-ptt.rst              |  26 +-
 drivers/hwtracing/ptt/hisi_ptt.c              |  25 +-
 drivers/hwtracing/ptt/hisi_ptt.h              |   4 +
 tools/perf/arch/arm64/util/hisi-ptt.c         |  18 +
 .../hisi-ptt-decoder/hisi-ptt-pkt-decoder.c   | 593 ++++++++++++++++--
 .../hisi-ptt-decoder/hisi-ptt-pkt-decoder.h   | 241 ++++++-
 tools/perf/util/hisi-ptt.c                    |  51 +-
 tools/perf/util/hisi-ptt.h                    |   9 +-
 8 files changed, 872 insertions(+), 95 deletions(-)
Signature · 1 line
2.33.0