i.MX6 CAAM performace and support state

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6 CAAM performace and support state

Jump to solution
5,509 Views
danielalbers
Contributor II

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

1 Solution
3,049 Views
igorpadykov
NXP Employee
NXP Employee

this package is supported in special way, please

ask for support contact who provided it for you.

Best regards

igor

View solution in original post

0 Kudos
25 Replies
2,566 Views
danielalbers
Contributor II

Any new informations or any questions?

0 Kudos
2,566 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Is it possible to try NXP demo image ?

i.MX 6 Series Software and Development Tool|NXP

Regards,

Yuri.

0 Kudos
2,566 Views
danielalbers
Contributor II

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

0 Kudos
2,566 Views
Yuri
NXP Employee
NXP Employee

Hi,

yes, I meant published images

i.MX 6 Series Software and Development Tool|NXP

Regards,

Yuri.

0 Kudos
2,553 Views
danielalbers
Contributor II

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

2,566 Views
danielalbers
Contributor II

Hey Yuri,

I have chosen the image with the same kernel version as the AVB image.

http://www.nxp.com/webapp/Download?colCode=L3.14.28_1.0.0_iMX6QDLS_BUNDLE&Parent_nodeId=133769948107...

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

2,566 Views
Yuri
NXP Employee
NXP Employee

Hello,

  looks like cryptidev I/F via CAAM is working.

Regards,

Yuri.

0 Kudos
2,553 Views
danielalbers
Contributor II

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

0 Kudos
2,553 Views
igorpadykov
NXP Employee
NXP Employee

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

http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-process...

Best regards

igor

0 Kudos
2,553 Views
danielalbers
Contributor II

It is working with your test image but not with the nxp image related to avb.

Audio Video Bridging Software|NXP

0 Kudos
3,050 Views
igorpadykov
NXP Employee
NXP Employee

this package is supported in special way, please

ask for support contact who provided it for you.

Best regards

igor

0 Kudos
2,553 Views
danielalbers
Contributor II

Thanks for the clear information.

This thread can be marked as solved.

0 Kudos
2,566 Views
danielalbers
Contributor II

Yes, it seems to work on your default image but why not on your AVB image?

0 Kudos
2,566 Views
aurelienbouin
Contributor IV

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

0 Kudos
2,566 Views
Yuri
NXP Employee
NXP Employee

Hello,

    You may use CAAM performance estimations in section 9 (Security) of recent

"i.MX_Linux_User's_Guide.pdf".

http://www.nxp.com/webapp/Download?colCode=L4.1.15_1.1.0_LINUX_DOCS&Parent_nodeId=13376%209948107170...

Regards,

Yuri.

0 Kudos
2,566 Views
danielalbers
Contributor II

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

0 Kudos
2,566 Views
danielalbers
Contributor II

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

0 Kudos
2,566 Views
Yuri
NXP Employee
NXP Employee

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.

0 Kudos
2,566 Views
danielalbers
Contributor II

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?

KernelConfig.png

0 Kudos
2,566 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Do You see CAAM tests during Linux boot ?

Regards,

Yuri.

0 Kudos