Ⅱ How to reproduce it (as minimally and precisely as possible)
编译openssl
cd /home/xxx/qat_package/SM_package
git clone https://github.com/Tongsuo-Project/Tongsuo.git
cd Tongsuo
./config --prefix=/home/xxx/qat_package/SM_package/Tongsuo_install --strict-warnings --api=1.1.1 enable-ntls -d
make & make install
build ipp-crypto
cd /home/xxx/qat_package/SM_package
wget https://github.com/intel/ipp-crypto/archive/refs/tags/ippcp_2021.7.1.zip -O ipp-crypto_2021.7.1.zip
unzip ipp-crypto_2021.7.1.zip
cmake . -Bbuild -DCMAKE_INSTALL_PREFIX=/home/xxx/qat_package/SM_package/Tongsuo_install \
-DOPENSSL_INCLUDE_DIR=/home/xxx/qat_package/SM_package/Tongsuo_install/include \
-DOPENSSL_LIBRARIES=/home/xxx/qat_package/SM_package/Tongsuo_install/lib64 \
-DOPENSSL_ROOT_DIR=/home/xxx/qat_package/SM_package/Tongsuo_install
cd build
make -j64
make install
intel-ipsec-mb
cd /home/xxx/qat_package/SM_package
wget https://github.com/intel/intel-ipsec-mb/archive/refs/tags/v1.3.zip -O intel-ipsec-mb_1.3.zip
unzip intel-ipsec-mb_1.3.zip
cd intel-ipsec-mb-1.3
make -j SAFE_DATA=y SAFE_PARAM=y SAFE_LOOKUP=y
make install NOLDCONFIG=y PREFIX=/home/xxx/qat_package/SM_package/Tongsuo_install
Ⅰ Issue Description 1.tengine国密开启异步模式(ssl_async on+修改tengine代码以实现),并且使用cryptoNI指令集的方式, 加速SM2、SM3、SM4
Ⅱ How to reproduce it (as minimally and precisely as possible)
Tengine日志: 2023/07/03 04:51:10 [debug] 650975#0: bind() 0.0.0.0:443 2023/07/03 04:51:10 [notice] 650975#0: using the "epoll" event method 2023/07/03 04:51:10 [notice] 650975#0: nginx/1.22.1 2023/07/03 04:51:10 [notice] 650975#0: Tengine/2.4.0 2023/07/03 04:51:10 [notice] 650975#0: built by gcc 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC) 2023/07/03 04:51:10 [notice] 650975#0: OS: Linux 4.18.0-240.22.1.el8_3.x86_64 2023/07/03 04:51:10 [notice] 650975#0: getrlimit(RLIMIT_NOFILE): 1024:262144 2023/07/03 04:51:10 [debug] 650975#0: write: 10, 00007FFFFFFFD450, 7, 0 2023/07/03 04:51:10 [debug] 650975#0: add cleanup: 000000000076AD98 2023/07/03 04:51:10 [debug] 650975#0: malloc: 00000000007AA7B0:8 2023/07/03 04:51:10 [debug] 650975#0: notify eventfd: 10 2023/07/03 04:51:10 [debug] 650975#0: testing the EPOLLRDHUP flag: success 2023/07/03 04:51:10 [debug] 650975#0: malloc: 0000000000752710:6144 2023/07/03 04:51:10 [debug] 650975#0: malloc: 00007FFFF7F78010:253952 2023/07/03 04:51:10 [debug] 650975#0: malloc: 00000000007B0FF0:106496 2023/07/03 04:51:10 [debug] 650975#0: malloc: 00000000007CB000:106496 2023/07/03 04:51:10 [debug] 650975#0: malloc: 00000000007E5010:106496 2023/07/03 04:51:10 [debug] 650975#0: epoll add event: fd:9 op:1 ev:00002001 2023/07/03 04:51:10 [debug] 650975#0: worker cycle 2023/07/03 04:51:10 [debug] 650975#0: epoll timer: -1 2023/07/03 04:51:14 [debug] 650975#0: epoll: fd:9 ev:0001 d:00007FFFF7F78010 2023/07/03 04:51:14 [debug] 650975#0: accept on 0.0.0.0:443, ready: 0 ... 2023/07/03 04:51:22 [debug] 650975#0: 1 http close request 2023/07/03 04:51:22 [debug] 650975#0: 1 http log handler 2023/07/03 04:51:22 [debug] 650975#0: 1 http status: request_time 232 2023/07/03 04:51:22 [debug] 650975#0: 1 free: 000000000074A610, unused: 0 2023/07/03 04:51:22 [debug] 650975#0: 1 free: 000000000074B620, unused: 2348 2023/07/03 04:51:22 [debug] 650975#0: 1 close http connection: 11 2023/07/03 04:51:22 [debug] 650975#0: 1 SSL_shutdown: -1 2023/07/03 04:51:22 [debug] 650975#0: 1 ngx_ssl_async_process_fds called 2023/07/03 04:51:22 [debug] 650975#0: 1 SSL_get_error: 9 2023/07/03 04:51:22 [debug] 650975#0: 1 ngx_ssl_async_process_fds called 2023/07/03 04:51:22 [debug] 650975#0: 1 epoll del async connection: fd:12 2023/07/03 04:51:22 [debug] 650975#0: 1 epoll del connection: fd:11 2023/07/03 04:51:22 [debug] 650975#0: 1 reusable connection: 0 2023/07/03 04:51:22 [debug] 650975#0: 1 free: 0000000000807030 2023/07/03 04:51:22 [debug] 650975#0: 1 free: 0000000000742460 2023/07/03 04:51:22 [debug] 650975#0: 1 free: 0000000000770270, unused: 24 2023/07/03 04:51:22 [debug] 650975#0: *1 free: 000000000073FC20, unused: 320 2023/07/03 04:51:22 [debug] 650975#0: timer delta: 10 2023/07/03 04:51:22 [debug] 650975#0: worker cycle 2023/07/03 04:51:22 [debug] 650975#0: epoll timer: -1 2023/07/03 04:53:17 [info] 650975#0: epoll_wait() failed (4: Interrupted system call) 2023/07/03 04:53:17 [debug] 650975#0: timer delta: 114730 2023/07/03 04:53:17 [debug] 650975#0: worker cycle 2023/07/03 04:53:17 [debug] 650975#0: epoll timer: -1
Ⅲ. Environment export PATH=/home/xxx/qat_package/SM_package/Tongsuo_install/bin/:$PATH export OPENSSL_ENGINES=/home/xxx/qat_package/SM_package/Tongsuo_install/lib64/engines-3 export OPENSSL_LIB=/home/xxx/qat_package/SM_package/Tongsuo_install/lib64 export LD_LIBRARY_PATH=/home/xxx/qat_package/SM_package/Tongsuo_install/lib64