Skip to content

Commit 7b3058e

Browse files
sergeypo-intelherbertx
authored andcommitted
crypto: tcrypt - add skcipher speed for given alg
Allow to run skcipher speed for given algorithm. Case 600 is modified to cover ENCRYPT and DECRYPT directions. Example: modprobe tcrypt mode=600 alg="qat_aes_xts" klen=32 If succeed, the performance numbers will be printed in dmesg: testing speed of multibuffer qat_aes_xts (qat_aes_xts) encryption test 0 (256 bit key, 16 byte blocks): 1 operation in 14596 cycles (16 bytes) ... test 6 (256 bit key, 4096 byte blocks): 1 operation in 8053 cycles (4096 bytes) Signed-off-by: Sergey Portnoy <sergey.portnoy@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent ff33c2e commit 7b3058e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

crypto/tcrypt.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2613,6 +2613,15 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
26132613
break;
26142614

26152615
case 600:
2616+
if (alg) {
2617+
u8 speed_template[2] = {klen, 0};
2618+
test_mb_skcipher_speed(alg, ENCRYPT, sec, NULL, 0,
2619+
speed_template, num_mb);
2620+
test_mb_skcipher_speed(alg, DECRYPT, sec, NULL, 0,
2621+
speed_template, num_mb);
2622+
break;
2623+
}
2624+
26162625
test_mb_skcipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0,
26172626
speed_template_16_24_32, num_mb);
26182627
test_mb_skcipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0,

0 commit comments

Comments
 (0)