Hardware crypto for Mediatek missing?

Succes :smiley: !!

root@LEDE:~# rmmod mtk_aes
root@LEDE:~# time -v openssl speed -elapsed -evp aes-256-cbc -engine cryptodev
engine "cryptodev" set.
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-256-cbc for 3s on 16 size blocks: 276675 aes-256-cbc's in 2.97s
Doing aes-256-cbc for 3s on 64 size blocks: 153719 aes-256-cbc's in 2.97s
Doing aes-256-cbc for 3s on 256 size blocks: 54902 aes-256-cbc's in 2.97s
Doing aes-256-cbc for 3s on 1024 size blocks: 13558 aes-256-cbc's in 2.97s
Doing aes-256-cbc for 3s on 8192 size blocks: 2002 aes-256-cbc's in 2.97s
OpenSSL 1.0.2k 26 Jan 2017
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(idx,cisc,2,long) aes(partial) blowfish(ptr)
compiler: mipsel-openwrt-linux-musl-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/richard/lede_new/source/staging_dir/target-mipsel_24kc_musl/usr/include -I/home/richard/lede_new/source/staging_dir/target-mipsel_24kc_musl/include -I/home/richard/lede_new/source/staging_dir/toolchain-mipsel_24kc_gcc-6.3.0_musl/usr/include -I/home/richard/lede_new/source/staging_dir/toolchain-mipsel_24kc_gcc-6.3.0_musl/include/fortify -I/home/richard/lede_new/source/staging_dir/toolchain-mipsel_24kc_gcc-6.3.0_musl/include -znow -zrelro -DOPENSSL_SMALL_FOOTPRINT -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_NO_ERR -DTERMIOS -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -iremap/home/richard/lede_new/source/build_dir/target-mipsel_24kc_musl/openssl-1.0.2k:openssl-1.0.2k -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic -I/home/richard/lede_new/source/package/libs/openssl/include -ffunction-sections -fdata-sections -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256-cbc 1490.51k 3312.46k 4732.29k 4674.54k 5522.01k
Command being timed: "openssl speed -elapsed -evp aes-256-cbc -engine cryptodev"
User time (seconds): 0.49
System time (seconds): 14.02
Percent of CPU this job got: 90%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 15.96s
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 10400
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 111
Voluntary context switches: 83
Involuntary context switches: 454
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
root@LEDE:~# modprobe mtk_aes b=16
root@LEDE:~# time -v openssl speed -elapsed -evp aes-256-cbc -engine cryptodev
engine "cryptodev" set.
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-256-cbc for 3s on 16 size blocks: 116585 aes-256-cbc's in 2.97s
Doing aes-256-cbc for 3s on 64 size blocks: 116865 aes-256-cbc's in 2.97s
Doing aes-256-cbc for 3s on 256 size blocks: 104425 aes-256-cbc's in 2.97s
Doing aes-256-cbc for 3s on 1024 size blocks: 95388 aes-256-cbc's in 2.97s
Doing aes-256-cbc for 3s on 8192 size blocks: 34593 aes-256-cbc's in 2.97s
OpenSSL 1.0.2k 26 Jan 2017
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(idx,cisc,2,long) aes(partial) blowfish(ptr)
compiler: mipsel-openwrt-linux-musl-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/richard/lede_new/source/staging_dir/target-mipsel_24kc_musl/usr/include -I/home/richard/lede_new/source/staging_dir/target-mipsel_24kc_musl/include -I/home/richard/lede_new/source/staging_dir/toolchain-mipsel_24kc_gcc-6.3.0_musl/usr/include -I/home/richard/lede_new/source/staging_dir/toolchain-mipsel_24kc_gcc-6.3.0_musl/include/fortify -I/home/richard/lede_new/source/staging_dir/toolchain-mipsel_24kc_gcc-6.3.0_musl/include -znow -zrelro -DOPENSSL_SMALL_FOOTPRINT -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_NO_ERR -DTERMIOS -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -iremap/home/richard/lede_new/source/build_dir/target-mipsel_24kc_musl/openssl-1.0.2k:openssl-1.0.2k -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic -I/home/richard/lede_new/source/package/libs/openssl/include -ffunction-sections -fdata-sections -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-256-cbc 628.07k 2518.30k 9000.94k 32887.98k 95416.11k
Command being timed: "openssl speed -elapsed -evp aes-256-cbc -engine cryptodev"
User time (seconds): 1.26
System time (seconds): 8.41
Percent of CPU this job got: 60%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0m 15.92s
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 10400
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 112
Voluntary context switches: 466871
Involuntary context switches: 284
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
root@LEDE:~# ^C
root@LEDE:~# cat /proc/interrupts
CPU0
4: 1232369 MIPS 4 mt76x2e
5: 627685 MIPS 5 10100000.ethernet
6: 21 MIPS 6 mt7603e
7: 144167 MIPS 7 timer
21: 3936726 INTC 13 aes_engine
25: 9 INTC 17 esw
28: 12 INTC 20 serial
40: 0 GPIO 38 gpio-keys
ERR: 151694
root@LEDE:~#