← Documents Documentation/ABI/testing/debugfs-hisi-zip GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

HiSilicon ZIP debugfs ABI

HiSilicon ZIP compression·decompression core와 Queue Manager register selection·read-clear, function QoS, interrupts·errors·state·stop timeout, ZIP request DFX와 capability registers를 설명합니다.

Source pathDocumentation/ABI/testing/debugfs-hisi-zip
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

Compression cores와 QM selectors

debugfs-hisi-zip:1-60

PF에서 compression·decompression core registers와 read-clear를 제어하고 function QM·queue를 선택하며 PF·VF QoS와 QM register dump를 제공합니다.

QM interrupts, errors, status

debugfs-hisi-zip:62-98

PF와 VF에서 task completion invalid IRQ, async·abnormal events, queue allocation·mailbox errors와 QM work·stop status를 보고합니다.

QM register changes와 stop timeout

debugfs-hisi-zip:100-127

QM register 변화와 busy·idle state를 표시하고 stop queue failure의 wait time과 resulting state를 제공합니다.

ZIP request DFX counters

debugfs-hisi-zip:129-160

ZIP register 변화와 sent·received·busy 및 BD type error requests를 계수합니다.

QM·ZIP capability registers

debugfs-hisi-zip:162-167

PF와 VF에서 QM·ZIP capability bit registers를 dump해 device specification 조회와 fault locating을 지원합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/kernel/debug/hisi_zip/<bdf>/comp_core[01]/regs
2 Date: Nov 2018
4 Description: Dump of compression cores related debug registers.
5 Only available for PF.
6
7 What: /sys/kernel/debug/hisi_zip/<bdf>/decomp_core[0-5]/regs
8 Date: Nov 2018
10 Description: Dump of decompression cores related debug registers.
11 Only available for PF.
12
13 What: /sys/kernel/debug/hisi_zip/<bdf>/clear_enable
14 Date: Nov 2018
16 Description: Compression/decompression core debug registers read clear
17 control. 1 means enable register read clear, otherwise 0.
18 Writing to this file has no functional effect, only enable or
19 disable counters clear after reading of these registers.
20 Only available for PF.
21
22 What: /sys/kernel/debug/hisi_zip/<bdf>/current_qm
23 Date: Nov 2018
25 Description: One ZIP controller has one PF and multiple VFs, each function
26 has a QM. Select the QM which below qm refers to.
27 Only available for PF.
28
29 What: /sys/kernel/debug/hisi_zip/<bdf>/alg_qos
30 Date: Jun 2021
32 Description: The <bdf> is related the function for PF and VF.
33 ZIP driver supports to configure each function's QoS, the driver
34 supports to write <bdf> value to alg_qos in the host. Such as
35 "echo <bdf> value > alg_qos". The qos value is 1~1000, means
36 1/1000~1000/1000 of total QoS. The driver reading alg_qos to
37 get related QoS in the host and VM, Such as "cat alg_qos".
38
39 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/regs
40 Date: Nov 2018
42 Description: Dump of QM related debug registers.
43 Available for PF and VF in host. VF in guest currently only
44 has one debug register.
45
46 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/current_q
47 Date: Nov 2018
49 Description: One QM may contain multiple queues. Select specific queue to
50 show its debug registers in above regs.
51 Only available for PF.
52
53 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/clear_enable
54 Date: Nov 2018
56 Description: QM debug registers(regs) read clear control. 1 means enable
57 register read clear, otherwise 0.
58 Writing to this file has no functional effect, only enable or
59 disable counters clear after reading of these registers.
60 Only available for PF.
61
62 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/err_irq
63 Date: Apr 2020
65 Description: Dump the number of invalid interrupts for
66 QM task completion.
67 Available for both PF and VF, and take no other effect on ZIP.
68
69 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/aeq_irq
70 Date: Apr 2020
72 Description: Dump the number of QM async event queue interrupts.
73 Available for both PF and VF, and take no other effect on ZIP.
74
75 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/abnormal_irq
76 Date: Apr 2020
78 Description: Dump the number of interrupts for QM abnormal event.
79 Available for both PF and VF, and take no other effect on ZIP.
80
81 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/create_qp_err
82 Date: Apr 2020
84 Description: Dump the number of queue allocation errors.
85 Available for both PF and VF, and take no other effect on ZIP.
86
87 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/mb_err
88 Date: Apr 2020
90 Description: Dump the number of failed QM mailbox commands.
91 Available for both PF and VF, and take no other effect on ZIP.
92
93 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/status
94 Date: Apr 2020
96 Description: Dump the status of the QM.
97 Two states: work, stop.
98 Available for both PF and VF, and take no other effect on ZIP.
99
100 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/diff_regs
101 Date: Mar 2022
103 Description: QM debug registers(regs) read hardware register value. This
104 node is used to show the change of the qm registers value. This
105 node can be help users to check the change of register values.
106
107 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/qm_state
108 Date: Jan 2024
110 Description: Dump the state of the device.
111 0: busy, 1: idle.
112 Only available for PF, and take no other effect on ZIP.
113
114 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/dev_timeout
115 Date: Feb 2024
117 Description: Set the wait time when stop queue fails. Available for both PF
118 and VF, and take no other effect on ZIP.
119 0: not wait(default), others value: wait dev_timeout * 20 microsecond.
120
121 What: /sys/kernel/debug/hisi_zip/<bdf>/qm/dev_state
122 Date: Feb 2024
124 Description: Dump the stop queue status of the QM. The default value is 0,
125 if dev_timeout is set, when stop queue fails, the dev_state
126 will return non-zero value. Available for both PF and VF,
127 and take no other effect on ZIP.
128
129 What: /sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/diff_regs
130 Date: Mar 2022
132 Description: ZIP debug registers(regs) read hardware register value. This
133 node is used to show the change of the registers value. this
134 node can be help users to check the change of register values.
135
136 What: /sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/send_cnt
137 Date: Apr 2020
139 Description: Dump the total number of sent requests.
140 Available for both PF and VF, and take no other effect on ZIP.
141
142 What: /sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/recv_cnt
143 Date: Apr 2020
145 Description: Dump the total number of received requests.
146 Available for both PF and VF, and take no other effect on ZIP.
147
148 What: /sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/send_busy_cnt
149 Date: Apr 2020
151 Description: Dump the total number of requests received
152 with returning busy.
153 Available for both PF and VF, and take no other effect on ZIP.
154
155 What: /sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/err_bd_cnt
156 Date: Apr 2020
158 Description: Dump the total number of BD type error requests
159 to be received.
160 Available for both PF and VF, and take no other effect on ZIP.
161
162 What: /sys/kernel/debug/hisi_zip/<bdf>/cap_regs
163 Date: Oct 2024
165 Description: Dump the values of the qm and zip capability bit registers and
166 support the query of device specifications to facilitate fault locating.
167 Available for both PF and VF, and take no other effect on ZIP.
168

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Compression·decompression cores와 function QM

