AnsweredAssumed Answered

Performance of CAAM in i.MX8M Mini

Question asked by Francesco Not on Aug 23, 2019
Latest reply on Aug 27, 2019 by Francesco Not

Hi,
I am trying to test the performance of crytodev in an i.MX8M Mini usign the stock image "L4.14.98_2.0.0_ga_images_MX8MMEVK"

I do a comparison test with   

openssl speed 

  command, as suggested on the User Manual but I am puzzled by the results:

Without cryptodev:

The 'numbers' are in 1000s of bytes per second processed.
type        16 bytes  64 bytes  256 bytes 1024 bytes 8192 bytes
aes-128 cbc 59753.16k 64699.12k 66425.00k 67152.82k  67292.21k
aes-256 cbc 46588.64k 48624.73k 49911.87k 50021.38k  50319.15k

              sign      verify    sign/s verify/s
rsa 1024 bits 0.001747s 0.000079s 572.4  12624.6
rsa 2048 bits 0.010527s 0.000257s 95.0   3893.2

 

With cryptodev:

The 'numbers' are in 1000s of bytes per second processed.
type        16 bytes  64 bytes  256 bytes 1024 bytes 8192 bytes
aes-128 cbc 59728.70k 64694.82k 66644.16k 66923.52k  67286.73k
aes-256 cbc 46609.54k 48623.17k 49912.89k 50029.57k  50338.33k

              sign      verify    sign/s verify/s
rsa 1024 bits 0.001837s 0.000113s 544.3  8858.8
rsa 2048 bits 0.010619s 0.000303s 94.2   3302.7

The performance looks identical, so I began to suspect that that CAAM drivers may not be used, so I ran:

# openssl engine cryptodev -c
(cryptodev) BSD cryptodev engine
[RSA, DSA, DH, DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC, B]

that at least tells me that the module is loaded and responding.

 

So how to check if the CAAS drivers are really working and that crypto hardware is actually used?

 

Thanks,
Francesco.

 

UPDATE:

I followed this comment :https://community.nxp.com/thread/465476#comment-967940 

and had this result: 

# cat /proc/interrupts | grep jr2 > irq.txt

# openssl speed aes-128-cbc -engine cryptodev

# cat /proc/interrupts | grep jr2 >> irq.txt

# cat irq.txt

230: 4580178 0 0 0 GPC-PSCI 114 Edge 3090300.jr2
230: 4580300 0 0 0 GPC-PSCI 114 Edge 3090300.jr2

so the interrrupt calls are effetively incremented... it looks that something is happening on crypto hardware.

Any ideas why the performances shown by   openssl speed  do not change?

Outcomes