diff options
author | Tim Chen <tim.c.chen@linux.intel.com> | 2013-05-01 15:52:51 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-05-24 05:55:27 -0400 |
commit | 39761214eefc6b070f29402aa1165f24d789b3f7 (patch) | |
tree | 5e6e2de1c4890abaa4581362ac971cd1a4e4541b /crypto/tcrypt.c | |
parent | 0b95a7f85718adcbba36407ef88bba0a7379ed03 (diff) |
crypto: crct10dif - Simple correctness and speed test for CRCT10DIF hash
These are simple tests to do sanity check of CRC T10 DIF hash. The
correctness of the transform can be checked with the command
modprobe tcrypt mode=47
The speed of the transform can be evaluated with the command
modprobe tcrypt mode=320
Set the cpu frequency to constant and turn turbo off when running the
speed test so the frequency governor will not tweak the frequency and
affects the measurements.
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r-- | crypto/tcrypt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 66d254ce0d11..25a5934f0e50 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -1174,6 +1174,10 @@ static int do_test(int m) | |||
1174 | ret += tcrypt_test("ghash"); | 1174 | ret += tcrypt_test("ghash"); |
1175 | break; | 1175 | break; |
1176 | 1176 | ||
1177 | case 47: | ||
1178 | ret += tcrypt_test("crct10dif"); | ||
1179 | break; | ||
1180 | |||
1177 | case 100: | 1181 | case 100: |
1178 | ret += tcrypt_test("hmac(md5)"); | 1182 | ret += tcrypt_test("hmac(md5)"); |
1179 | break; | 1183 | break; |
@@ -1498,6 +1502,10 @@ static int do_test(int m) | |||
1498 | test_hash_speed("crc32c", sec, generic_hash_speed_template); | 1502 | test_hash_speed("crc32c", sec, generic_hash_speed_template); |
1499 | if (mode > 300 && mode < 400) break; | 1503 | if (mode > 300 && mode < 400) break; |
1500 | 1504 | ||
1505 | case 320: | ||
1506 | test_hash_speed("crct10dif", sec, generic_hash_speed_template); | ||
1507 | if (mode > 300 && mode < 400) break; | ||
1508 | |||
1501 | case 399: | 1509 | case 399: |
1502 | break; | 1510 | break; |
1503 | 1511 | ||