summaryrefslogtreecommitdiff
path: root/include/linux/crc64.h
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2022-03-03 23:13:10 +0300
committerJens Axboe <axboe@kernel.dk>2022-03-07 22:48:35 +0300
commitf3813f4b287e480b1fcd62ca798d8556644b8278 (patch)
tree9f77b5e0c719e20bb7c9dd9faacf1be71b76045d /include/linux/crc64.h
parentcbc0a40e17da361a2ada8d669413ccfbd2028f2d (diff)
downloadlinux-f3813f4b287e480b1fcd62ca798d8556644b8278.tar.xz
crypto: add rocksoft 64b crc guard tag framework
Hardware specific features may be able to calculate a crc64, so provide a framework for drivers to register their implementation. If nothing is registered, fallback to the generic table lookup implementation. The implementation is modeled after the crct10dif equivalent. Signed-off-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20220303201312.3255347-7-kbusch@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/crc64.h')
-rw-r--r--include/linux/crc64.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/crc64.h b/include/linux/crc64.h
index 9480f38cc7cf..e044c60d1e61 100644
--- a/include/linux/crc64.h
+++ b/include/linux/crc64.h
@@ -7,7 +7,12 @@
#include <linux/types.h>
+#define CRC64_ROCKSOFT_STRING "crc64-rocksoft"
+
u64 __pure crc64_be(u64 crc, const void *p, size_t len);
u64 __pure crc64_rocksoft_generic(u64 crc, const void *p, size_t len);
+u64 crc64_rocksoft(const unsigned char *buffer, size_t len);
+u64 crc64_rocksoft_update(u64 crc, const unsigned char *buffer, size_t len);
+
#endif /* _LINUX_CRC64_H */