1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017-2020 Intel Corporation
5 #ifndef _RTE_NET_CRC_H_
6 #define _RTE_NET_CRC_H_
15 enum rte_net_crc_type {
16 RTE_NET_CRC16_CCITT = 0,
21 /** CRC compute algorithm */
22 enum rte_net_crc_alg {
23 RTE_NET_CRC_SCALAR = 0,
30 * This API set the CRC computation algorithm (i.e. scalar version,
31 * x86 64-bit sse4.2 intrinsic version, etc.) and internal data
35 * This parameter is used to select the CRC implementation version.
36 * - RTE_NET_CRC_SCALAR
37 * - RTE_NET_CRC_SSE42 (Use 64-bit SSE4.2 intrinsic)
38 * - RTE_NET_CRC_NEON (Use ARM Neon intrinsic)
39 * - RTE_NET_CRC_AVX512 (Use 512-bit AVX intrinsic)
42 rte_net_crc_set_alg(enum rte_net_crc_alg alg);
48 * Pointer to the packet data for CRC computation
50 * Data length for CRC computation
52 * CRC type (enum rte_net_crc_type)
58 rte_net_crc_calc(const void *data,
60 enum rte_net_crc_type type);
67 #endif /* _RTE_NET_CRC_H_ */