Maximum Number of Process Calculations

The NumProcesses parameter is the number of user space processes per service within the [xxxx] section domain with access to this Intel® QAT Endpoint.

The value to which this parameter can be set is determined by a number of factors including the number of cryptography instances and/or data compression instances in the process section along with ServicesEnabled and potentially ServicesProfile. The total number of processes, per service, created by the driver is given by the expression (e.g., for cryptography):

(NumProcesses) x (NumberCyInstances)

The maximum number of processes that can be supported is dependant upon the underlying hardware.

Increasing the Maximum Number of Processes/Instances

Note

  • One bank is used per Intel® QAT virtual function (VF).

  • This section only applies when the instances that make use of polled mode.

The maximum number of instances can be increased with the careful selection of the ServiceEnabled parameter.

Compression, symmetric cryptography, and asymmetric cryptography each require two rings out of the 16 possible rings for a ring bank. By selecting only, the services needed, the number of instances can be increased.

Here are the variations including the maximum number of processes that can be supported for given configuration:

Note

The ServicesProfile parameter value may also need to be changed. See Services Profile for additional information.

Configuration Variations

ServicesEnabled

QAT 1.7x

QAT 2.0

Notes

sym

128

64

Compression and asymmetric crypto service not available.

asym

128

64

Compression and symmetric crypto service not available.

cy

128

Invalid

Compression and symmetric crypto service not available.

dc

128

64

Asymmetric and symmetric crypto service not available.

dc;sym

64

32

Asymmetric crypto services will not be available.

dc;asym

64

32

Symmetric crypto services will not be available.

sym;asym

Invalid

32

Compression services will not be available.

Invalid Configurations

If maximum number of processes is exceeded, the acceleration software will fail to load. The error message will be similar to:

service qat_service restart qat_dev0
Stopping device qat_dev0
Starting device qat_dev0
Processing /etc/4xxx_dev0.conf
Ioctl failed
QAT Error: Failed to load config data to device

And dmesg output will look similar to:

[116378.383041] Don't have enough rings for instance SSL0 in process SHIM_DEV0_INT_32
[116378.391976] 4xxx 0000:6b:00.0: Failed to create rings for cy
[116378.398881] 4xxx 0000:6b:00.0: Failed to process user section SHIM
[116378.406484] 4xxx 0000:6b:00.0: Failed to config device

Configuring Instances for Virtual Functions

To configure the number of instances for a virtual function:

  1. Install the driver package on the host with SR-IOV enabled.

  2. Update the physical function configuration file to set ServicesEnabled (refer to Increasing the Maximum Number of Processes/Instances).

  3. Perform qat_service shutdown and qat_service start.

  4. Update the virtual function configuration file to set ServicesEnabled (refer to Increasing the Maximum Number of Processes/Instances).

  5. Restart the qat_service.

The value of ServicesEnabled in the VF configuration file should be the same as the value of ServicesEnabled in the PF configuration file, or a subset of that value as shown in this table. For instance, if a PF is configured as cy, allowable VF configurations related to that PF can only be cy, asym, or sym. VF device restart will fail if a VF configuration is not allowed for that related PF.

If a VF service is configured to a subset of PF service, the number of VF instances is limited to the number allowed for that PF service as described in Increasing the Maximum Number of Processes/Instances. For example, if the PF configuration file has ServicesEnabled=dc;asym, only four (not eight) dc instances are enabled if the VF is configured for dc only.

Note

Valid Physical Function for each supported platform is described in the Configuration Variations table.

Configuring Physical Functions and Virtual Functions

Configured PF Service

Available VF Services

dc;asym

dc;asym

asym

dc

dc;sym

dc;sym

sym

dc

asym;sym

asym;sym

sym

asym

asym

asym

sym

sym

dc

dc