← Documents Documentation/ABI/testing/sysfs-driver-qat GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Intel QAT device-control sysfs ABI

Intel QuickAssist Technology device의 up/down state, configured services, idle power, ring-pair service query, ring-pair count와 unrecoverable-error auto reset을 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-driver-qat
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Device state and configured services

sysfs-driver-qat:1-67

state로 device를 up/down 전환하고, down 상태에서만 cfg_services를 바꿔 symmetric·asymmetric crypto, compression, chaining, decompression workloads를 선택합니다.

Idle-power policy

sysfs-driver-qat:68-102

pm_idle_enabled는 idle 때 MIN power state로 전환할지 MAX state에 유지할지를 정하며 device가 down일 때만 변경할 수 있습니다.

Ring-pair service mapping

sysfs-driver-qat:103-148

num_rps는 device의 ring-pair 수를 반환하고, rp2srv에 index를 쓴 뒤 읽으면 해당 pair의 dc·sym·asym service를 확인합니다.

Automatic recovery from unrecoverable errors

sysfs-driver-qat:149-167

auto_reset은 기본적으로 꺼져 있으며 활성화하면 unrecoverable error를 만난 QAT device를 자동 reset합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/bus/pci/devices/<BDF>/qat/state
2 Date: June 2022
3 KernelVersion: 6.0
5 Description: (RW) Reports the current state of the QAT device. Write to
6 the file to start or stop the device.
7
8 The values are:
9
10 * up: the device is up and running
11 * down: the device is down
12
13
14 It is possible to transition the device from up to down only
15 if the device is up and vice versa.
16
17 This attribute is available for qat_4xxx and qat_6xxx devices.
18
19 What: /sys/bus/pci/devices/<BDF>/qat/cfg_services
20 Date: June 2022
21 KernelVersion: 6.0
23 Description: (RW) Reports the current configuration of the QAT device.
24 Write to the file to change the configured services.
25
26 One or more services can be enabled per device.
27 Certain configurations are restricted to specific device types;
28 where applicable this is explicitly indicated, for example
29 (qat_6xxx) denotes applicability exclusively to that device series.
30
31 The available services include:
32
33 * sym: Configures the device for symmetric cryptographic operations.
34 * asym: Configures the device for asymmetric cryptographic operations.
35 * dc: Configures the device for compression and decompression
36 operations.
37 * dcc: Similar to dc, but with the additional dc chaining feature
38 enabled, cipher then compress (qat_6xxx), hash then compression.
39 If this is not required choose dc.
40 * decomp: Configures the device for decompression operations (qat_6xxx).
41
42 Service combinations are permitted for all services except dcc.
43 On QAT GEN4 devices (qat_4xxx driver) a maximum of two services can be
44 combined and on QAT GEN6 devices (qat_6xxx driver ) a maximum of three
45 services can be combined.
46 The order of services is not significant. For instance, sym;asym is
47 functionally equivalent to asym;sym.
48
49 It is possible to set the configuration only if the device
50 is in the `down` state (see /sys/bus/pci/devices/<BDF>/qat/state)
51
52 The following example shows how to change the configuration of
53 a device configured for running crypto services in order to
54 run data compression::
55
56 # cat /sys/bus/pci/devices/<BDF>/qat/state
57 up
58 # cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
59 sym;asym
60 # echo down > /sys/bus/pci/devices/<BDF>/qat/state
61 # echo dc > /sys/bus/pci/devices/<BDF>/qat/cfg_services
62 # echo up > /sys/bus/pci/devices/<BDF>/qat/state
63 # cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
64 dc
65
66 This attribute is available for qat_4xxx and qat_6xxx devices.
67
68 What: /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
69 Date: June 2023
70 KernelVersion: 6.5
72 Description: (RW) This configuration option provides a way to force the device into remaining in
73 the MAX power state.
74 If idle support is enabled the device will transition to the `MIN` power state when
75 idle, otherwise will stay in the MAX power state.
76 Write to the file to enable or disable idle support.
77
78 The values are:
79
80 * 0: idle support is disabled
81 * 1: idle support is enabled
82
83 Default value is 1.
84
85 It is possible to set the pm_idle_enabled value only if the device
86 is in the `down` state (see /sys/bus/pci/devices/<BDF>/qat/state)
87
88 The following example shows how to change the pm_idle_enabled of
89 a device::
90
91 # cat /sys/bus/pci/devices/<BDF>/qat/state
92 up
93 # cat /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
94 1
95 # echo down > /sys/bus/pci/devices/<BDF>/qat/state
96 # echo 0 > /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
97 # echo up > /sys/bus/pci/devices/<BDF>/qat/state
98 # cat /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
99 0
100
101 This attribute is available for qat_4xxx and qat_6xxx devices.
102
103 What: /sys/bus/pci/devices/<BDF>/qat/rp2srv
104 Date: January 2024
105 KernelVersion: 6.7
107 Description:
108 (RW) This attribute provides a way for a user to query a
109 specific ring pair for the type of service that it is currently
110 configured for.
111
112 When written to, the value is cached and used to perform the
113 read operation. Allowed values are in the range 0 to N-1, where
114 N is the max number of ring pairs supported by a device. This
115 can be queried using the attribute qat/num_rps.
116
117 A read returns the service associated to the ring pair queried.
118
119 The values are:
120
121 * dc: the ring pair is configured for running compression services
122 * sym: the ring pair is configured for running symmetric crypto
123 services
124 * asym: the ring pair is configured for running asymmetric crypto
125 services
126
127 Example usage::
128
129 # echo 1 > /sys/bus/pci/devices/<BDF>/qat/rp2srv
130 # cat /sys/bus/pci/devices/<BDF>/qat/rp2srv
131 sym
132
133 This attribute is available for qat_4xxx and qat_6xxx devices.
134
135 What: /sys/bus/pci/devices/<BDF>/qat/num_rps
136 Date: January 2024
137 KernelVersion: 6.7
139 Description:
140 (RO) Returns the number of ring pairs that a single device has.
141
142 Example usage::
143
144 # cat /sys/bus/pci/devices/<BDF>/qat/num_rps
145 64
146
147 This attribute is available for qat_4xxx and qat_6xxx devices.
148
149 What: /sys/bus/pci/devices/<BDF>/qat/auto_reset
150 Date: May 2024
151 KernelVersion: 6.9
153 Description: (RW) Reports the current state of the autoreset feature
154 for a QAT device
155
156 Write to the attribute to enable or disable device auto reset.
157
158 Device auto reset is disabled by default.
159
160 The values are:
161
162 * 1/Yy/on: auto reset enabled. If the device encounters an
163 unrecoverable error, it will be reset automatically.
164 * 0/Nn/off: auto reset disabled. If the device encounters an
165 unrecoverable error, it will not be reset.
166
167 This attribute is available for qat_4xxx and qat_6xxx devices.
168