1-44

이 문서의 모든 항목 담당자는 [email protected]입니다.

WhatDate설명범위
/sys/kernel/debug/hisi_zip/<bdf>/comp_core[01]/regs2018년 11월Compression cores 관련 debug registers를 dump합니다.PF only
/sys/kernel/debug/hisi_zip/<bdf>/decomp_core[0-5]/regs2018년 11월Decompression cores 관련 debug registers를 dump합니다.PF only
/sys/kernel/debug/hisi_zip/<bdf>/clear_enable2018년 11월Compression·decompression core debug register read-clear control입니다. 1이면 enable, 0이면 disable입니다. 기능 동작에는 영향을 주지 않고 registers를 읽은 뒤 counters를 지울지만 제어합니다.PF only
/sys/kernel/debug/hisi_zip/<bdf>/current_qm2018년 11월ZIP controller 하나에는 PF 하나와 여러 VFs가 있고 각 function은 QM을 가집니다. 아래 qm nodes가 참조할 QM을 선택합니다.PF only
/sys/kernel/debug/hisi_zip/<bdf>/alg_qos2021년 6월PF 또는 VF function을 나타내는 <bdf>의 QoS를 구성합니다. 값 1..1000은 total QoS의 1/1000..1000/1000을 뜻합니다. Host와 VM에서 읽어 관련 QoS를 확인합니다.PF and VF function
/sys/kernel/debug/hisi_zip/<bdf>/qm/regs2018년 11월QM 관련 debug registers를 dump합니다.Host의 PF와 VF. Guest VF는 현재 debug register 하나만 제공
echo <bdf> value > alg_qos
cat alg_qos

QM queue selector와 read-clear

46-60
WhatDate설명범위
/sys/kernel/debug/hisi_zip/<bdf>/qm/current_q2018년 11월QM에 여러 queues가 있을 때 위 regs에 표시할 특정 queue를 선택합니다.PF only
/sys/kernel/debug/hisi_zip/<bdf>/qm/clear_enable2018년 11월QM debug register read-clear control입니다. 1이면 enable, 0이면 disable입니다. 기능 동작에는 영향을 주지 않고 registers를 읽은 뒤 counters를 지울지만 제어합니다.PF only
ZIP core·QM·queue debug 대상 선택
comp_core[01]Compression core regs
decomp_core[0-5]Decompression core regs
current_qmSelected PF or VF QMqm/current_qSelected queueqm/regs

