summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2022-03-03 12:13:10 -0800
committerJens Axboe <axboe@kernel.dk>2022-03-07 12:48:35 -0700
commitf3813f4b287e480b1fcd62ca798d8556644b8278 (patch)
tree9f77b5e0c719e20bb7c9dd9faacf1be71b76045d /include/linux
parentcbc0a40e17da361a2ada8d669413ccfbd2028f2d (diff)
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')
-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 */