HI
我们按照下面提供的链接来构建和执行AM62X平台上支持的硬件加密加速器,硬件加密加速驱动是存在的并加载的,但是硬件加速并不生效,请帮助确定下原因:
硬件加密加速驱动:
root@starcharge:/# lsmod |grep sa2ul
sa2ul 40960 0 - Live 0xffff800008b7e000
sha512_generic 16384 1 sa2ul, Live 0xffff800008b67000
authenc 16384 1 sa2ul, Live 0xffff800008b5f000
加载cryptodev 驱动使用devcrypto引擎
root@starcharge:/# openssl speed -evp aes-128-cbc -engine devcrypto
Engine "devcrypto" set.
Doing AES-128-CBC for 3s on 16 size blocks: 17012594 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 64 size blocks: 13212821 AES-128-CBC's in 2.98s
Doing AES-128-CBC for 3s on 256 size blocks: 6745574 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 1024 size blocks: 2382058 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 8192 size blocks: 339642 AES-128-CBC's in 2.98s
Doing AES-128-CBC for 3s on 16384 size blocks: 171445 AES-128-CBC's in 2.99s
version: 3.1.4
built on: Mon Dec 11 08:59:12 2023 UTC
options: bn(64,64)
compiler: aarch64-buildroot-linux-gnu-gcc -fPIC -pthread -Wa,--noexecstack -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZLIB_SHARED -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
CPUINFO: OPENSSL_armcap=0xbd
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
AES-128-CBC 91037.29k 283765.28k 577547.47k 815795.11k 933673.58k 939449.79k
去除cryptodev模块
root@starcharge:/# openssl speed -evp aes-128-cbc
Doing AES-128-CBC for 3s on 16 size blocks: 17042009 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 64 size blocks: 13235758 AES-128-CBC's in 2.98s
Doing AES-128-CBC for 3s on 256 size blocks: 6743713 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 1024 size blocks: 2381656 AES-128-CBC's in 2.98s
Doing AES-128-CBC for 3s on 8192 size blocks: 339597 AES-128-CBC's in 2.99s
Doing AES-128-CBC for 3s on 16384 size blocks: 171417 AES-128-CBC's in 2.99s
version: 3.1.4
built on: Mon Dec 11 08:59:12 2023 UTC
options: bn(64,64)
compiler: aarch64-buildroot-linux-gnu-gcc -fPIC -pthread -Wa,--noexecstack -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZLIB_SHARED -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
CPUINFO: OPENSSL_armcap=0xbd
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
AES-128-CBC 91194.70k 284257.89k 577388.14k 818394.54k 930427.63k 939296.36k
请帮忙确定为什么使用和不使用cryptodev性能基本没有变化?