Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause 2 : : * Copyright (C) 2017 Intel Corporation. 3 : : * All rights reserved. 4 : : */ 5 : : 6 : : #include "util_internal.h" 7 : : #include "spdk/crc32.h" 8 : : 9 : : static struct spdk_crc32_table g_crc32_ieee_table; 10 : : 11 : : __attribute__((constructor)) static void 12 : 3201 : crc32_ieee_init(void) 13 : : { 14 : 3201 : crc32_table_init(&g_crc32_ieee_table, SPDK_CRC32_POLYNOMIAL_REFLECT); 15 : 3201 : } 16 : : 17 : : uint32_t 18 : 36532 : spdk_crc32_ieee_update(const void *buf, size_t len, uint32_t crc) 19 : : { 20 : 36532 : return crc32_update(&g_crc32_ieee_table, buf, len, crc); 21 : : }