Answering my own question, thanks to Corentin Labbe from sunxi google group.
Threre is no interrups from sun4i-a10-crypto since there is no DMA engine involved in process.
The only way to check if SS enginge works is tool from this patch: https://lkml.org/lkml/2018/1/11/711
Or you just can trust your /proc/crypto, /dev/crypto, openssl and cryptodev benchmarking tools.
Here is my benchmark.
Without cryptodev:
# openssl speed -evp aes-128-cbc -elapsed
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-cbc for 3s on 16 size blocks: 3850431 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 1092615 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 284371 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 71779 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 8989 aes-128-cbc's in 3.00s
OpenSSL 1.0.2o 27 Mar 2018
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial)
idea(int) blowfish(ptr)
compiler: arm-buildroot-linux-gnueabihf-gcc -I. -I.. -I../include
-fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DHAVE_CRYPTODEV
-DUSE_CRYPTODEV_DIGESTS -DHASH_MAX_LEN=64 -DOPENSSL_BN_ASM_MONT
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM
-DGHASH_ASM -Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128-cbc 20535.63k 23309.12k 24266.33k 24500.57k 24545.96k
After modprobe cryptodev:
# openssl speed -evp aes-128-cbc -engine cryptodev -elapsed
engine "cryptodev" set.
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-cbc for 3s on 16 size blocks: 300402 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 259638 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 168054 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 69703 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 10517 aes-128-cbc's in 3.00s
OpenSSL 1.0.2o 27 Mar 2018
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial)
idea(int) blowfish(ptr)
compiler: arm-buildroot-linux-gnueabihf-gcc -I. -I.. -I../include
-fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DHAVE_CRYPTODEV
-DUSE_CRYPTODEV_DIGESTS -DHASH_MAX_LEN=64 -DOPENSSL_BN_ASM_MONT
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM
-DGHASH_ASM -Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128-cbc 1602.14k 5538.94k 14340.61k 23791.96k 28718.42k
Some gane starts with 8K blocks.
sun4i-ss seems to be loaded:
# dmesg | grep sun4i-ss
[ 1.382460] sun4i-ss 1c15000.crypto-engine: Die ID 0 <- btw, what
means Die?
# cat /proc/crypto | grep sun4i-ss
driver : ecb-des3-sun4i-ss
driver : cbc-des3-sun4i-ss
driver : ecb-des-sun4i-ss
driver : cbc-des-sun4i-ss
driver : ecb-aes-sun4i-ss
driver : cbc-aes-sun4i-ss
driver : sha1-sun4i-ss
driver : md5-sun4i-ss
Cryptodev's speed test:
# ./speed
Testing NULL cipher:
Encrypting in chunks of 512 bytes: done. 754.94 MB in 5.00 secs: 150.99 MB/sec
Encrypting in chunks of 1024 bytes: done. 1.51 GB in 5.00 secs: 0.30 GB/sec
Encrypting in chunks of 2048 bytes: done. 3.02 GB in 5.00 secs: 0.60 GB/sec
Encrypting in chunks of 4096 bytes: done. 4.34 GB in 5.00 secs: 0.87 GB/sec
Encrypting in chunks of 8192 bytes: done. 7.00 GB in 5.00 secs: 1.40 GB/sec
Encrypting in chunks of 16384 bytes: done. 10.49 GB in 5.00 secs: 2.10 GB/sec
Encrypting in chunks of 32768 bytes: done. 14.19 GB in 5.00 secs: 2.84 GB/sec
Encrypting in chunks of 65536 bytes: done. 17.24 GB in 5.00 secs: 3.45 GB/sec
Testing AES-128-CBC cipher:
Encrypting in chunks of 512 bytes: done. 104.50 MB in 5.00 secs: 20.90 MB/sec
Encrypting in chunks of 1024 bytes: done. 124.35 MB in 5.00 secs: 24.87 MB/sec
Encrypting in chunks of 2048 bytes: done. 136.81 MB in 5.00 secs: 27.36 MB/sec
Encrypting in chunks of 4096 bytes: done. 142.10 MB in 5.00 secs: 28.42 MB/sec
Encrypting in chunks of 8192 bytes: done. 146.18 MB in 5.00 secs: 29.23 MB/sec
Encrypting in chunks of 16384 bytes: done. 148.24 MB in 5.00 secs: 29.65 MB/sec
Encrypting in chunks of 32768 bytes: done. 149.42 MB in 5.00 secs: 29.88 MB/sec
Encrypting in chunks of 65536 bytes: done. 149.88 MB in 5.00 secs: 29.97 MB/sec