BPI-Router-Linux
BPI-Router-Linux copied to clipboard
Wrong DTS reference
https://github.com/frank-w/BPI-R2-4.14/blob/ee7516478dafaa8ccf7f6e763d88a8e03758af37/drivers/crypto/mediatek/mtk-platform.c#L581
https://github.com/frank-w/BPI-R2-4.14/blob/4.14-main/arch/arm/boot/dts/mt7623.dtsi#L1222
thank you, can you verify it works now?
I don't use your config, but as far as you changed reference, things should work. You can check yourself by grep mtk /proc/crypto
which config relies to it? havn't used crypto yet...
CONFIG_CRYPTO_DEV_MEDIATEK=y
?
Yes. I suggest to build this as module to be able to check the difference (it's very unexpected, but anyway..)
[08:58] frank@bpi-r2-e:~$ grep mtk /proc/crypto
driver : mtk-hmac-sha512
driver : mtk-hmac-sha384
driver : mtk-sha512
driver : mtk-sha384
driver : mtk-hmac-sha256
driver : mtk-hmac-sha224
driver : mtk-hmac-sha1
driver : mtk-sha256
driver : mtk-sha224
driver : mtk-sha1
driver : gcm-aes-mtk
driver : ctr-aes-mtk
driver : ecb-aes-mtk
driver : cbc-aes-mtk
[08:58] frank@bpi-r2-e:~$
with actual 4.14...this is how it should look,right? How to test performance (with/without)?
You can check scripts in my fork of your fork :)
Take actual cryptodev, and.or compile af_alg to the kernel. Then recompile openssl with cryptodev. They do have support for cryptodev for BSD, so you need manually add CFLAGS for that. In recent debian (testing) af_alg is present in the default package.
Then you can use openssl speed for aes/sha. This unit has nice performance, but as with any hw module you should pass a lot there to have nice speed. In other case performance will be worse because of DMI interrupts, context switches etc.
Also there are some stability issues with it. Maybe race conditions in DMA handler, or god knows where. To find this, you need load your system with something with interrupts. Run several benchmarks, then fill ram with /dev/urandom to make it swap, use iperf to load network and something with SATA. Likely in 10-20 mins something will die.
Have you found out more?