xref: /linux/Documentation/ABI/testing/sysfs-driver-qat (revision 8d2b0853add1d7534dc0794e3c8e0b9e8c4ec640)
15ee52118SGiovanni CabidduWhat:		/sys/bus/pci/devices/<BDF>/qat/state
25ee52118SGiovanni CabidduDate:		June 2022
31d273983SMeadhbhKernelVersion:	6.0
45ee52118SGiovanni CabidduContact:	qat-linux@intel.com
51b466b8cSBagas SanjayaDescription:	(RW) Reports the current state of the QAT device. Write to
61b466b8cSBagas Sanjaya		the file to start or stop the device.
75ee52118SGiovanni Cabiddu
81b466b8cSBagas Sanjaya		The values are:
95ee52118SGiovanni Cabiddu
101b466b8cSBagas Sanjaya		* up: the device is up and running
111b466b8cSBagas Sanjaya		* down: the device is down
125ee52118SGiovanni Cabiddu
135ee52118SGiovanni Cabiddu
145ee52118SGiovanni Cabiddu		It is possible to transition the device from up to down only
155ee52118SGiovanni Cabiddu		if the device is up and vice versa.
165ee52118SGiovanni Cabiddu
17*10294362SSuman Kumar Chakraborty		This attribute is available for qat_4xxx and qat_6xxx devices.
18d4cfb144SGiovanni Cabiddu
19d4cfb144SGiovanni CabidduWhat:		/sys/bus/pci/devices/<BDF>/qat/cfg_services
20d4cfb144SGiovanni CabidduDate:		June 2022
211d273983SMeadhbhKernelVersion:	6.0
22d4cfb144SGiovanni CabidduContact:	qat-linux@intel.com
231b466b8cSBagas SanjayaDescription:	(RW) Reports the current configuration of the QAT device.
241b466b8cSBagas Sanjaya		Write to the file to change the configured services.
25d4cfb144SGiovanni Cabiddu
26*10294362SSuman Kumar Chakraborty		One or more services can be enabled per device.
27*10294362SSuman Kumar Chakraborty		Certain configurations are restricted to specific device types;
28*10294362SSuman Kumar Chakraborty		where applicable this is explicitly indicated, for example
29*10294362SSuman Kumar Chakraborty		(qat_6xxx) denotes applicability exclusively to that device series.
30d4cfb144SGiovanni Cabiddu
31*10294362SSuman Kumar Chakraborty		The available services include:
32*10294362SSuman Kumar Chakraborty
33*10294362SSuman Kumar Chakraborty		* sym: Configures the device for symmetric cryptographic operations.
34*10294362SSuman Kumar Chakraborty		* asym: Configures the device for asymmetric cryptographic operations.
35*10294362SSuman Kumar Chakraborty		* dc: Configures the device for compression and decompression
36*10294362SSuman Kumar Chakraborty		  operations.
37*10294362SSuman Kumar Chakraborty		* dcc: Similar to dc, but with the additional dc chaining feature
38*10294362SSuman Kumar Chakraborty		  enabled, cipher then compress (qat_6xxx), hash then compression.
39*10294362SSuman Kumar Chakraborty		  If this is not required choose dc.
40*10294362SSuman Kumar Chakraborty		* decomp: Configures the device for decompression operations (qat_6xxx).
41*10294362SSuman Kumar Chakraborty
42*10294362SSuman Kumar Chakraborty		Service combinations are permitted for all services except dcc.
43*10294362SSuman Kumar Chakraborty		On QAT GEN4 devices (qat_4xxx driver) a maximum of two services can be
44*10294362SSuman Kumar Chakraborty		combined and on QAT GEN6 devices (qat_6xxx driver ) a maximum of three
45*10294362SSuman Kumar Chakraborty		services can be combined.
46*10294362SSuman Kumar Chakraborty		The order of services is not significant. For instance, sym;asym is
47*10294362SSuman Kumar Chakraborty		functionally equivalent to asym;sym.
48d4cfb144SGiovanni Cabiddu
49d4cfb144SGiovanni Cabiddu		It is possible to set the configuration only if the device
50d4cfb144SGiovanni Cabiddu		is in the `down` state (see /sys/bus/pci/devices/<BDF>/qat/state)
51d4cfb144SGiovanni Cabiddu
52d4cfb144SGiovanni Cabiddu		The following example shows how to change the configuration of
53d4cfb144SGiovanni Cabiddu		a device configured for running crypto services in order to
5419cdbdb7SBagas Sanjaya		run data compression::
5519cdbdb7SBagas Sanjaya
56d4cfb144SGiovanni Cabiddu			# cat /sys/bus/pci/devices/<BDF>/qat/state
57d4cfb144SGiovanni Cabiddu			up
58d4cfb144SGiovanni Cabiddu			# cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
59d4cfb144SGiovanni Cabiddu			sym;asym
60d4cfb144SGiovanni Cabiddu			# echo down > /sys/bus/pci/devices/<BDF>/qat/state
61d4cfb144SGiovanni Cabiddu			# echo dc > /sys/bus/pci/devices/<BDF>/qat/cfg_services
62d4cfb144SGiovanni Cabiddu			# echo up > /sys/bus/pci/devices/<BDF>/qat/state
63d4cfb144SGiovanni Cabiddu			# cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
64d4cfb144SGiovanni Cabiddu			dc
65d4cfb144SGiovanni Cabiddu
66*10294362SSuman Kumar Chakraborty		This attribute is available for qat_4xxx and qat_6xxx devices.
672382b5aeSLucas Segarra Fernandez
682382b5aeSLucas Segarra FernandezWhat:		/sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
692382b5aeSLucas Segarra FernandezDate:		June 2023
702382b5aeSLucas Segarra FernandezKernelVersion:	6.5
712382b5aeSLucas Segarra FernandezContact:	qat-linux@intel.com
722382b5aeSLucas Segarra FernandezDescription:	(RW) This configuration option provides a way to force the device into remaining in
732382b5aeSLucas Segarra Fernandez		the MAX power state.
742382b5aeSLucas Segarra Fernandez		If idle support is enabled the device will transition to the `MIN` power state when
752382b5aeSLucas Segarra Fernandez		idle, otherwise will stay in the MAX power state.
762382b5aeSLucas Segarra Fernandez		Write to the file to enable or disable idle support.
772382b5aeSLucas Segarra Fernandez
782382b5aeSLucas Segarra Fernandez		The values are:
792382b5aeSLucas Segarra Fernandez
802382b5aeSLucas Segarra Fernandez		* 0: idle support is disabled
812382b5aeSLucas Segarra Fernandez		* 1: idle support is enabled
822382b5aeSLucas Segarra Fernandez
832382b5aeSLucas Segarra Fernandez		Default value is 1.
842382b5aeSLucas Segarra Fernandez
852382b5aeSLucas Segarra Fernandez		It is possible to set the pm_idle_enabled value only if the device
862382b5aeSLucas Segarra Fernandez		is in the `down` state (see /sys/bus/pci/devices/<BDF>/qat/state)
872382b5aeSLucas Segarra Fernandez
882382b5aeSLucas Segarra Fernandez		The following example shows how to change the pm_idle_enabled of
892382b5aeSLucas Segarra Fernandez		a device::
902382b5aeSLucas Segarra Fernandez
912382b5aeSLucas Segarra Fernandez			# cat /sys/bus/pci/devices/<BDF>/qat/state
922382b5aeSLucas Segarra Fernandez			up
932382b5aeSLucas Segarra Fernandez			# cat /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
942382b5aeSLucas Segarra Fernandez			1
952382b5aeSLucas Segarra Fernandez			# echo down > /sys/bus/pci/devices/<BDF>/qat/state
962382b5aeSLucas Segarra Fernandez			# echo 0 > /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
972382b5aeSLucas Segarra Fernandez			# echo up > /sys/bus/pci/devices/<BDF>/qat/state
982382b5aeSLucas Segarra Fernandez			# cat /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
992382b5aeSLucas Segarra Fernandez			0
1002382b5aeSLucas Segarra Fernandez
101*10294362SSuman Kumar Chakraborty		This attribute is available for qat_4xxx and qat_6xxx devices.
102dbc8876dSCiunas Bennett
103dbc8876dSCiunas BennettWhat:		/sys/bus/pci/devices/<BDF>/qat/rp2srv
104dbc8876dSCiunas BennettDate:		January 2024
105dbc8876dSCiunas BennettKernelVersion:	6.7
106dbc8876dSCiunas BennettContact:	qat-linux@intel.com
107dbc8876dSCiunas BennettDescription:
108dbc8876dSCiunas Bennett		(RW) This attribute provides a way for a user to query a
109dbc8876dSCiunas Bennett		specific ring pair for the type of service that it is currently
110dbc8876dSCiunas Bennett		configured for.
111dbc8876dSCiunas Bennett
112dbc8876dSCiunas Bennett		When written to, the value is cached and used to perform the
113dbc8876dSCiunas Bennett		read operation. Allowed values are in the range 0 to N-1, where
114dbc8876dSCiunas Bennett		N is the max number of ring pairs supported by a device. This
115dbc8876dSCiunas Bennett		can be queried using the attribute qat/num_rps.
116dbc8876dSCiunas Bennett
117dbc8876dSCiunas Bennett		A read returns the service associated to the ring pair queried.
118dbc8876dSCiunas Bennett
119dbc8876dSCiunas Bennett		The values are:
120dbc8876dSCiunas Bennett
121dbc8876dSCiunas Bennett		* dc: the ring pair is configured for running compression services
122dbc8876dSCiunas Bennett		* sym: the ring pair is configured for running symmetric crypto
123dbc8876dSCiunas Bennett		  services
124dbc8876dSCiunas Bennett		* asym: the ring pair is configured for running asymmetric crypto
125dbc8876dSCiunas Bennett		  services
126dbc8876dSCiunas Bennett
127dbc8876dSCiunas Bennett		Example usage::
128dbc8876dSCiunas Bennett
129dbc8876dSCiunas Bennett			# echo 1 > /sys/bus/pci/devices/<BDF>/qat/rp2srv
130dbc8876dSCiunas Bennett			# cat /sys/bus/pci/devices/<BDF>/qat/rp2srv
131dbc8876dSCiunas Bennett			sym
132dbc8876dSCiunas Bennett
133*10294362SSuman Kumar Chakraborty		This attribute is available for qat_4xxx and qat_6xxx devices.
13471fed09bSCiunas Bennett
13571fed09bSCiunas BennettWhat:		/sys/bus/pci/devices/<BDF>/qat/num_rps
13671fed09bSCiunas BennettDate:		January 2024
13771fed09bSCiunas BennettKernelVersion:	6.7
13871fed09bSCiunas BennettContact:	qat-linux@intel.com
13971fed09bSCiunas BennettDescription:
14071fed09bSCiunas Bennett		(RO) Returns the number of ring pairs that a single device has.
14171fed09bSCiunas Bennett
14271fed09bSCiunas Bennett		Example usage::
14371fed09bSCiunas Bennett
14471fed09bSCiunas Bennett			# cat /sys/bus/pci/devices/<BDF>/qat/num_rps
14571fed09bSCiunas Bennett			64
14671fed09bSCiunas Bennett
147*10294362SSuman Kumar Chakraborty		This attribute is available for qat_4xxx and qat_6xxx devices.
148f5419a42SDamian Muszynski
149f5419a42SDamian MuszynskiWhat:		/sys/bus/pci/devices/<BDF>/qat/auto_reset
150d26cb4f5SDamian MuszynskiDate:		May 2024
151d26cb4f5SDamian MuszynskiKernelVersion:	6.9
152f5419a42SDamian MuszynskiContact:	qat-linux@intel.com
153f5419a42SDamian MuszynskiDescription:	(RW) Reports the current state of the autoreset feature
154f5419a42SDamian Muszynski		for a QAT device
155f5419a42SDamian Muszynski
156f5419a42SDamian Muszynski		Write to the attribute to enable or disable device auto reset.
157f5419a42SDamian Muszynski
158f5419a42SDamian Muszynski		Device auto reset is disabled by default.
159f5419a42SDamian Muszynski
1602ecd4341SGiovanni Cabiddu		The values are:
161f5419a42SDamian Muszynski
162f5419a42SDamian Muszynski		* 1/Yy/on: auto reset enabled. If the device encounters an
163f5419a42SDamian Muszynski		  unrecoverable error, it will be reset automatically.
164f5419a42SDamian Muszynski		* 0/Nn/off: auto reset disabled. If the device encounters an
165f5419a42SDamian Muszynski		  unrecoverable error, it will not be reset.
166f5419a42SDamian Muszynski
167*10294362SSuman Kumar Chakraborty		This attribute is available for qat_4xxx and qat_6xxx devices.
168