AnsweredAssumed Answered

Testing imx6 CAAM module in kernel

Question asked by tera teller on Feb 12, 2014
Latest reply on Feb 12, 2014 by Yuri Muhin


Dear All,

 

I went through the freescale Manuals for the imx6 Board in order to find how one could run some tests for checking the CAAM Performance.

The Manual does give some clue which I have copied below:

"

'caamalg' module provides a connection through the Scatterlist Crypto API both for

common symmetric blockciphers, and for single-pass authentication-encryption services.

Use of these services through the API is exemplified in the common conformance/

performance testing module in the kernel's crypto subsystem, known as tcrypt, visible in

the kernel source tree at crypto/tcrypt.c. "

 

 

Thus I understand that tcrypt.ko is the test modules for CAAM?

 

After loading this modules, I called it as follows(to check AES Algorithm):

modprobe tcrypt sec=1 mode=200

 

Result:

 

 

testing speed of cbc(aes) encryption                                                                                

test 0 (128 bit key, 16 byte blocks): 171151 operations in 1 seconds (2738416 bytes)                                

test 1 (128 bit key, 64 byte blocks): 120999 operations in 1 seconds (7743936 bytes)                                

test 2 (128 bit key, 256 byte blocks): 56189 operations in 1 seconds (14384384 bytes)                               

test 3 (128 bit key, 1024 byte blocks): 17877 operations in 1 seconds (18306048 bytes)                              

test 4 (128 bit key, 8192 byte blocks): 2368 operations in 1 seconds (19398656 bytes)                               

test 5 (192 bit key, 16 byte blocks): 165170 operations in 1 seconds (2642720 bytes)                                

test 6 (192 bit key, 64 byte blocks): 111190 operations in 1 seconds (7116160 bytes)                                

test 7 (192 bit key, 256 byte blocks): 47512 operations in 1 seconds (12163072 bytes)                               

test 8 (192 bit key, 1024 byte blocks): 14503 operations in 1 seconds (14851072 bytes)                              

test 9 (192 bit key, 8192 byte blocks): 1897 operations in 1 seconds (15540224 bytes)                               

test 10 (256 bit key, 16 byte blocks): 162521 operations in 1 seconds (2600336 bytes)                               

test 11 (256 bit key, 64 byte blocks): 105453 operations in 1 seconds (6748992 bytes)                               

test 12 (256 bit key, 256 byte blocks): 43914 operations in 1 seconds (11241984 bytes)                              

test 13 (256 bit key, 1024 byte blocks): 13171 operations in 1 seconds (13487104 bytes)                             

test 14 (256 bit key, 8192 byte blocks): 1703 operations in 1 seconds (13950976 bytes)

 

Now my question is, is this indeed using CAAM? I got a similar result while using OpenSSL user library. I don't see any improvement. Also I had put some "printk" Statements in my caamalg.c code. But i never saw These in the 'dmesg'... Seems fishy

 

Any help would be appreciated!

 

 

Thanks,

 

Tera

 

Outcomes