diff options
author | Sergey Portnoy <sergey.portnoy@intel.com> | 2024-06-17 17:08:29 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-06-28 11:35:46 +1000 |
commit | 7b3058eb3f3b04e534d6cda6820ef8c7cf519a79 (patch) | |
tree | 731b6acb52c5e8159a32430cfc4f236ab5beb82e /crypto | |
parent | ff33c2e6af99afcac3024a5c3ec8730d1e6b8ac7 (diff) | |
download | linux-7b3058eb3f3b04e534d6cda6820ef8c7cf519a79.tar.gz linux-7b3058eb3f3b04e534d6cda6820ef8c7cf519a79.tar.bz2 linux-7b3058eb3f3b04e534d6cda6820ef8c7cf519a79.zip |
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>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/tcrypt.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 8aea416f6480..e9e7dceb606e 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -2613,6 +2613,15 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb) break; case 600: + if (alg) { + u8 speed_template[2] = {klen, 0}; + test_mb_skcipher_speed(alg, ENCRYPT, sec, NULL, 0, + speed_template, num_mb); + test_mb_skcipher_speed(alg, DECRYPT, sec, NULL, 0, + speed_template, num_mb); + break; + } + test_mb_skcipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, speed_template_16_24_32, num_mb); test_mb_skcipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0, |