xref: /dpdk/drivers/net/mlx5/hws/mlx5dr_crc32.h (revision 2acdf09bac28360f73f7aadab82428079d0880e2)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2023 NVIDIA Corporation & Affiliates
3  */
4 
5 #ifndef MLX5DR_CRC32_C_
6 #define MLX5DR_CRC32_C_
7 
8 /* Ethernet AUTODIN II CRC32 (little-endian)
9  * CRC32_POLY 0xedb88320
10  */
11 uint32_t mlx5dr_crc32_calc(uint8_t *p, size_t len);
12 
13 /* Standard CRC16 calculation using the crc_tab16 param to indicate
14  * the pre-calculated polynome hash values.
15  */
16 uint16_t mlx5dr_crc16_calc(uint8_t *p, size_t len, uint16_t crc_tab16[]);
17 
18 #endif /* MLX5DR_CRC32_C_ */
19