3. 한국어 전문 번역

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

QAT device state

1-18
항목한국어 전문 번역
What/sys/bus/pci/devices/<BDF>/qat/state
Date2022년 6월
KernelVersion6.0
Contact[email protected]
DescriptionQAT device의 현재 state를 보고합니다. File에 써서 device를 start하거나 stop합니다. 값 up은 device가 up 상태로 실행 중임을, down은 device가 down 상태임을 뜻합니다. Device가 up일 때만 up에서 down으로, down일 때만 down에서 up으로 전환할 수 있습니다. 이 attribute는 qat_4xxx와 qat_6xxx devices에서 사용할 수 있습니다.
AccessRead-write
QAT device-state transitions
Read state: up or downWrite down only while device is upChange down-only configuration attributesWrite up only while device is down

현재 state와 반대 state로만 전환할 수 있습니다.

Configured QAT services

19-67
항목한국어 전문 번역
What/sys/bus/pci/devices/<BDF>/qat/cfg_services
Date2022년 6월
KernelVersion6.0
Contact[email protected]
DescriptionQAT device의 현재 configuration을 보고하며 file에 써서 configured services를 바꿉니다. Device마다 하나 이상의 service를 enable할 수 있습니다. 특정 configuration은 특정 device type으로 제한되며, 예를 들어 (qat_6xxx)는 해당 series에만 적용됨을 뜻합니다. sym은 symmetric cryptographic operations, asym은 asymmetric cryptographic operations, dc는 compression·decompression operations를 구성합니다. dcc는 dc chaining을 추가한 dc와 비슷하며 cipher 후 compress(qat_6xxx) 또는 hash 후 compression을 수행합니다. Chaining이 필요하지 않으면 dc를 선택합니다. decomp는 decompression operations를 구성하며 qat_6xxx 전용입니다. dcc를 제외한 모든 services는 조합할 수 있습니다. QAT GEN4(qat_4xxx)는 최대 두 services, QAT GEN6(qat_6xxx)는 최대 세 services를 조합할 수 있습니다. Service 순서는 중요하지 않으므로 sym;asym과 asym;sym은 기능상 같습니다. Device가 down state일 때만 configuration을 설정할 수 있습니다. 아래 example은 crypto services에서 data compression으로 configuration을 바꿉니다. 이 attribute는 qat_4xxx와 qat_6xxx devices에서 사용할 수 있습니다.
AccessRead-write
QAT configurable services
TokenWorkloadRestriction / note
symSymmetric cryptographyCombinable
asymAsymmetric cryptographyCombinable
dcCompression and decompressionChoose when chaining is unnecessary
dccCompression with dc chainingCannot be combined; cipher-then-compress is qat_6xxx
decompDecompressionqat_6xxx only
GEN4Service combinationMaximum 2 services
GEN6Service combinationMaximum 3 services

