summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet/libcfs
diff options
context:
space:
mode:
authorAndreas Dilger <andreas.dilger@intel.com>2016-03-26 19:40:48 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-29 19:06:51 (GMT)
commit24a4e1ec63ffcd87f656f507709b5f03f6a5f155 (patch)
treec7f130e97ead8d1d5f3753eb98aa3fbf7849d325 /drivers/staging/lustre/lnet/libcfs
parent4d60ffa12c887e1944d5582d79cc9d7f3593eb00 (diff)
downloadlinux-24a4e1ec63ffcd87f656f507709b5f03f6a5f155.tar.xz
staging: lustre: libcfs: add new definitions for cfs_crypto api
Add CFS_HASH_ALG_UNKOWN for unknown hash names instead of using "0xFF" directly. Define the max digestsize the cfs crypto api can handle. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5053 Reviewed-on: http://review.whamcloud.com/9990 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/libcfs')
-rw-r--r--drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c
index 1a9eb77..b4e203d 100644
--- a/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c
+++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c
@@ -316,8 +316,8 @@ static void cfs_crypto_performance_test(unsigned char hash_alg,
unsigned long start, end;
int bcount, err = 0;
int sec = 1; /* do test only 1 sec */
- unsigned char hash[64];
- unsigned int hash_len = 64;
+ unsigned char hash[CFS_CRYPTO_HASH_DIGESTSIZE_MAX];
+ unsigned int hash_len = sizeof(hash);
for (start = jiffies, end = start + sec * HZ, bcount = 0;
time_before(jiffies, end); bcount++) {