|
| 1 | +# SPDX-License-Identifier: GPL-2.0-only |
| 2 | + |
| 3 | +# Kconfig for the kernel's cyclic redundancy check (CRC) library code |
| 4 | + |
| 5 | +config CRC4 |
| 6 | + tristate |
| 7 | + help |
| 8 | + The CRC4 library functions. Select this if your module uses any of |
| 9 | + the functions from <linux/crc4.h>. |
| 10 | + |
| 11 | +config CRC7 |
| 12 | + tristate |
| 13 | + help |
| 14 | + The CRC7 library functions. Select this if your module uses any of |
| 15 | + the functions from <linux/crc7.h>. |
| 16 | + |
| 17 | +config CRC8 |
| 18 | + tristate |
| 19 | + help |
| 20 | + The CRC8 library functions. Select this if your module uses any of |
| 21 | + the functions from <linux/crc8.h>. |
| 22 | + |
| 23 | +config CRC16 |
| 24 | + tristate |
| 25 | + help |
| 26 | + The CRC16 library functions. Select this if your module uses any of |
| 27 | + the functions from <linux/crc16.h>. |
| 28 | + |
| 29 | +config CRC_CCITT |
| 30 | + tristate |
| 31 | + help |
| 32 | + The CRC-CCITT library functions. Select this if your module uses any |
| 33 | + of the functions from <linux/crc-ccitt.h>. |
| 34 | + |
| 35 | +config CRC_ITU_T |
| 36 | + tristate |
| 37 | + help |
| 38 | + The CRC-ITU-T library functions. Select this if your module uses |
| 39 | + any of the functions from <linux/crc-itu-t.h>. |
| 40 | + |
| 41 | +config CRC_T10DIF |
| 42 | + tristate |
| 43 | + help |
| 44 | + The CRC-T10DIF library functions. Select this if your module uses |
| 45 | + any of the functions from <linux/crc-t10dif.h>. |
| 46 | + |
| 47 | +config ARCH_HAS_CRC_T10DIF |
| 48 | + bool |
| 49 | + |
| 50 | +config CRC_T10DIF_ARCH |
| 51 | + tristate |
| 52 | + default CRC_T10DIF if ARCH_HAS_CRC_T10DIF && CRC_OPTIMIZATIONS |
| 53 | + |
| 54 | +config CRC32 |
| 55 | + tristate |
| 56 | + select BITREVERSE |
| 57 | + help |
| 58 | + The CRC32 library functions. Select this if your module uses any of |
| 59 | + the functions from <linux/crc32.h> or <linux/crc32c.h>. |
| 60 | + |
| 61 | +config ARCH_HAS_CRC32 |
| 62 | + bool |
| 63 | + |
| 64 | +config CRC32_ARCH |
| 65 | + tristate |
| 66 | + default CRC32 if ARCH_HAS_CRC32 && CRC_OPTIMIZATIONS |
| 67 | + |
| 68 | +config CRC64 |
| 69 | + tristate |
| 70 | + help |
| 71 | + The CRC64 library functions. Select this if your module uses any of |
| 72 | + the functions from <linux/crc64.h>. |
| 73 | + |
| 74 | +config ARCH_HAS_CRC64 |
| 75 | + bool |
| 76 | + |
| 77 | +config CRC64_ARCH |
| 78 | + tristate |
| 79 | + default CRC64 if ARCH_HAS_CRC64 && CRC_OPTIMIZATIONS |
| 80 | + |
| 81 | +config CRC_OPTIMIZATIONS |
| 82 | + bool "Enable optimized CRC implementations" if EXPERT |
| 83 | + default y |
| 84 | + help |
| 85 | + Disabling this option reduces code size slightly by disabling the |
| 86 | + architecture-optimized implementations of any CRC variants that are |
| 87 | + enabled. CRC checksumming performance may get much slower. |
| 88 | + |
| 89 | + Keep this enabled unless you're really trying to minimize the size of |
| 90 | + the kernel. |
| 91 | + |
| 92 | +config CRC_KUNIT_TEST |
| 93 | + tristate "KUnit tests for CRC functions" if !KUNIT_ALL_TESTS |
| 94 | + depends on KUNIT |
| 95 | + default KUNIT_ALL_TESTS |
| 96 | + select CRC7 |
| 97 | + select CRC16 |
| 98 | + select CRC_T10DIF |
| 99 | + select CRC32 |
| 100 | + select CRC64 |
| 101 | + help |
| 102 | + Unit tests for the CRC library functions. |
| 103 | + |
| 104 | + This is intended to help people writing architecture-specific |
| 105 | + optimized versions. If unsure, say N. |
| 106 | + |
| 107 | +config CRC_BENCHMARK |
| 108 | + bool "Benchmark for the CRC functions" |
| 109 | + depends on CRC_KUNIT_TEST |
| 110 | + help |
| 111 | + Include benchmarks in the KUnit test suite for the CRC functions. |
0 commit comments