각 service token, workload와 device restriction을 정리했습니다.

# cat /sys/bus/pci/devices/<BDF>/qat/state
up
# cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
sym;asym
# echo down > /sys/bus/pci/devices/<BDF>/qat/state
# echo dc > /sys/bus/pci/devices/<BDF>/qat/cfg_services
# echo up > /sys/bus/pci/devices/<BDF>/qat/state
# cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
dc

QAT idle-power support

68-102
항목한국어 전문 번역
What/sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
Date2023년 6월
KernelVersion6.5
Contact[email protected]
DescriptionDevice를 MAX power state에 계속 머물도록 강제할 수 있는 configuration option입니다. Idle support가 enable이면 device는 idle일 때 MIN power state로 전환하고, 아니면 MAX power state에 머뭅니다. File에 써서 idle support를 enable하거나 disable합니다. 값 0은 disabled, 1은 enabled이며 default는 1입니다. Device가 down state일 때만 pm_idle_enabled를 설정할 수 있습니다. 아래 example은 값을 1에서 0으로 바꿉니다. 이 attribute는 qat_4xxx와 qat_6xxx devices에서 사용할 수 있습니다.
AccessRead-write
QAT idle-power policy
ValueIdle supportPower state while idle
0DisabledRemain in MAX
1Enabled (default)Transition to MIN

pm_idle_enabled 값과 idle device의 resulting power state입니다.

# cat /sys/bus/pci/devices/<BDF>/qat/state
up
# cat /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
1
# echo down > /sys/bus/pci/devices/<BDF>/qat/state
# echo 0 > /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
# echo up > /sys/bus/pci/devices/<BDF>/qat/state
# cat /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
0

Ring-pair service query

103-134
항목한국어 전문 번역
What/sys/bus/pci/devices/<BDF>/qat/rp2srv
Date2024년 1월
KernelVersion6.7
Contact[email protected]
Description특정 ring pair가 현재 어떤 service type으로 configured되어 있는지 조회합니다. 값을 쓰면 cached되어 다음 read operation에 사용됩니다. 허용 값은 0부터 N-1까지이며 N은 device가 지원하는 최대 ring-pair 수입니다. N은 qat/num_rps로 조회할 수 있습니다. Read는 선택한 ring pair의 service를 반환합니다. dc는 compression, sym은 symmetric crypto, asym은 asymmetric crypto services로 구성된 ring pair를 뜻합니다. 이 attribute는 qat_4xxx와 qat_6xxx devices에서 사용할 수 있습니다.
AccessRead-write query selector
Write range0..N-1, where N is qat/num_rps
Ring-pair service lookup
Read qat/num_rps to obtain NChoose ring-pair index from 0 to N-1Write index to qat/rp2srvRead qat/rp2srvReceive dc, sym or asym

num_rps로 범위를 확인하고 rp2srv에 index를 쓴 뒤 결과를 읽습니다.

# echo 1 > /sys/bus/pci/devices/<BDF>/qat/rp2srv
# cat /sys/bus/pci/devices/<BDF>/qat/rp2srv
sym

Device ring-pair count

135-148
항목한국어 전문 번역
What/sys/bus/pci/devices/<BDF>/qat/num_rps
Date2024년 1월
KernelVersion6.7
Contact[email protected]
Description단일 device가 가진 ring pairs의 수를 반환합니다. Example output은 64입니다. 이 attribute는 qat_4xxx와 qat_6xxx devices에서 사용할 수 있습니다.
AccessRead-only
# cat /sys/bus/pci/devices/<BDF>/qat/num_rps
64

Automatic device reset

149-167
항목한국어 전문 번역
What/sys/bus/pci/devices/<BDF>/qat/auto_reset
Date2024년 5월
KernelVersion6.9
Contact[email protected]
DescriptionQAT device의 autoreset feature 현재 state를 보고합니다. Attribute에 써서 device auto reset을 enable하거나 disable하며 default는 disabled입니다. 1, Y/y, on은 enable을 뜻하고 device가 unrecoverable error를 만나면 자동 reset합니다. 0, N/n, off는 disable을 뜻하고 unrecoverable error를 만나도 reset하지 않습니다. 이 attribute는 qat_4xxx와 qat_6xxx devices에서 사용할 수 있습니다.
AccessRead-write
QAT auto-reset values
ValuesAuto resetOn unrecoverable error
1, Y/y, onEnabledReset device automatically
0, N/n, offDisabled (default)Do not reset device

Boolean aliases와 unrecoverable-error behavior를 대응시켰습니다.