summaryrefslogtreecommitdiffstats
path: root/module/zfs/qat_compress.c
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2018-03-15 13:53:58 -0400
committerBrian Behlendorf <[email protected]>2018-03-15 10:53:58 -0700
commit38742209322b5b3d93635a4820b2f9c755aadee8 (patch)
tree166b15847cb283cb710e93c73933fc0279cbcce5 /module/zfs/qat_compress.c
parent8a2a9db8df7d421aedeababf7b1ecbb51642f16c (diff)
SHA256 QAT acceleration
This patch enables acceleration of SHA256 checksums using Intel Quick Assist Technology. This patch also fixes up and refactors some of the code from QAT encryption to make the behavior consistent. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chengfeix Zhu <[email protected]> Signed-off-by: Weigang Li <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #7295
Diffstat (limited to 'module/zfs/qat_compress.c')
-rw-r--r--module/zfs/qat_compress.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/module/zfs/qat_compress.c b/module/zfs/qat_compress.c
index 3d756b53d..2116c9790 100644
--- a/module/zfs/qat_compress.c
+++ b/module/zfs/qat_compress.c
@@ -47,11 +47,12 @@ static CpaBufferList **buffer_array[QAT_DC_MAX_INSTANCES];
static Cpa16U num_inst = 0;
static Cpa32U inst_num = 0;
static boolean_t qat_dc_init_done = B_FALSE;
+int zfs_qat_compress_disable = 0;
boolean_t
qat_dc_use_accel(size_t s_len)
{
- return (!zfs_qat_disable &&
+ return (!zfs_qat_compress_disable &&
qat_dc_init_done &&
s_len >= QAT_MIN_BUF_SIZE &&
s_len <= QAT_MAX_BUF_SIZE);
@@ -471,4 +472,7 @@ fail:
return (ret);
}
+module_param(zfs_qat_compress_disable, int, 0644);
+MODULE_PARM_DESC(zfs_qat_compress_disable, "Disable QAT compression");
+
#endif