]> granicus.if.org Git - zfs/commitdiff
Support integration with new QAT products
authorwli5 <weigang.li@intel.com>
Fri, 20 Oct 2017 18:11:25 +0000 (02:11 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 20 Oct 2017 18:11:25 +0000 (11:11 -0700)
Support integration with new QAT products: Intel(R) C62x Chipset,
or Atom(R) C3000 Processor Product Family SoC:
1. Detect new file name in auto-conf.
2. Change MAX_INSTANCES to 48.
3. Change "num_inst" to U16 to clean a build warning.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Weigang Li <weigang.li@intel.com>
Closes #6767

config/kernel.m4
module/zfs/qat_compress.c

index c3ed5cf3320b377a7362b91f866ac0b1a20b41d3..b759ccd39a29826e8b8189726e69b4f8bdeecbdd 100644 (file)
@@ -532,10 +532,10 @@ AC_DEFUN([ZFS_AC_QAT], [
 
                AC_MSG_RESULT([$qatbuild])
                QAT_OBJ=${qatbuild}
-               AS_IF([ ! test -e "$QAT_OBJ/icp_qa_al.ko"], [
+               AS_IF([ ! test -e "$QAT_OBJ/icp_qa_al.ko" && ! test -e "$QAT_OBJ/qat_api.ko"], [
                        AC_MSG_ERROR([
                *** Please make sure the qat driver is installed then try again.
-               *** Failed to find icp_qa_al.ko in:
+               *** Failed to find icp_qa_al.ko or qat_api.ko in:
                $QAT_OBJ])
                ])
 
index 99d1c9a12d6fc0032ff17cf6ce3fd0c549c45128..ea56f144c1d3b065095c9695adea24893785ce44 100644 (file)
 
 /*
  * Max instances in QAT device, each instance is a channel to submit
- * jobs to QAT hardware
+ * jobs to QAT hardware, this is only for pre-allocating instance,
+ * and session arrays, the actual number of instances are defined in
+ * the QAT driver's configure file.
  */
-#define        MAX_INSTANCES           6
+#define        MAX_INSTANCES           48
 
 /*
  * ZLIB head and foot size
@@ -104,7 +106,7 @@ static kstat_t *qat_ksp;
 static CpaInstanceHandle dc_inst_handles[MAX_INSTANCES];
 static CpaDcSessionHandle session_handles[MAX_INSTANCES];
 static CpaBufferList **buffer_array[MAX_INSTANCES];
-static Cpa32U num_inst = 0;
+static Cpa16U num_inst = 0;
 static Cpa32U inst_num = 0;
 static boolean_t qat_init_done = B_FALSE;
 int zfs_qat_disable = 0;