summaryrefslogtreecommitdiff
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
authorHuang Ying <ying.huang@intel.com>2010-03-10 18:30:32 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2010-03-10 18:30:32 +0800
commit373dae268d3140a46fa9ff26a3bd4d4d285a7c21 (patch)
treeaa5dc315aa426e3fbf034017af659be7ef8af7ee /crypto/tcrypt.c
parentb7079fe3510fe16627b4e9c72fc478aef68ec40d (diff)
downloadlinux-crypto-373dae268d3140a46fa9ff26a3bd4d4d285a7c21.tar.gz
linux-crypto-373dae268d3140a46fa9ff26a3bd4d4d285a7c21.zip
crypto: tcrypt - Speed testing support for ghash
Because ghash needs setkey, the setkey and keysize template support for test_hash_speed is added. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r--crypto/tcrypt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index aa3f84cc..0b7a8435 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -437,6 +437,9 @@ static void test_hash_speed(const char *algo, unsigned int sec,
goto out;
}
+ if (speed[i].klen)
+ crypto_hash_setkey(tfm, tvmem[0], speed[i].klen);
+
printk(KERN_INFO "test%3u "
"(%5u byte blocks,%5u bytes per update,%4u updates): ",
i, speed[i].blen, speed[i].plen, speed[i].blen / speed[i].plen);
@@ -881,6 +884,10 @@ static int do_test(int m)
test_hash_speed("rmd320", sec, generic_hash_speed_template);
if (mode > 300 && mode < 400) break;
+ case 318:
+ test_hash_speed("ghash-generic", sec, hash_speed_template_16);
+ if (mode > 300 && mode < 400) break;
+
case 399:
break;