Core register dump는 core index로 직접 나뉘고, QM subtree는 current_qm과 current_q 두 selector가 function과 queue를 차례로 고른다.

QM IRQ·error counters와 status

62-98

아래 항목은 PF와 VF 모두에서 사용할 수 있고 ZIP 동작에 다른 영향을 주지 않습니다.

WhatDate설명
/sys/kernel/debug/hisi_zip/<bdf>/qm/err_irq2020년 4월QM task completion의 invalid interrupt 수를 dump합니다.
/sys/kernel/debug/hisi_zip/<bdf>/qm/aeq_irq2020년 4월QM async event queue interrupt 수를 dump합니다.
/sys/kernel/debug/hisi_zip/<bdf>/qm/abnormal_irq2020년 4월QM abnormal event interrupt 수를 dump합니다.
/sys/kernel/debug/hisi_zip/<bdf>/qm/create_qp_err2020년 4월Queue allocation error 수를 dump합니다.
/sys/kernel/debug/hisi_zip/<bdf>/qm/mb_err2020년 4월실패한 QM mailbox command 수를 dump합니다.
/sys/kernel/debug/hisi_zip/<bdf>/qm/status2020년 4월QM status를 dump합니다. 가능한 state는 work와 stop입니다.

QM register changes와 stop-queue state

100-127
WhatDate설명범위
/sys/kernel/debug/hisi_zip/<bdf>/qm/diff_regs2022년 3월QM debug registers의 hardware register values를 읽어 QM register 값의 변화를 표시하고 확인하도록 돕습니다.문서에 PF/VF 제한 미기재
/sys/kernel/debug/hisi_zip/<bdf>/qm/qm_state2024년 1월Device state를 dump합니다. 0은 busy, 1은 idle이며 ZIP 동작에 다른 영향을 주지 않습니다.PF only
/sys/kernel/debug/hisi_zip/<bdf>/qm/dev_timeout2024년 2월Stop queue가 실패했을 때 기다릴 시간을 설정합니다. 0은 기다리지 않는 기본값이고 그 밖의 값은 dev_timeout × 20 microseconds만큼 기다립니다. ZIP 동작에 다른 영향을 주지 않습니다.PF and VF
/sys/kernel/debug/hisi_zip/<bdf>/qm/dev_state2024년 2월QM stop-queue status를 dump합니다. 기본값은 0입니다. dev_timeout이 설정된 상태에서 stop queue가 실패하면 non-zero를 반환하며 ZIP 동작에 다른 영향을 주지 않습니다.PF and VF
ZIP QM stop timeout과 failure state
Stop queue requestSuccessdev_state = 0
Stop queue failuredev_timeout = 0No wait
Stop queue failuredev_timeout > 0Wait dev_timeout × 20 µsStill faileddev_state ≠ 0

Stop queue 실패 시 dev_timeout이 지정되면 20 µs 단위로 기다리고 최종 실패를 dev_state의 non-zero 값으로 보고한다.

ZIP DFX registers와 request counters

129-160
WhatDate설명범위
/sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/diff_regs2022년 3월ZIP debug registers의 hardware register values를 읽어 register 값의 변화를 표시하고 확인하도록 돕습니다.문서에 PF/VF 제한 미기재
/sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/send_cnt2020년 4월보낸 request 총수를 dump합니다.PF and VF
/sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/recv_cnt2020년 4월받은 request 총수를 dump합니다.PF and VF
/sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/send_busy_cnt2020년 4월수신되었지만 busy를 반환한 request 총수를 dump합니다. 원문의 received 표현을 보존합니다.PF and VF
/sys/kernel/debug/hisi_zip/<bdf>/zip_dfx/err_bd_cnt2020년 4월수신한 BD type error request 총수를 dump합니다.PF and VF

PF·VF 공통 counters는 ZIP 동작에 다른 영향을 주지 않습니다.

ZIP request DFX 결과 분류
Request sentsend_cntResponse receivedrecv_cnt
Request returns busysend_busy_cnt
BD type error receivederr_bd_cnt

기본 send·receive 흐름에서 busy와 BD type error 결과를 별도 counters로 분리한다.

QM·ZIP capability bit registers

162-167
항목내용
What/sys/kernel/debug/hisi_zip/<bdf>/cap_regs
Date2024년 10월
Contact[email protected]
DescriptionQM과 ZIP capability bit register 값을 dump하고 device specification 조회를 지원해 fault locating을 쉽게 합니다.
범위PF와 VF 모두에서 사용 가능하며 ZIP 동작에 다른 영향을 주지 않음