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 175ee52118SGiovanni Cabiddu This attribute is only available for qat_4xxx 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 261b466b8cSBagas Sanjaya The values are: 27d4cfb144SGiovanni Cabiddu 281b466b8cSBagas Sanjaya * sym;asym: the device is configured for running crypto 291b466b8cSBagas Sanjaya services 3050053275SAdam Guerin * asym;sym: identical to sym;asym 311b466b8cSBagas Sanjaya * dc: the device is configured for running compression services 3237b14f2dSAdam Guerin * dcc: identical to dc but enables the dc chaining feature, 3337b14f2dSAdam Guerin hash then compression. If this is not required chose dc 3450053275SAdam Guerin * sym: the device is configured for running symmetric crypto 3550053275SAdam Guerin services 3650053275SAdam Guerin * asym: the device is configured for running asymmetric crypto 3750053275SAdam Guerin services 3850053275SAdam Guerin * asym;dc: the device is configured for running asymmetric 3950053275SAdam Guerin crypto services and compression services 4050053275SAdam Guerin * dc;asym: identical to asym;dc 4150053275SAdam Guerin * sym;dc: the device is configured for running symmetric crypto 4250053275SAdam Guerin services and compression services 4350053275SAdam Guerin * dc;sym: identical to sym;dc 44d4cfb144SGiovanni Cabiddu 45d4cfb144SGiovanni Cabiddu It is possible to set the configuration only if the device 46d4cfb144SGiovanni Cabiddu is in the `down` state (see /sys/bus/pci/devices/<BDF>/qat/state) 47d4cfb144SGiovanni Cabiddu 48d4cfb144SGiovanni Cabiddu The following example shows how to change the configuration of 49d4cfb144SGiovanni Cabiddu a device configured for running crypto services in order to 5019cdbdb7SBagas Sanjaya run data compression:: 5119cdbdb7SBagas Sanjaya 52d4cfb144SGiovanni Cabiddu # cat /sys/bus/pci/devices/<BDF>/qat/state 53d4cfb144SGiovanni Cabiddu up 54d4cfb144SGiovanni Cabiddu # cat /sys/bus/pci/devices/<BDF>/qat/cfg_services 55d4cfb144SGiovanni Cabiddu sym;asym 56d4cfb144SGiovanni Cabiddu # echo down > /sys/bus/pci/devices/<BDF>/qat/state 57d4cfb144SGiovanni Cabiddu # echo dc > /sys/bus/pci/devices/<BDF>/qat/cfg_services 58d4cfb144SGiovanni Cabiddu # echo up > /sys/bus/pci/devices/<BDF>/qat/state 59d4cfb144SGiovanni Cabiddu # cat /sys/bus/pci/devices/<BDF>/qat/cfg_services 60d4cfb144SGiovanni Cabiddu dc 61d4cfb144SGiovanni Cabiddu 62d4cfb144SGiovanni Cabiddu This attribute is only available for qat_4xxx devices. 632382b5aeSLucas Segarra Fernandez 642382b5aeSLucas Segarra FernandezWhat: /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled 652382b5aeSLucas Segarra FernandezDate: June 2023 662382b5aeSLucas Segarra FernandezKernelVersion: 6.5 672382b5aeSLucas Segarra FernandezContact: qat-linux@intel.com 682382b5aeSLucas Segarra FernandezDescription: (RW) This configuration option provides a way to force the device into remaining in 692382b5aeSLucas Segarra Fernandez the MAX power state. 702382b5aeSLucas Segarra Fernandez If idle support is enabled the device will transition to the `MIN` power state when 712382b5aeSLucas Segarra Fernandez idle, otherwise will stay in the MAX power state. 722382b5aeSLucas Segarra Fernandez Write to the file to enable or disable idle support. 732382b5aeSLucas Segarra Fernandez 742382b5aeSLucas Segarra Fernandez The values are: 752382b5aeSLucas Segarra Fernandez 762382b5aeSLucas Segarra Fernandez * 0: idle support is disabled 772382b5aeSLucas Segarra Fernandez * 1: idle support is enabled 782382b5aeSLucas Segarra Fernandez 792382b5aeSLucas Segarra Fernandez Default value is 1. 802382b5aeSLucas Segarra Fernandez 812382b5aeSLucas Segarra Fernandez It is possible to set the pm_idle_enabled value only if the device 822382b5aeSLucas Segarra Fernandez is in the `down` state (see /sys/bus/pci/devices/<BDF>/qat/state) 832382b5aeSLucas Segarra Fernandez 842382b5aeSLucas Segarra Fernandez The following example shows how to change the pm_idle_enabled of 852382b5aeSLucas Segarra Fernandez a device:: 862382b5aeSLucas Segarra Fernandez 872382b5aeSLucas Segarra Fernandez # cat /sys/bus/pci/devices/<BDF>/qat/state 882382b5aeSLucas Segarra Fernandez up 892382b5aeSLucas Segarra Fernandez # cat /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled 902382b5aeSLucas Segarra Fernandez 1 912382b5aeSLucas Segarra Fernandez # echo down > /sys/bus/pci/devices/<BDF>/qat/state 922382b5aeSLucas Segarra Fernandez # echo 0 > /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled 932382b5aeSLucas Segarra Fernandez # echo up > /sys/bus/pci/devices/<BDF>/qat/state 942382b5aeSLucas Segarra Fernandez # cat /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled 952382b5aeSLucas Segarra Fernandez 0 962382b5aeSLucas Segarra Fernandez 972382b5aeSLucas Segarra Fernandez This attribute is only available for qat_4xxx devices. 98dbc8876dSCiunas Bennett 99dbc8876dSCiunas BennettWhat: /sys/bus/pci/devices/<BDF>/qat/rp2srv 100dbc8876dSCiunas BennettDate: January 2024 101dbc8876dSCiunas BennettKernelVersion: 6.7 102dbc8876dSCiunas BennettContact: qat-linux@intel.com 103dbc8876dSCiunas BennettDescription: 104dbc8876dSCiunas Bennett (RW) This attribute provides a way for a user to query a 105dbc8876dSCiunas Bennett specific ring pair for the type of service that it is currently 106dbc8876dSCiunas Bennett configured for. 107dbc8876dSCiunas Bennett 108dbc8876dSCiunas Bennett When written to, the value is cached and used to perform the 109dbc8876dSCiunas Bennett read operation. Allowed values are in the range 0 to N-1, where 110dbc8876dSCiunas Bennett N is the max number of ring pairs supported by a device. This 111dbc8876dSCiunas Bennett can be queried using the attribute qat/num_rps. 112dbc8876dSCiunas Bennett 113dbc8876dSCiunas Bennett A read returns the service associated to the ring pair queried. 114dbc8876dSCiunas Bennett 115dbc8876dSCiunas Bennett The values are: 116dbc8876dSCiunas Bennett 117dbc8876dSCiunas Bennett * dc: the ring pair is configured for running compression services 118dbc8876dSCiunas Bennett * sym: the ring pair is configured for running symmetric crypto 119dbc8876dSCiunas Bennett services 120dbc8876dSCiunas Bennett * asym: the ring pair is configured for running asymmetric crypto 121dbc8876dSCiunas Bennett services 122dbc8876dSCiunas Bennett 123dbc8876dSCiunas Bennett Example usage:: 124dbc8876dSCiunas Bennett 125dbc8876dSCiunas Bennett # echo 1 > /sys/bus/pci/devices/<BDF>/qat/rp2srv 126dbc8876dSCiunas Bennett # cat /sys/bus/pci/devices/<BDF>/qat/rp2srv 127dbc8876dSCiunas Bennett sym 128dbc8876dSCiunas Bennett 129dbc8876dSCiunas Bennett This attribute is only available for qat_4xxx devices. 13071fed09bSCiunas Bennett 13171fed09bSCiunas BennettWhat: /sys/bus/pci/devices/<BDF>/qat/num_rps 13271fed09bSCiunas BennettDate: January 2024 13371fed09bSCiunas BennettKernelVersion: 6.7 13471fed09bSCiunas BennettContact: qat-linux@intel.com 13571fed09bSCiunas BennettDescription: 13671fed09bSCiunas Bennett (RO) Returns the number of ring pairs that a single device has. 13771fed09bSCiunas Bennett 13871fed09bSCiunas Bennett Example usage:: 13971fed09bSCiunas Bennett 14071fed09bSCiunas Bennett # cat /sys/bus/pci/devices/<BDF>/qat/num_rps 14171fed09bSCiunas Bennett 64 14271fed09bSCiunas Bennett 14371fed09bSCiunas Bennett This attribute is only available for qat_4xxx devices. 144f5419a42SDamian Muszynski 145f5419a42SDamian MuszynskiWhat: /sys/bus/pci/devices/<BDF>/qat/auto_reset 146*d26cb4f5SDamian MuszynskiDate: May 2024 147*d26cb4f5SDamian MuszynskiKernelVersion: 6.9 148f5419a42SDamian MuszynskiContact: qat-linux@intel.com 149f5419a42SDamian MuszynskiDescription: (RW) Reports the current state of the autoreset feature 150f5419a42SDamian Muszynski for a QAT device 151f5419a42SDamian Muszynski 152f5419a42SDamian Muszynski Write to the attribute to enable or disable device auto reset. 153f5419a42SDamian Muszynski 154f5419a42SDamian Muszynski Device auto reset is disabled by default. 155f5419a42SDamian Muszynski 1562ecd4341SGiovanni Cabiddu The values are: 157f5419a42SDamian Muszynski 158f5419a42SDamian Muszynski * 1/Yy/on: auto reset enabled. If the device encounters an 159f5419a42SDamian Muszynski unrecoverable error, it will be reset automatically. 160f5419a42SDamian Muszynski * 0/Nn/off: auto reset disabled. If the device encounters an 161f5419a42SDamian Muszynski unrecoverable error, it will not be reset. 162f5419a42SDamian Muszynski 163f5419a42SDamian Muszynski This attribute is only available for qat_4xxx devices. 164