intel / intel/QAT_Engine

icp_sal_userStartMultiProcess() in a multi-threaded app ?

Open
#148 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
443
Forks
137
PR merge metrics
No merged PRs in 30d

Description

Hi,

This is more of a QAT sharing related query when using the QAT crypto engine in a multi-threaded process.

Would like to get an opinion on the following:

a. The question is for a multi-threaded process. Would like to create multiple (atleast a couple)
user-defined sections in the QAT config to share across threads. For example: Thread-A
will use the QAT (for SSL - using the crypto engine), Thread-B will also need to attach/init to
QAT for a different purpose (maps to "User-Proc-Section-B" in QAT config).

b. I am wondering if there is a procedure to invoke "icp_sal_userStartMultiProcess()" from two
threads and get them to init two different sections ("User-Proc-Section-A" and "User-Proc-
Section-B) in the QAT config ?

c. My observation so far has been the following, QAT initialization for the process occurs on the first
invocation of "icp_sal_userStartMultiProcess", the second invocation (from another thread) does
not fail but it actually is more of a no-op. The initialization of QAT instances etc has already been
done by the first call to "icp_sal_userStartMultiProcess", hence the second call does not read any
instances or config from the QAT config file.

Given the above, it looks like the only approach to share the QAT in a process is to initialize once (icp_sal_userStartMultiProcess) for the process (maybe in main thread) and then share the instances across threads.

Appreciate any pointers. Thanks.

--
BR,
nanayak

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.