reydecopas Posted February 23, 2017 Posted February 23, 2017 Hi, Following the guide https://docs.armbian.com/Developer-Guide_Build-Preparation/ I compiled a kernel 4.10 and I get: [*] Only appears one CPU. CPU1, CPU2, CPU3 show disabled as lshw result. Anybody know how to enable the other cores? [*] In kernel config I enabled staging drivers for sun8i crypto engine. It seems that after loading the module, cat /proc/crypto does't appears to be using the crypto engine. openssl speed seems to be the same than legacy kernel. In dtb I can see that there is some stuff about crypto with status: disabled Anyone can help in getting the crypto engine enabled? [*] wifi: The iface wlan0 doesn't exists in kernel 4.10. but after compiling git clone https://github.com/jwrdegoede/rtl8189ES_linux.gitfrom from http://linux-sunxi.org/Wifi the wlan0 appears and I am able to scan wifi... but there is a error when trying to associate with WPA-PSK CCMP so no wireless connection. Anyone can point how to make it work? Greetings
zador.blood.stained Posted February 23, 2017 Posted February 23, 2017 [*] Only appears one CPU. CPU1, CPU2, CPU3 show disabled as lshw result. Anybody know how to enable the other cores? Did you make a full image or only the kernel? Installing dev kernel on a system which previously had legacy kernel without replacing u-boot and boot environment file will produce this issue. [*] In kernel config I enabled staging drivers for sun8i crypto engine. It seems that after loading the module, cat /proc/crypto does't appears to be using the crypto engine. openssl speed seems to be the same than legacy kernel. In dtb I can see that there is some stuff about crypto with status: disabled Anyone can help in getting the crypto engine enabled? sun8i-ce is WIP and last time I checked there were some problems with it, so it was disabled for a reason.
reydecopas Posted February 23, 2017 Author Posted February 23, 2017 Did you make a full image or only the kernel? Installing dev kernel on a system which previously had legacy kernel without replacing u-boot and boot environment file will produce this issue. sun8i-ce is WIP and last time I checked there were some problems with it, so it was disabled for a reason. only the kernel... do you recommend full image?
Igor Posted February 23, 2017 Posted February 23, 2017 only the kernel... do you recommend full image? Yes ... in case you don't know exactly what you are doing. Read Zador's post again - he wrote you what to do instead.
reydecopas Posted February 23, 2017 Author Posted February 23, 2017 Full image solves for me: -Quad core fully enabled -Wifi works (compiling from git rtl8189ES_linux) but... regarding crypto engine... I am not able to make it work properly... anybody can help with this? root@orangepiplus:~# uname -a Linux orangepiplus 4.10.0-sun8i #1 SMP Thu Feb 23 20:39:42 CET 2017 armv7l GNU/Linux I've built the armbian image with mainline kernel 4.10 following the documentation changing in the file lib/patch/kernel/sun8i-dev/add-sun8i-ce-crypto-engine-dt.patch the line for crypto@1c15000: from status="disabled" to status= "okay" I enabled it in kernel config and I get the following: root@orangepiplus:~# cat /proc/crypto | head -n 100 name : rsa driver : rsa-sun8i-ce module : sun8i_ss priority : 300 refcnt : 1 selftest : passed internal : no type : akcipher [...] name : cbc(aes) driver : cbc-aes-sun8i-ss module : sun8i_ss priority : 300 refcnt : 1 selftest : passed internal : no type : ablkcipher async : yes blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 16 geniv : <default> [...] I've installed cryptodev from git too... root@orangepiplus:~# ls -lrt /dev/crypto crw-rw-rw- 1 root root 10, 58 Feb 23 22:29 /dev/crypto dmesg [ 6.159486] cryptodev: loading out-of-tree module taints kernel. [ 6.160711] cryptodev: driver 1.8 loaded. [ 7.212338] sun8i-ss 1c15000.crypto: CE_S Die ID 0 [ 7.212353] sun8i-ss 1c15000.crypto: CE_NS Die ID 1 [ 7.213395] sun8i-ss 1c15000.crypto: will run requests pump with realtime priority [ 7.213575] sun8i-ss 1c15000.crypto: will run requests pump with realtime priority [ 7.213662] sun8i-ss 1c15000.crypto: will run requests pump with realtime priority [ 7.213766] sun8i-ss 1c15000.crypto: will run requests pump with realtime priority [ 7.215742] sun8i-ss 1c15000.crypto: Registered Sun8i-ce PRNG [ 7.215767] sun8i-ss 1c15000.crypto: sun8i_ce_hwrng_init [ 7.215772] sun8i-ss 1c15000.crypto: sun8i_ce_hwrng_init rready=-114 [ 7.215777] sun8i-ss 1c15000.crypto: sun8i_ce_seed [ 180.912998] sun8i-ss 1c15000.crypto: ERROR: Cannot allocate fallback [ 190.649388] sun8i-ss 1c15000.crypto: ERROR: Cannot allocate fallback and test tools root@orangepiplus:~/cryptodev-linux/tests# ./cipher ioctl(CIOCGSESSION): Invalid argument root@orangepiplus:~/cryptotest/cryptodev# ./cryptodev_test test aes INFO: Mode test ERROR: ioctl(CIOCGSESSION) Invalid argumentERROR: aes_encrypt ioctl(CIOCCRYPT) Invalid argumentError at encrypt request 0 pos=0 of len=16 71 00 73 00 5a 00 bd 00 53 00 30 00 11 00 05 00 5d 00 8f 00 16 00 ac 00 c0 00 28 00 7b 00 8d 00
ozdemirkulaoglu Posted April 29, 2017 Posted April 29, 2017 Hi, I use same methodology as you tried and cryptodev test has been successfully worked for AES128, AES192 and AES256 algorithms. Also, I compiled openssl by enabling crypto engine support. After that, when I try to compile openssh, it works without using openssl's crypto engine libraries by default. In this case, I got data transmission speed about 14 MB/sec on openssh and my cpu usage is 94%. When I export openssl's crypto engine libraries, then data transmission speed descreases to 4 MB/sec. as the maximum speed. Also, cpu usage descreases to 9%. I use gigabit ethernet connection between my devices which are orange pi plus and banana pi M2. So, the performance is very bad as a result. Note: This method only does not work on orange pi plus. It works on banana pi M2 as expected. Could anyone help me with this performance problem? What do I need to do? Regards.
markbirss Posted February 6, 2018 Posted February 6, 2018 On 29/04/2017 at 2:57 PM, ozdemirkulaoglu said: Hi, I use same methodology as you tried and cryptodev test has been successfully worked for AES128, AES192 and AES256 algorithms. Also, I compiled openssl by enabling crypto engine support. After that, when I try to compile openssh, it works without using openssl's crypto engine libraries by default. In this case, I got data transmission speed about 14 MB/sec on openssh and my cpu usage is 94%. When I export openssl's crypto engine libraries, then data transmission speed descreases to 4 MB/sec. as the maximum speed. Also, cpu usage descreases to 9%. I use gigabit ethernet connection between my devices which are orange pi plus and banana pi M2. So, the performance is very bad as a result. Note: This method only does not work on orange pi plus. It works on banana pi M2 as expected. Could anyone help me with this performance problem? What do I need to do? Regards. @ozdemirkulaoglu what output does running this command give with and without crypto engine libraries time openssl speed -evp aes-128-cbc -engine cryptodev what crypto module you using "sun8i-ce" ?
Recommended Posts