€•s¡Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ"/translations/zh_CN/trace/hisi-ptt”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/zh_TW/trace/hisi-ptt”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/it_IT/trace/hisi-ptt”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/ja_JP/trace/hisi-ptt”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/ko_KR/trace/hisi-ptt”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/pt_BR/trace/hisi-ptt”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/sp_SP/trace/hisi-ptt”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ_”h]”hŒ9/sys/bus/event_source/devices/hisi_ptt_”…””}”hj*sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j h³hÇh´K+hhÝh²hubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒTune”h]”hŒTune”…””}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj@h²hh³hÇh´K.ubhï)”}”(hŒÈPTT tune is designed for monitoring and adjusting PCIe link parameters (events). Currently we support events in 2 classes. The scope of the events covers the PCIe core to which the PTT device belongs.”h]”hŒÈPTT tune is designed for monitoring and adjusting PCIe link parameters (events). Currently we support events in 2 classes. The scope of the events covers the PCIe core to which the PTT device belongs.”…””}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K0hj@h²hubhï)”}”(hŒˆEach event is presented as a file under $(PTT PMU dir)/tune, and a simple open/read/write/close cycle will be used to tune the event. ::”h]”hŒ…Each event is presented as a file under $(PTT PMU dir)/tune, and a simple open/read/write/close cycle will be used to tune the event.”…””}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K4hj@h²hubj )”}”(hŒã$ cd /sys/bus/event_source/devices/hisi_ptt_/tune $ ls qos_tx_cpl qos_tx_np qos_tx_p tx_path_rx_req_alloc_buf_level tx_path_tx_req_alloc_buf_level $ cat qos_tx_dp 1 $ echo 2 > qos_tx_dp $ cat qos_tx_dp 2”h]”hŒã$ cd /sys/bus/event_source/devices/hisi_ptt_/tune $ ls qos_tx_cpl qos_tx_np qos_tx_p tx_path_rx_req_alloc_buf_level tx_path_tx_req_alloc_buf_level $ cat qos_tx_dp 1 $ echo 2 > qos_tx_dp $ cat qos_tx_dp 2”…””}”hjmsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j h³hÇh´K8hj@h²hubhï)”}”(hŒCurrent value (numerical value) of the event can be simply read from the file, and the desired value written to the file to tune.”h]”hŒCurrent value (numerical value) of the event can be simply read from the file, and the desired value written to the file to tune.”…””}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KChj@h²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒ1. Tx Path QoS Control”h]”hŒ1. Tx Path QoS Control”…””}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj‰h²hh³hÇh´KGubhï)”}”(hŒQThe following files are provided to tune the QoS of the tx path of the PCIe core.”h]”hŒQThe following files are provided to tune the QoS of the tx path of the PCIe core.”…””}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KIhj‰h²hubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ(qos_tx_cpl: weight of Tx completion TLPs”h]”hï)”}”(hj±h]”hŒ(qos_tx_cpl: weight of Tx completion TLPs”…””}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KLhj¯ubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hjªh²hh³hÇh´Nubj®)”}”(hŒ'qos_tx_np: weight of Tx non-posted TLPs”h]”hï)”}”(hjÈh]”hŒ'qos_tx_np: weight of Tx non-posted TLPs”…””}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KMhjÆubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hjªh²hh³hÇh´Nubj®)”}”(hŒ#qos_tx_p: weight of Tx posted TLPs ”h]”hï)”}”(hŒ"qos_tx_p: weight of Tx posted TLPs”h]”hŒ"qos_tx_p: weight of Tx posted TLPs”…””}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KNhjÝubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hjªh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j¨h³hÇh´KLhj‰h²hubhï)”}”(hŒëThe weight influences the proportion of certain packets on the PCIe link. For example, for the storage scenario, increase the proportion of the completion packets on the link to enhance the performance as more completions are consumed.”h]”hŒëThe weight influences the proportion of certain packets on the PCIe link. For example, for the storage scenario, increase the proportion of the completion packets on the link to enhance the performance as more completions are consumed.”…””}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KPhj‰h²hubhï)”}”(hŒãThe available tune data of these events is [0, 1, 2]. Writing a negative value will return an error, and out of range values will be converted to 2. Note that the event value just indicates a probable level, but is not precise.”h]”hŒãThe available tune data of these events is [0, 1, 2]. Writing a negative value will return an error, and out of range values will be converted to 2. Note that the event value just indicates a probable level, but is not precise.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KUhj‰h²hubeh}”(h]”Œtx-path-qos-control”ah ]”h"]”Œ1. tx path qos control”ah$]”h&]”uh1hÈhj@h²hh³hÇh´KGubhÉ)”}”(hhh]”(hÎ)”}”(hŒ2. Tx Path Buffer Control”h]”hŒ2. Tx Path Buffer Control”…””}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj!h²hh³hÇh´K[ubhï)”}”(hŒLFollowing files are provided to tune the buffer of tx path of the PCIe core.”h]”hŒLFollowing files are provided to tune the buffer of tx path of the PCIe core.”…””}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K]hj!h²hubj©)”}”(hhh]”(j®)”}”(hŒ-rx_alloc_buf_level: watermark of Rx requested”h]”hï)”}”(hjEh]”hŒ-rx_alloc_buf_level: watermark of Rx requested”…””}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K_hjCubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hj@h²hh³hÇh´Nubj®)”}”(hŒ.tx_alloc_buf_level: watermark of Tx requested ”h]”hï)”}”(hŒ-tx_alloc_buf_level: watermark of Tx requested”h]”hŒ-tx_alloc_buf_level: watermark of Tx requested”…””}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K`hjZubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hj@h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jûjüuh1j¨h³hÇh´K_hj!h²hubhï)”}”(hX¢These events influence the watermark of the buffer allocated for each type. Rx means the inbound while Tx means outbound. The packets will be stored in the buffer first and then transmitted either when the watermark reached or when timed out. For a busy direction, you should increase the related buffer watermark to avoid frequently posting and thus enhance the performance. In most cases just keep the default value.”h]”hX¢These events influence the watermark of the buffer allocated for each type. Rx means the inbound while Tx means outbound. The packets will be stored in the buffer first and then transmitted either when the watermark reached or when timed out. For a busy direction, you should increase the related buffer watermark to avoid frequently posting and thus enhance the performance. In most cases just keep the default value.”…””}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kbhj!h²hubhï)”}”(hŒãThe available tune data of above events is [0, 1, 2]. Writing a negative value will return an error, and out of range values will be converted to 2. Note that the event value just indicates a probable level, but is not precise.”h]”hŒãThe available tune data of above events is [0, 1, 2]. Writing a negative value will return an error, and out of range values will be converted to 2. Note that the event value just indicates a probable level, but is not precise.”…””}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kihj!h²hubeh}”(h]”Œtx-path-buffer-control”ah ]”h"]”Œ2. tx path buffer control”ah$]”h&]”uh1hÈhj@h²hh³hÇh´K[ubeh}”(h]”Œtune”ah ]”h"]”Œtune”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K.ubhÉ)”}”(hhh]”(hÎ)”}”(hŒTrace”h]”hŒTrace”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¤h²hh³hÇh´Koubhï)”}”(hXzPTT trace is designed for dumping the TLP headers to the memory, which can be used to analyze the transactions and usage condition of the PCIe Link. You can choose to filter the traced headers by either Requester ID, or those downstream of a set of Root Ports on the same core of the PTT device. It's also supported to trace the headers of certain type and of certain direction.”h]”hX|PTT trace is designed for dumping the TLP headers to the memory, which can be used to analyze the transactions and usage condition of the PCIe Link. You can choose to filter the traced headers by either Requester ID, or those downstream of a set of Root Ports on the same core of the PTT device. It’s also supported to trace the headers of certain type and of certain direction.”…””}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kqhj¤h²hubhï)”}”(hX1You can use the perf command `perf record` to set the parameters, start trace and get the data. It's also supported to decode the trace data with `perf report`. The control parameters for trace is inputted as event code for each events, which will be further illustrated later. An example usage is like ::”h]”(hŒYou can use the perf command ”…””}”(hjÃh²hh³Nh´NubhŒtitle_reference”“”)”}”(hŒ `perf record`”h]”hŒ perf record”…””}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jËhjÃubhŒj to set the parameters, start trace and get the data. It’s also supported to decode the trace data with ”…””}”(hjÃh²hh³Nh´NubjÌ)”}”(hŒ `perf report`”h]”hŒ perf report”…””}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jËhjÃubhŒ. The control parameters for trace is inputted as event code for each events, which will be further illustrated later. An example usage is like”…””}”(hjÃh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kxhj¤h²hubj )”}”(hŒV$ perf record -e hisi_ptt0_2/filter=0x80001,type=1,direction=1, format=1/ -- sleep 5”h]”hŒV$ perf record -e hisi_ptt0_2/filter=0x80001,type=1,direction=1, format=1/ -- sleep 5”…””}”hj÷sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j h³hÇh´Khj¤h²hubhï)”}”(hŒÂThis will trace the TLP headers downstream root port 0000:00:10.1 (event code for event 'filter' is 0x80001) with type of posted TLP requests, direction of inbound and traced data format of 8DW.”h]”hŒÆThis will trace the TLP headers downstream root port 0000:00:10.1 (event code for event ‘filter’ is 0x80001) with type of posted TLP requests, direction of inbound and traced data format of 8DW.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‚hj¤h²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒ 1. Filter”h]”hŒ 1. Filter”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´K‡ubhï)”}”(hX‡The TLP headers to trace can be filtered by the Root Ports or the Requester ID of the Endpoint, which are located on the same core of the PTT device. You can set the filter by specifying the `filter` parameter which is required to start the trace. The parameter value is 20 bit. Bit 19 indicates the filter type. 1 for Root Port filter and 0 for Requester filter. Bit[15:0] indicates the filter value. The value for a Root Port is a mask of the core port id which is calculated from its PCI Slot ID as (slotid & 7) * 2. The value for a Requester is the Requester ID (Device ID of the PCIe function). Bit[18:16] is currently reserved for extension.”h]”(hŒ¿The TLP headers to trace can be filtered by the Root Ports or the Requester ID of the Endpoint, which are located on the same core of the PTT device. You can set the filter by specifying the ”…””}”(hj$h²hh³Nh´NubjÌ)”}”(hŒ`filter`”h]”hŒfilter”…””}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jËhj$ubhXÀ parameter which is required to start the trace. The parameter value is 20 bit. Bit 19 indicates the filter type. 1 for Root Port filter and 0 for Requester filter. Bit[15:0] indicates the filter value. The value for a Root Port is a mask of the core port id which is calculated from its PCI Slot ID as (slotid & 7) * 2. The value for a Requester is the Requester ID (Device ID of the PCIe function). Bit[18:16] is currently reserved for extension.”…””}”(hj$h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‰hjh²hubhï)”}”(hŒÇFor example, if the desired filter is Endpoint function 0000:01:00.1 the filter value will be 0x00101. If the desired filter is Root Port 0000:00:10.0 then then filter value is calculated as 0x80001.”h]”hŒÇFor example, if the desired filter is Endpoint function 0000:01:00.1 the filter value will be 0x00101. If the desired filter is Root Port 0000:00:10.0 then then filter value is calculated as 0x80001.”…””}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K“hjh²hubhï)”}”(hXZThe driver also presents every supported Root Port and Requester filter through sysfs. Each filter will be an individual file with name of its related PCIe device name (domain:bus:device.function). The files of Root Port filters are under $(PTT PMU dir)/root_port_filters and files of Requester filters are under $(PTT PMU dir)/requester_filters.”h]”hXZThe driver also presents every supported Root Port and Requester filter through sysfs. Each filter will be an individual file with name of its related PCIe device name (domain:bus:device.function). The files of Root Port filters are under $(PTT PMU dir)/root_port_filters and files of Requester filters are under $(PTT PMU dir)/requester_filters.”…””}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K—hjh²hubhï)”}”(hXNote that multiple Root Ports can be specified at one time, but only one Endpoint function can be specified in one trace. Specifying both Root Port and function at the same time is not supported. Driver maintains a list of available filters and will check the invalid inputs.”h]”hXNote that multiple Root Ports can be specified at one time, but only one Endpoint function can be specified in one trace. Specifying both Root Port and function at the same time is not supported. Driver maintains a list of available filters and will check the invalid inputs.”…””}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjh²hubhï)”}”(hŒ¹The available filters will be dynamically updated, which means you will always get correct filter information when hotplug events happen, or when you manually remove/rescan the devices.”h]”hŒ¹The available filters will be dynamically updated, which means you will always get correct filter information when hotplug events happen, or when you manually remove/rescan the devices.”…””}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¢hjh²hubeh}”(h]”Œfilter”ah ]”h"]”Œ 1. filter”ah$]”h&]”uh1hÈhj¤h²hh³hÇh´K‡ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ2. Type”h]”hŒ2. Type”…””}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj„h²hh³hÇh´K§ubhï)”}”(hŒÒYou can trace the TLP headers of certain types by specifying the `type` parameter, which is required to start the trace. The parameter value is 8 bit. Current supported types and related values are shown below:”h]”(hŒAYou can trace the TLP headers of certain types by specifying the ”…””}”(hj•h²hh³Nh´NubjÌ)”}”(hŒ`type`”h]”hŒtype”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jËhj•ubhŒ‹ parameter, which is required to start the trace. The parameter value is 8 bit. Current supported types and related values are shown below:”…””}”(hj•h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K©hj„h²hubj©)”}”(hhh]”(j®)”}”(hŒ 8'b00000001: posted requests (P)”h]”hï)”}”(hjºh]”hŒ"8’b00000001: posted requests (P)”…””}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K­hj¸ubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hjµh²hh³hÇh´Nubj®)”}”(hŒ%8'b00000010: non-posted requests (NP)”h]”hï)”}”(hjÑh]”hŒ'8’b00000010: non-posted requests (NP)”…””}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K®hjÏubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hjµh²hh³hÇh´Nubj®)”}”(hŒ8'b00000100: completions (CPL) ”h]”hï)”}”(hŒ8'b00000100: completions (CPL)”h]”hŒ 8’b00000100: completions (CPL)”…””}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¯hjæubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hjµh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jûjüuh1j¨h³hÇh´K­hj„h²hubhï)”}”(hŒ|You can specify multiple types when tracing inbound TLP headers, but can only specify one when tracing outbound TLP headers.”h]”hŒ|You can specify multiple types when tracing inbound TLP headers, but can only specify one when tracing outbound TLP headers.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K±hj„h²hubeh}”(h]”Œtype”ah ]”h"]”Œ2. type”ah$]”h&]”uh1hÈhj¤h²hh³hÇh´K§ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ 3. Direction”h]”hŒ 3. Direction”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´Kµubhï)”}”(hXAYou can trace the TLP headers from certain direction, which is relative to the Root Port or the PCIe core, by specifying the `direction` parameter. This is optional and the default parameter is inbound. The parameter value is 4 bit. When the desired format is 4DW, directions and related values supported are shown below:”h]”(hŒ}You can trace the TLP headers from certain direction, which is relative to the Root Port or the PCIe core, by specifying the ”…””}”(hj+h²hh³Nh´NubjÌ)”}”(hŒ `direction`”h]”hŒ direction”…””}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jËhj+ubhŒ¹ parameter. This is optional and the default parameter is inbound. The parameter value is 4 bit. When the desired format is 4DW, directions and related values supported are shown below:”…””}”(hj+h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K·hjh²hubj©)”}”(hhh]”(j®)”}”(hŒ"4'b0000: inbound TLPs (P, NP, CPL)”h]”hï)”}”(hjPh]”hŒ$4’b0000: inbound TLPs (P, NP, CPL)”…””}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K½hjNubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hjKh²hh³hÇh´Nubj®)”}”(hŒ#4'b0001: outbound TLPs (P, NP, CPL)”h]”hï)”}”(hjgh]”hŒ%4’b0001: outbound TLPs (P, NP, CPL)”…””}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¾hjeubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hjKh²hh³hÇh´Nubj®)”}”(hŒC4'b0010: outbound TLPs (P, NP, CPL) and inbound TLPs (P, NP, CPL B)”h]”hï)”}”(hj~h]”hŒE4’b0010: outbound TLPs (P, NP, CPL) and inbound TLPs (P, NP, CPL B)”…””}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¿hj|ubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hjKh²hh³hÇh´Nubj®)”}”(hŒ=4'b0011: outbound TLPs (P, NP, CPL) and inbound TLPs (CPL A) ”h]”hï)”}”(hŒ<4'b0011: outbound TLPs (P, NP, CPL) and inbound TLPs (CPL A)”h]”hŒ>4’b0011: outbound TLPs (P, NP, CPL) and inbound TLPs (CPL A)”…””}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÀhj“ubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hjKh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jûjüuh1j¨h³hÇh´K½hjh²hubhï)”}”(hŒXWhen the desired format is 8DW, directions and related values supported are shown below:”h]”hŒXWhen the desired format is 8DW, directions and related values supported are shown below:”…””}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÂhjh²hubj©)”}”(hhh]”(j®)”}”(hŒ4'b0000: reserved”h]”hï)”}”(hjÄh]”hŒ4’b0000: reserved”…””}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÅhjÂubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hj¿h²hh³hÇh´Nubj®)”}”(hŒ#4'b0001: outbound TLPs (P, NP, CPL)”h]”hï)”}”(hjÛh]”hŒ%4’b0001: outbound TLPs (P, NP, CPL)”…””}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÆhjÙubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hj¿h²hh³hÇh´Nubj®)”}”(hŒ$4'b0010: inbound TLPs (P, NP, CPL B)”h]”hï)”}”(hjòh]”hŒ&4’b0010: inbound TLPs (P, NP, CPL B)”…””}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÇhjðubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hj¿h²hh³hÇh´Nubj®)”}”(hŒ4'b0011: inbound TLPs (CPL A) ”h]”hï)”}”(hŒ4'b0011: inbound TLPs (CPL A)”h]”hŒ4’b0011: inbound TLPs (CPL A)”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÈhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hj¿h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jûjüuh1j¨h³hÇh´KÅhjh²hubhï)”}”(hŒ2Inbound completions are classified into two types:”h]”hŒ2Inbound completions are classified into two types:”…””}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÊhjh²hubj©)”}”(hhh]”(j®)”}”(hŒXcompletion A (CPL A): completion of CHI/DMA/Native non-posted requests, except for CPL B”h]”hï)”}”(hj8h]”hŒXcompletion A (CPL A): completion of CHI/DMA/Native non-posted requests, except for CPL B”…””}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÌhj6ubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hj3h²hh³hÇh´Nubj®)”}”(hŒQcompletion B (CPL B): completion of DMA remote2local and P2P non-posted requests ”h]”hï)”}”(hŒPcompletion B (CPL B): completion of DMA remote2local and P2P non-posted requests”h]”hŒPcompletion B (CPL B): completion of DMA remote2local and P2P non-posted requests”…””}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÍhjMubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hj3h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jûjüuh1j¨h³hÇh´KÌhjh²hubeh}”(h]”Œ direction”ah ]”h"]”Œ 3. direction”ah$]”h&]”uh1hÈhj¤h²hh³hÇh´KµubhÉ)”}”(hhh]”(hÎ)”}”(hŒ 4. Format”h]”hŒ 4. Format”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjsh²hh³hÇh´KÐubhï)”}”(hŒÐYou can change the format of the traced TLP headers by specifying the `format` parameter. The default format is 4DW. The parameter value is 4 bit. Current supported formats and related values are shown below:”h]”(hŒFYou can change the format of the traced TLP headers by specifying the ”…””}”(hj„h²hh³Nh´NubjÌ)”}”(hŒ`format`”h]”hŒformat”…””}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jËhj„ubhŒ‚ parameter. The default format is 4DW. The parameter value is 4 bit. Current supported formats and related values are shown below:”…””}”(hj„h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÒhjsh²hubj©)”}”(hhh]”(j®)”}”(hŒ"4'b0000: 4DW length per TLP header”h]”hï)”}”(hj©h]”hŒ$4’b0000: 4DW length per TLP header”…””}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÖhj§ubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hj¤h²hh³hÇh´Nubj®)”}”(hŒ#4'b0001: 8DW length per TLP header ”h]”hï)”}”(hŒ"4'b0001: 8DW length per TLP header”h]”hŒ$4’b0001: 8DW length per TLP header”…””}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K×hj¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1j­hj¤h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jûjüuh1j¨h³hÇh´KÖhjsh²hubhï)”}”(hŒAThe traced TLP header format is different from the PCIe standard.”h]”hŒAThe traced TLP header format is different from the PCIe standard.”…””}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÙhjsh²hubhï)”}”(hXWhen using the 8DW data format, the entire TLP header is logged (Header DW0-3 shown below). For example, the TLP header for Memory Reads with 64-bit addresses is shown in PCIe r5.0, Figure 2-17; the header for Configuration Requests is shown in Figure 2.20, etc.”h]”hXWhen using the 8DW data format, the entire TLP header is logged (Header DW0-3 shown below). For example, the TLP header for Memory Reads with 64-bit addresses is shown in PCIe r5.0, Figure 2-17; the header for Configuration Requests is shown in Figure 2.20, etc.”…””}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÛhjsh²hubhï)”}”(hŒ¨In addition, 8DW trace buffer entries contain a timestamp and possibly a prefix for a PASID TLP prefix (see Figure 6-20, PCIe r5.0). Otherwise this field will be all 0.”h]”hŒ¨In addition, 8DW trace buffer entries contain a timestamp and possibly a prefix for a PASID TLP prefix (see Figure 6-20, PCIe r5.0). Otherwise this field will be all 0.”…””}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kàhjsh²hubhï)”}”(hŒqThe bit[31:11] of DW0 is always 0x1fffff, which can be used to distinguish the data format. 8DW format is like ::”h]”hŒnThe bit[31:11] of DW0 is always 0x1fffff, which can be used to distinguish the data format. 8DW format is like”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kähjsh²hubj )”}”(hXbits [ 31:11 ][ 10:0 ] |---------------------------------------|-------------------| DW0 [ 0x1fffff ][ Reserved (0x7ff) ] DW1 [ Prefix ] DW2 [ Header DW0 ] DW3 [ Header DW1 ] DW4 [ Header DW2 ] DW5 [ Header DW3 ] DW6 [ Reserved (0x0) ] DW7 [ Time ]”h]”hXbits [ 31:11 ][ 10:0 ] |---------------------------------------|-------------------| DW0 [ 0x1fffff ][ Reserved (0x7ff) ] DW1 [ Prefix ] DW2 [ Header DW0 ] DW3 [ Header DW1 ] DW4 [ Header DW2 ] DW5 [ Header DW3 ] DW6 [ Reserved (0x0) ] DW7 [ Time ]”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j h³hÇh´Kèhjsh²hubhï)”}”(hŒÕWhen using the 4DW data format, DW0 of the trace buffer entry contains selected fields of DW0 of the TLP, together with a timestamp. DW1-DW3 of the trace buffer entry contain DW1-DW3 directly from the TLP header.”h]”hŒÕWhen using the 4DW data format, DW0 of the trace buffer entry contains selected fields of DW0 of the TLP, together with a timestamp. DW1-DW3 of the trace buffer entry contain DW1-DW3 directly from the TLP header.”…””}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kóhjsh²hubhï)”}”(hŒ4DW format is like ::”h]”hŒ4DW format is like”…””}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Køhjsh²hubj )”}”(hX‘bits [31:30] [ 29:25 ][24][23][22][21][ 20:11 ][ 10:0 ] |-----|---------|---|---|---|---|-------------|-------------| DW0 [ Fmt ][ Type ][T9][T8][TH][SO][ Length ][ Time ] DW1 [ Header DW1 ] DW2 [ Header DW2 ] DW3 [ Header DW3 ]”h]”hX‘bits [31:30] [ 29:25 ][24][23][22][21][ 20:11 ][ 10:0 ] |-----|---------|---|---|---|---|-------------|-------------| DW0 [ Fmt ][ Type ][T9][T8][TH][SO][ Length ][ Time ] DW1 [ Header DW1 ] DW2 [ Header DW2 ] DW3 [ Header DW3 ]”…””}”hj>sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j h³hÇh´Kûhjsh²hubeh}”(h]”Œformat”ah ]”h"]”Œ 4. format”ah$]”h&]”uh1hÈhj¤h²hh³hÇh´KÐubhÉ)”}”(hhh]”(hÎ)”}”(hŒ5. Memory Management”h]”hŒ5. Memory Management”…””}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjTh²hh³hÇh´Mubhï)”}”(hXThe traced TLP headers will be written to the memory allocated by the driver. The hardware accepts 4 DMA address with same size, and writes the buffer sequentially like below. If DMA addr 3 is finished and the trace is still on, it will return to addr 0. ::”h]”hŒþThe traced TLP headers will be written to the memory allocated by the driver. The hardware accepts 4 DMA address with same size, and writes the buffer sequentially like below. If DMA addr 3 is finished and the trace is still on, it will return to addr 0.”…””}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MhjTh²hubj )”}”(hŒw+->[DMA addr 0]->[DMA addr 1]->[DMA addr 2]->[DMA addr 3]-+ +---------------------------------------------------------+”h]”hŒw+->[DMA addr 0]->[DMA addr 1]->[DMA addr 2]->[DMA addr 3]-+ +---------------------------------------------------------+”…””}”hjssbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j h³hÇh´M hjTh²hubhï)”}”(hXDriver will allocate each DMA buffer of 4MiB. The finished buffer will be copied to the perf AUX buffer allocated by the perf core. Once the AUX buffer is full while the trace is still on, driver will commit the AUX buffer first and then apply for a new one with the same size. The size of AUX buffer is default to 16MiB. User can adjust the size by specifying the `-m` parameter of the perf command.”h]”(hXmDriver will allocate each DMA buffer of 4MiB. The finished buffer will be copied to the perf AUX buffer allocated by the perf core. Once the AUX buffer is full while the trace is still on, driver will commit the AUX buffer first and then apply for a new one with the same size. The size of AUX buffer is default to 16MiB. User can adjust the size by specifying the ”…””}”(hjh²hh³Nh´NubjÌ)”}”(hŒ`-m`”h]”hŒ-m”…””}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jËhjubhŒ parameter of the perf command.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´MhjTh²hubeh}”(h]”Œmemory-management”ah ]”h"]”Œ5. memory management”ah$]”h&]”uh1hÈhj¤h²hh³hÇh´MubhÉ)”}”(hhh]”(hÎ)”}”(hŒ 6. Decoding”h]”hŒ 6. Decoding”…””}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj©h²hh³hÇh´Mubhï)”}”(hŒÛYou can decode the traced data with `perf report -D` command (currently only support to dump the raw trace data). The traced data will be decoded according to the format described previously (take 8DW as an example): ::”h]”(hŒ$You can decode the traced data with ”…””}”(hjºh²hh³Nh´NubjÌ)”}”(hŒ`perf report -D`”h]”hŒperf report -D”…””}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jËhjºubhŒ¤ command (currently only support to dump the raw trace data). The traced data will be decoded according to the format described previously (take 8DW as an example):”…””}”(hjºh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mhj©h²hubj )”}”(hXÁ[...perf headers and other information] . ... HISI PTT data: size 4194304 bytes . 00000000: 00 00 00 00 Prefix . 00000004: 01 00 00 60 Header DW0 . 00000008: 0f 1e 00 01 Header DW1 . 0000000c: 04 00 00 00 Header DW2 . 00000010: 40 00 81 02 Header DW3 . 00000014: 33 c0 04 00 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: 02 00 00 00 Time . 00000040: 00 00 00 00 Prefix . 00000044: 01 00 00 60 Header DW0 . 00000048: 0f 1e 00 01 Header DW1 . 0000004c: 04 00 00 00 Header DW2 . 00000050: 40 00 81 02 Header DW3 [...]”h]”hXÁ[...perf headers and other information] . ... HISI PTT data: size 4194304 bytes . 00000000: 00 00 00 00 Prefix . 00000004: 01 00 00 60 Header DW0 . 00000008: 0f 1e 00 01 Header DW1 . 0000000c: 04 00 00 00 Header DW2 . 00000010: 40 00 81 02 Header DW3 . 00000014: 33 c0 04 00 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: 02 00 00 00 Time . 00000040: 00 00 00 00 Prefix . 00000044: 01 00 00 60 Header DW0 . 00000048: 0f 1e 00 01 Header DW1 . 0000004c: 04 00 00 00 Header DW2 . 00000050: 40 00 81 02 Header DW3 [...]”…””}”hjÚsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j h³hÇh´Mhj©h²hubeh}”(h]”Œdecoding”ah ]”h"]”Œ 6. decoding”ah$]”h&]”uh1hÈhj¤h²hh³hÇh´Mubeh}”(h]”Œtrace”ah ]”h"]”Œtrace”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Koubeh}”(h]”Œ$hisilicon-pcie-tune-and-trace-device”ah ]”h"]”Œ$hisilicon pcie tune and trace device”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j#Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jýjúj=j:j¡jžjjj™j–jõjòjj~jjjpjmjQjNj¦j£jíjêuŒ nametypes”}”(jý‰j=‰j¡‰j‰j™‰jõ‰j‰j‰jp‰jQ‰j¦‰jí‰uh}”(júhÊj:hÝjžj@jj‰j–j!jòj¤j~jjj„jmjjNjsj£jTjêj©uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”hŒsystem_message”“”)”}”(hhh]”hï)”}”(hŒfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.”h]”hŒhPossible title underline, too short for the title. Treating it as ordinary text because it’s so short.”…””}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîhj‡ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œline”KùŒsource”hÇuh1j…hjsh²hh³hÇh´KùubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.