Message ID | 20220107120700.730-7-tianjia.zhang@linux.alibaba.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | Introduce x86 assembly accelerated implementation for SM3 algorithm | expand |
On Fri, Jan 07, 2022 at 08:07:00PM +0800, Tianjia Zhang wrote: > 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> > --- > crypto/tcrypt.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) This is not an issue with your patch but we should delete all the mb hash tests as the mb hash algorithm tself was removed in 2018. Thanks,
Hi Herbert, On 1/28/22 12:42 PM, Herbert Xu wrote: > On Fri, Jan 07, 2022 at 08:07:00PM +0800, Tianjia Zhang wrote: >> 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> >> --- >> crypto/tcrypt.c | 14 +++++++++----- >> 1 file changed, 9 insertions(+), 5 deletions(-) > > This is not an issue with your patch but we should delete all > the mb hash tests as the mb hash algorithm tself was removed > in 2018. > > Thanks, Thanks for the reminder, I will add an extra patch to remove the mb hash tests. Happy New Year. Tianjia
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 00149657a4bc..82b5eef2246a 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;
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> --- crypto/tcrypt.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)