Whamcloud - gitweb
LU-3570 libcfs: accelerate crc32c with pclmulqdq
[fs/lustre-release.git] / libcfs / libcfs / user-crypto.c
index 5ad136a..dd4c5dd 100644 (file)
@@ -90,7 +90,7 @@ static int adler_wrapper(void *ctx, const unsigned char *p,
        return 0;
 }
 
-#ifdef HAVE_PCLMULQDQ
+#if defined(HAVE_PCLMULQDQ) && defined(NEED_CRC32_ACCEL)
 static int crc32_pclmul_wrapper(void *ctx, const unsigned char *p,
                                unsigned int len)
 {
@@ -157,7 +157,7 @@ static struct __hash_alg crypto_hash[] = {
                                           .start = start_generic,
                                           .final = final_generic,
                                           .fini = NULL},
-#ifdef HAVE_PCLMULQDQ
+#if defined(HAVE_PCLMULQDQ) && defined(NEED_CRC32_ACCEL)
                                          {.ha_id = CFS_HASH_ALG_CRC32,
                                           .ha_ctx_size = sizeof(unsigned int),
                                           .ha_priority = 100,