Re: [PATCH 10/10] perf hisi-ptt: Add decoder version compatibility
From: Bjorn Helgaas
Date: Mon Jul 13 2026 - 13:50:25 EST
On Thu, Jun 04, 2026 at 03:50:05PM +0800, Sizhe Liu wrote:
> The hisi_ptt packet decoder now performs detailed field-level parsing
> of TLP header DW2 and DW3 based on the message type classified from
> DW0 (added in the previous patches). However, trace data recorded
> with older versions of the tool does not contain the information
> needed for this detailed parsing, and should continue to use the
> generic field-name-only output.
Add blank line between paragraphs. Also applies to 05/10.
> Introduce a version field (V1/V2) in the auxtrace info record to
> distinguish between the two data formats:
IMO a blank line here would also improve readability. And consider
indenting bullet points a couple spaces. Also applies to other commit
logs in this series, including sample formats.
> - V1 (legacy): auxtrace priv contains only PMU type. DW2 and DW3
> are printed with generic field names only, no message-type-based
> field decoding.
> - V2 (current): auxtrace priv contains PMU type and version. DW2
> and DW3 are decoded according to the TLP message type (MWr, Msg,
> Atomic, IO, CPL, Cfg) with detailed field names.
Could use imperative mood, e.g.,
- V1 (legacy): auxtrace priv contains only PMU type. Print DW2 and
DW3 generic field names only, no message-type-based field
decoding.
- V2 (current): auxtrace priv contains PMU type and version. Decode
DW2 and DW3 according to the TLP message type (MWr, Msg, Atomic,
IO, CPL, Cfg) with detailed field names.
> At recording time, set the version to HISI_PTT_DECODER_V2 in the
> auxtrace info. At decoding time, determine the version from the
> priv data size and the version field:
> - If priv_size >= V2, read the version from priv[1].
> - If priv_size < V2, assume V1 for backward compatibility.
> - If version is unknown (future), warn and decode auxtrace as v2.
>
> Also add the version to the dump output alongside the PMU type.
> Adjust hisi_ptt_pkt_size position to adapt to compilation.
AFAICS this series adds new functionality and probably doesn't qualify
for "stable" tags, given the documented rules. But I think the
maintainers are pretty aggressive about backporting things anyway.