Hello,
are there any performance charts of the CAAM unit and it latency for different use cases?
Is there a documentation available, how to get the best out of the CAAM?
The system is at 3.14.28-rt25-1.0.0_ga.
Best regards
解決済! 解決策の投稿を見る。
this package is supported in special way, please
ask for support contact who provided it for you.
Best regards
igor
Any new informations or any questions?
Hello,
Is it possible to try NXP demo image ?
i.MX 6 Series Software and Development Tool|NXP
Regards,
Yuri.
Hello Yuri,
I'm using the GenAVB 1.0.0 image from NXP for the imx6q.
Is it necessary to test the function with an image without AVB support?
Best regards
Daniel
Any ideas for this questions?
Based on the results I have the following questions:
Why has the NXP AVB image the "cryptodev module" included in the kernel?
Why does the openssl testcase not work, if the module is included in the kernel?
Best regards
Daniel
Hey Yuri,
I have chosen the image with the same kernel version as the AVB image.
The following lines are the result I got on the linked image above.
Based on the results I have the following questions:
Why has the NXP AVB image the "cryptodev module" included in the kernel?
Why does the openssl testcase not work, if the module is included in the kernel?
root@imx6qdlsolo:~# openssl speed -evp aes-128-cbc -engine cryptodev
invalid engine "cryptodev"
1995629776:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(/usr/lib/engines/libcryptodev.so): /usr/lib/engines/libcryptodev.so: cannot open shared object file: No such file or directory
1995629776:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
1995629776:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:
1995629776:error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:418:id=cryptodev
1995629776:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(libcryptodev.so): libcryptodev.so: cannot open shared object file: No such file or directory
1995629776:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
1995629776:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:
Doing aes-128-cbc for 3s on 16 size blocks: 5555320 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 1578282 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 412746 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 103982 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 12892 aes-128-cbc's in 3.00s
OpenSSL 1.0.1j 15 Oct 2014
built on: Fri Mar 20 21:52:11 CST 2015
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(ptr)
compiler: arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/var/lib/jenkins/workspace/dizzy-3.14-X-1.0.0_X11_release/temp_build_dir/build_all/tmp/sysroots/imx6qdlsolo -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O2 -pipe -g -feliminate-unused-debug-types -Wall -Wa,--noexecstack -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_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 29628.37k 33670.02k 35220.99k 35492.52k 35203.75k
modprobe cryptodev
cryptodev: driver 1.6 loaded.
openssl speed -evp aes-128-cbc -engine cryptodev
engine "cryptodev" set.
Doing aes-128-cbc for 3s on 16 size blocks: 43627 aes-128-cbc's in 0.08s
Doing aes-128-cbc for 3s on 64 size blocks: 41308 aes-128-cbc's in 0.11s
Doing aes-128-cbc for 3s on 256 size blocks: 37643 aes-128-cbc's in 0.02s
Doing aes-128-cbc for 3s on 1024 size blocks: 29784 aes-128-cbc's in 0.03s
Doing aes-128-cbc for 3s on 8192 size blocks: 8365 aes-128-cbc's in 0.01s
OpenSSL 1.0.1j 15 Oct 2014
built on: Fri Mar 20 21:52:11 CST 2015
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(ptr)
compiler: arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/var/lib/jenkins/workspace/dizzy-3.14-X-1.0.0_X11_release/temp_build_dir/build_all/tmp/sysroots/imx6qdlsolo -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O2 -pipe -g -feliminate-unused-debug-types -Wall -Wa,--noexecstack -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_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 8725.40k 24033.75k 481830.40k 1016627.20k 6852608.00k
Hello,
looks like cryptidev I/F via CAAM is working.
Regards,
Yuri.
Absolutely no ideas for this questions?
Based on the results I have the following questions:
Why has the NXP AVB image the "cryptodev module" included in the kernel?
Why does the openssl testcase not work, if the module is included in the kernel?
Best regards
Daniel
Hi
for caam tests please try imx-test package (folder ../test/caam )
www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.4.tar.gz
use Demo Images on below link
Best regards
igor
It is working with your test image but not with the nxp image related to avb.
this package is supported in special way, please
ask for support contact who provided it for you.
Best regards
igor
Thanks for the clear information.
This thread can be marked as solved.
Yes, it seems to work on your default image but why not on your AVB image?
I don't get any caam in my /proc/interrupts even after a modprobe cryptodev
how can I verify that imx6 caam is really used ?
Thank you for your help
Regards
Hello,
You may use CAAM performance estimations in section 9 (Security) of recent
"i.MX_Linux_User's_Guide.pdf".
Regards,
Yuri.
This is the output I get if I run the three commands fromthe chapter 9 of the linked pdf file above.
openssl speed -evp aes-128-cbc -engine cryptodev
invalid engine "cryptodev"
1996031184:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(/usr/lib/engines/libcryptodev.so): /usr/lib/engines/libcryptodev.so: cannot open shared object file: No such file or directory
1996031184:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
1996031184:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:
1996031184:error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:418:id=cryptodev
1996031184:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(libcryptodev.so): libcryptodev.so: cannot open shared object file: No such file or directory
1996031184:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
1996031184:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:
Doing aes-128-cbc for 3s on 16 size blocks: 4308488 aes-128-cbc's in 2.99s
Doing aes-128-cbc for 3s on 64 size blocks: 1255051 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 328159 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 83225 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 10403 aes-128-cbc's in 3.00s
OpenSSL 1.0.1j 15 Oct 2014
built on: Wed Jan 6 11:43:34 CET 2016
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(ptr)
compiler: arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/bamboo/agent-home/xml-data/build-dir/MSSNIC-GR-JOB1/yocto/build.imx6qsabreauto-avb/tmp/sysroots/imx6qsabreauto-avb -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O2 -pipe -g -feliminate-unused-debug-types -Wall -Wa,--noexecstack -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_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 23055.45k 26774.42k 28002.90k 28407.47k 28407.13k
modprobe cryptodev
modprobe: FATAL: Module cryptodev not found.
openssl speed -evp aes-128-cbc -engine cryptodev
invalid engine "cryptodev"
1996309712:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(/usr/lib/engines/libcryptodev.so): /usr/lib/engines/libcryptodev.so: cannot open shared object file: No such file or directory
1996309712:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
1996309712:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:
1996309712:error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:418:id=cryptodev
1996309712:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:187:filename(libcryptodev.so): libcryptodev.so: cannot open shared object file: No such file or directory
1996309712:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
1996309712:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450:
Doing aes-128-cbc for 3s on 16 size blocks: 4429983 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 1259479 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 325941 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 82782 aes-128-cbc's in 2.99s
Doing aes-128-cbc for 3s on 8192 size blocks: 10354 aes-128-cbc's in 2.99s
OpenSSL 1.0.1j 15 Oct 2014
built on: Wed Jan 6 11:43:34 CET 2016
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(ptr)
compiler: arm-poky-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/bamboo/agent-home/xml-data/build-dir/MSSNIC-GR-JOB1/yocto/build.imx6qsabreauto-avb/tmp/sysroots/imx6qsabreauto-avb -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O2 -pipe -g -feliminate-unused-debug-types -Wall -Wa,--noexecstack -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_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 23626.58k 26868.89k 27813.63k 28350.76k 28367.88k
Any idea how to fix this?
Regards
Daniel
Hello Yuri,
what have I to change, if the kernel module "cryptodev" is not included in the image I build with yocto. The image includes a second component from NXP.
Reagards,
Daniel
Hello,
Please include CAAM driver in system as described in section
52.6 (Driver Configuration) of "i.MX_6_Linux_Reference_Manual.pdf"
Regards,
Yuri.
Hello Yuri,
I have attached a picture of the current kernel config for the Hardware crypto devices section.
That are the default settings without any modifications.
Shouldn't the driver not be inside the kernel and work as expected and speed up the openssl example?
Hello,
Do You see CAAM tests during Linux boot ?
Regards,
Yuri.