summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>2022-01-07 20:07:00 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2022-01-28 16:51:11 +1100
commit14b6ef592e179c1f680ad53954f9b9219e8d845c (patch)
treea598c0df7848503b5ffea479e40bdd608f5fb191
parent1473f2ca6e4e7f9103542b8937ca471ddadb5348 (diff)
downloadlinux-crypto-14b6ef592e179c1f680ad53954f9b9219e8d845c.tar.gz
linux-crypto-14b6ef592e179c1f680ad53954f9b9219e8d845c.zip
crypto: tcrypt - add asynchronous speed test for SM3
tcrypt supports testing of SM3 hash algorithms that use AVX instruction acceleration. In order to add the sm3 asynchronous test to the appropriate position, shift the testcase sequence number of the multi buffer backward and start from 450. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/tcrypt.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 00149657..82b5eef2 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -2571,31 +2571,35 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
if (mode > 400 && mode < 500) break;
fallthrough;
case 422:
+ test_ahash_speed("sm3", sec, generic_hash_speed_template);
+ if (mode > 400 && mode < 500) break;
+ fallthrough;
+ case 450:
test_mb_ahash_speed("sha1", sec, generic_hash_speed_template,
num_mb);
if (mode > 400 && mode < 500) break;
fallthrough;
- case 423:
+ case 451:
test_mb_ahash_speed("sha256", sec, generic_hash_speed_template,
num_mb);
if (mode > 400 && mode < 500) break;
fallthrough;
- case 424:
+ case 452:
test_mb_ahash_speed("sha512", sec, generic_hash_speed_template,
num_mb);
if (mode > 400 && mode < 500) break;
fallthrough;
- case 425:
+ case 453:
test_mb_ahash_speed("sm3", sec, generic_hash_speed_template,
num_mb);
if (mode > 400 && mode < 500) break;
fallthrough;
- case 426:
+ case 454:
test_mb_ahash_speed("streebog256", sec,
generic_hash_speed_template, num_mb);
if (mode > 400 && mode < 500) break;
fallthrough;
- case 427:
+ case 455:
test_mb_ahash_speed("streebog512", sec,
generic_hash_speed_template, num_mb);
if (mode > 400 && mode < 500) break;