crct10: use isa-l for crc if available
[fio.git] / crc / crct10dif_common.c
index cfb2a1b18d981d2881913aa6b9550d5644d8d730..1763b1c66bce668e8f9bba1525be9932b0061e92 100644 (file)
  *
  */
 
+#ifdef CONFIG_LIBISAL
+#include <isa-l/crc.h>
+
+extern unsigned short fio_crc_t10dif(unsigned short crc,
+                                    const unsigned char *buffer,
+                                    unsigned int len)
+{
+       return crc16_t10dif(crc, buffer, len);
+}
+
+#else
 #include "crc-t10dif.h"
 
 /* Table generated using the following polynomium:
@@ -76,3 +87,5 @@ extern unsigned short fio_crc_t10dif(unsigned short crc,
 
        return crc;
 }
+
+#endif