Re: [PATCH 10/10] perf hisi-ptt: Add decoder version compatibility
From: Sizhe Liu
Date: Wed Jul 29 2026 - 04:21:18 EST
On 2026/7/14 1:49, Bjorn Helgaas wrote:
On Thu, Jun 04, 2026 at 03:50:05PM +0800, Sizhe Liu wrote:Thanks, all the preceding suggestions will be modified in v2.
The hisi_ptt packet decoder now performs detailed field-level parsingAdd blank line between paragraphs. Also applies to 05/10.
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.
Introduce a version field (V1/V2) in the auxtrace info record toIMO a blank line here would also improve readability. And consider
distinguish between the two data formats:
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 DW3Could use imperative mood, e.g.,
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.
- 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.
Hi Bjorn,At recording time, set the version to HISI_PTT_DECODER_V2 in theAFAICS this series adds new functionality and probably doesn't qualify
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.
for "stable" tags, given the documented rules. But I think the
maintainers are pretty aggressive about backporting things anyway.
Thanks for your response and for clarifying the policy regarding the stable tag.
You're right, patches 03-10 in this series are new functionality and shouldwait
for the next merge window.
For patch 01 and patch 02, they do fix the issue of inaccurate packet parsing,
I think it is better to separate them from the patch series.
I am sending them individually after fixing the C bitfields issues if that makes things clearer.
If you have any suggestions on this split, please feel free to let me know.
Regards,
Sizhe