User Space Access Configuration Functions

Functions that allow the configuration of user space access to the Intel® QAT services from processes running in user space.

All user space access configuration function definitions are located in $ICP_ROOT/quickassist/lookaside/access_layer/include/icp_sal_user.h

icp_sal_userStart

Initializes user space access to an Intel® QAT Endpoint and starts the ProcessName section in the given section of the configuration file. This function needs to be called prior to any call to Intel® QAT API function from the user space process. This function is typically called only once in a user space process.

Note

The icp_sal_userStartMultiProcess() function is still supported, but the parameter limitDevAccess is ignored because its value is set once in the configuration file and is not allowed to be specified again in the function.

The configuration format allows the user to easily create a configuration for many user spaces processes. The driver internally generates unique process names and a valid configuration for each process based on the section name (pSectionName) and mode (limitDevAccess) provided.

For example, on a system with M number of devices, if all M configuration files contain:

[IPSec]
NumProcesses = N
LimitDevAccess = 0

Then N internal sections are generated (each with instances on all devices) and N processes can be started at any given time. Each process can call icp_sal_userStart("IPSec") and the driver determines the unique name to use for each process.

Similarly, on an M device system, if all M configuration files contain:

[SSL]
NumProcesses = N
LimitDevAccess = 1

Then MxN internal sections are generated (each with instances on one device only) and MxN processes can be started at any given time. Each process can call icp_sal_userStart("SSL") and the driver determines the unique name to use for each process.

Refer to Configuring Multiple Processes on a System with Multiple Intel® QAT Endpoints for detailed example.

Syntax

CpaStatus icp_sal_userStart(const char *pSectionName);

Parameters

pSectionName

The section name described in the configuration file.

Return Value

The icp_sal_userStart function returns one of the following codes:

CPA_STATUS_SUCCESS

Successfully started user space access to the Intel® QAT Endpoint as defined in the configuration file.

CPA_STATUS_FAIL

Operation failed.

icp_sal_userStop

Closes user space access to the Intel® QAT Endpoint; stops the services that were running and frees the allocated resources. After a successful call to this function, user space access to the Intel® QAT Endpoint from a calling process is not possible. This function should be called once when the process is finished using the Intel® QAT Endpoint and does not intend to use it again.

Syntax

CpaStatus icp_sal_userStop( void);

Parameters

None

Return Value

The icp_sal_userStop function returns one of the following codes:

CPA_STATUS_SUCCESS

Successfully stopped user space access to the Intel® QAT Endpoint.

CPA_STATUS_FAIL

Operation failed.