BPI-Router-Linux icon indicating copy to clipboard operation
BPI-Router-Linux copied to clipboard

Wrong DTS reference

Open alxchk opened this issue 5 years ago • 8 comments

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

alxchk avatar Nov 19 '18 13:11 alxchk

thank you, can you verify it works now?

frank-w avatar Nov 20 '18 08:11 frank-w

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

alxchk avatar Nov 20 '18 09:11 alxchk

which config relies to it? havn't used crypto yet...

CONFIG_CRYPTO_DEV_MEDIATEK=y

?

frank-w avatar Nov 20 '18 09:11 frank-w

Yes. I suggest to build this as module to be able to check the difference (it's very unexpected, but anyway..)

alxchk avatar Nov 20 '18 09:11 alxchk

[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)?

frank-w avatar Jan 28 '19 08:01 frank-w

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.

alxchk avatar Jan 28 '19 09:01 alxchk

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.

alxchk avatar Jan 28 '19 09:01 alxchk

Have you found out more?

frank-w avatar Oct 20 '19 07:10 frank-w