lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da9e41a5-5e0b-adda-5648-f779e8e71fc7@huawei.com>
Date:   Tue, 20 Sep 2022 11:04:17 +0800
From:   Yicong Yang <yangyicong@...wei.com>
To:     Bjorn Helgaas <helgaas@...nel.org>
CC:     <yangyicong@...ilicon.com>, <acme@...nel.org>,
        <peterz@...radead.org>, <alexander.shishkin@...ux.intel.com>,
        <leo.yan@...aro.org>, <james.clark@....com>, <will@...nel.org>,
        <mathieu.poirier@...aro.org>, <mark.rutland@....com>,
        <suzuki.poulose@....com>, <jonathan.cameron@...wei.com>,
        <john.garry@...wei.com>, <mike.leach@...aro.org>,
        <gregkh@...uxfoundation.org>, <lorenzo.pieralisi@....com>,
        <shameerali.kolothum.thodi@...wei.com>, <mingo@...hat.com>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-pci@...r.kernel.org>, <linux-perf-users@...r.kernel.org>,
        <prime.zeng@...wei.com>, <zhangshaokun@...ilicon.com>,
        <linuxarm@...wei.com>, <liuqi6124@...il.com>
Subject: Re: [PATCH v13 3/3] perf tool: Add support for parsing HiSilicon PCIe
 Trace packet

On 2022/9/20 1:32, Bjorn Helgaas wrote:
> On Mon, Sep 19, 2022 at 05:00:45PM +0800, Yicong Yang wrote:
>> From: Qi Liu <liuqi115@...wei.com>
>>
>> Add support for using 'perf report --dump-raw-trace' to parse PTT packet.
>>
>> Example usage:
>>
>> Output will contain raw PTT data and its textual representation, such
>> as:
>>
>> 0 0 0x5810 [0x30]: PERF_RECORD_AUXTRACE size: 0x400000  offset: 0
>> ref: 0xa5d50c725  idx: 0  tid: -1  cpu: 0
>> .
>> . ... HISI PTT data: size 4194304 bytes
>> .  00000000: 00 00 00 00                                 Prefix
>> .  00000004: 08 20 00 60                                 Header DW0
>> .  00000008: ff 02 00 01                                 Header DW1
>> .  0000000c: 20 08 00 00                                 Header DW2
>> .  00000010: 10 e7 44 ab                                 Header DW3
>> .  00000014: 2a a8 1e 01                                 Time
>> .  00000020: 00 00 00 00                                 Prefix
>> .  00000024: 01 00 00 60                                 Header DW0
>> .  00000028: 0f 1e 00 01                                 Header DW1
>> .  0000002c: 04 00 00 00                                 Header DW2
>> .  00000030: 40 00 81 02                                 Header DW3
>> .  00000034: ee 02 00 00                                 Time
> 
> This is great!  Is there a way to actually decode the TLP headers?
> E.g., something along the lines of what this does?
> https://github.com/NetTLP/wireshark-nettlp/blob/master/plugins/nettlp.lua

Thanks for the link, we'd like to implement something similar. This patch brings
fundamental support for the decoding in perf, which means decoding according to
the hardware packets format definition of each fields. 8DW will like above and
4DW will look like (more detailed):

. ... HISI PTT data: size 4194304 bytes
.  00000000: ff 0f 20 40                                 Format 3 Type 1f T9 1 T8 1 TH 1 SO 1 Length 1 Time 201
.  00000004: 0f 10 80 00                                 Header DW1
.  00000008: 00 04 00 00                                 Header DW2
.  0000000c: 48 01 01 00                                 Header DW3

In the next step we intend to do further decoding in the perf report, with granule
to each fields defined in the PCIe spec according to the different TLP's format
and type.

> If there is, it might be nice if the commit log included a hint about
> how to do more decoding.
> 

Since the definition of each Header DWx is exactly the same with the PCIe spec,
so I think user can certainly get the raw data and use the tools like nettlp.lua
to further decode for now.

Thanks,
Yicong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