blob: 6bb0c0bf357b179b331bdefcd860ff7d6b1362af [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Martin K. Petersenf11f5942008-06-25 11:22:42 -04002#ifndef _LINUX_CRC_T10DIF_H
3#define _LINUX_CRC_T10DIF_H
4
5#include <linux/types.h>
6
Herbert Xu684115212013-09-07 12:56:26 +10007#define CRC_T10DIF_DIGEST_SIZE 2
8#define CRC_T10DIF_BLOCK_SIZE 1
Martin K. Petersenb7637752018-08-30 11:00:15 -04009#define CRC_T10DIF_STRING "crct10dif"
Herbert Xu684115212013-09-07 12:56:26 +100010
Martin K. Petersen2341c2f82014-09-26 19:20:07 -040011extern __u16 crc_t10dif_generic(__u16 crc, const unsigned char *buffer,
12 size_t len);
13extern __u16 crc_t10dif(unsigned char const *, size_t);
Akinobu Mita10081fb2015-05-01 15:23:50 +090014extern __u16 crc_t10dif_update(__u16 crc, unsigned char const *, size_t);
Martin K. Petersenf11f5942008-06-25 11:22:42 -040015
16#endif