1What:		/sys/kernel/debug/qat_<device>_<BDF>/telemetry/control
2Date:		March 2024
3KernelVersion:	6.8
4Contact:	[email protected]
5Description:	(RW) Enables/disables the reporting of telemetry metrics.
6
7		Allowed values to write:
8		========================
9		* 0: disable telemetry
10		* 1: enable telemetry
11		* 2, 3, 4: enable telemetry and calculate minimum, maximum
12		  and average for each counter over 2, 3 or 4 samples
13
14		Returned values:
15		================
16		* 1-4: telemetry is enabled and running
17		* 0: telemetry is disabled
18
19		Example.
20
21		Writing '3' to this file starts the collection of
22		telemetry metrics. Samples are collected every second and
23		stored in a circular buffer of size 3. These values are then
24		used to calculate the minimum, maximum and average for each
25		counter. After enabling, counters can be retrieved through
26		the ``device_data`` file::
27
28		  echo 3 > /sys/kernel/debug/qat_4xxx_0000:6b:00.0/telemetry/control
29
30		Writing '0' to this file stops the collection of telemetry
31		metrics::
32
33		  echo 0 > /sys/kernel/debug/qat_4xxx_0000:6b:00.0/telemetry/control
34
35		This attribute is only available for qat_4xxx devices.
36
37What:		/sys/kernel/debug/qat_<device>_<BDF>/telemetry/device_data
38Date:		March 2024
39KernelVersion:	6.8
40Contact:	[email protected]
41Description:	(RO) Reports device telemetry counters.
42		Reads report metrics about performance and utilization of
43		a QAT device:
44
45		=======================	========================================
46		Field			Description
47		=======================	========================================
48		sample_cnt		number of acquisitions of telemetry data
49					from the device. Reads are performed
50					every 1000 ms.
51		pci_trans_cnt		number of PCIe partial transactions
52		max_rd_lat		maximum logged read latency [ns] (could
53					be any read operation)
54		rd_lat_acc_avg		average read latency [ns]
55		max_gp_lat		max get to put latency [ns] (only takes
56					samples for AE0)
57		gp_lat_acc_avg		average get to put latency [ns]
58		bw_in			PCIe, write bandwidth [Mbps]
59		bw_out			PCIe, read bandwidth [Mbps]
60		at_page_req_lat_avg	Address Translator(AT), average page
61					request latency [ns]
62		at_trans_lat_avg	AT, average page translation latency [ns]
63		at_max_tlb_used		AT, maximum uTLB used
64		util_cpr<N>		utilization of Compression slice N [%]
65		exec_cpr<N>		execution count of Compression slice N
66		util_xlt<N>		utilization of Translator slice N [%]
67		exec_xlt<N>		execution count of Translator slice N
68		util_dcpr<N>		utilization of Decompression slice N [%]
69		exec_dcpr<N>		execution count of Decompression slice N
70		util_pke<N>		utilization of PKE N [%]
71		exec_pke<N>		execution count of PKE N
72		util_ucs<N>		utilization of UCS slice N [%]
73		exec_ucs<N>		execution count of UCS slice N
74		util_wat<N>		utilization of Wireless Authentication
75					slice N [%]
76		exec_wat<N>		execution count of Wireless Authentication
77					slice N
78		util_wcp<N>		utilization of Wireless Cipher slice N [%]
79		exec_wcp<N>		execution count of Wireless Cipher slice N
80		util_cph<N>		utilization of Cipher slice N [%]
81		exec_cph<N>		execution count of Cipher slice N
82		util_ath<N>		utilization of Authentication slice N [%]
83		exec_ath<N>		execution count of Authentication slice N
84		=======================	========================================
85
86		The telemetry report file can be read with the following command::
87
88		  cat /sys/kernel/debug/qat_4xxx_0000:6b:00.0/telemetry/device_data
89
90		If ``control`` is set to 1, only the current values of the
91		counters are displayed::
92
93		  <counter_name> <current>
94
95		If ``control`` is 2, 3 or 4, counters are displayed in the
96		following format::
97
98		  <counter_name> <current> <min> <max> <avg>
99
100		If a device lacks of a specific accelerator, the corresponding
101		attribute is not reported.
102
103		This attribute is only available for qat_4xxx devices.
104