diff options
author | Matias Elo <matias.elo@nokia.com> | 2024-06-05 13:51:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 13:51:39 +0300 |
commit | 616034b9c9c789923f7ebe7f1c6d014c4ce8a5d2 (patch) | |
tree | dd1b579c93404d2d98b78944bbdf8313ec499bee /platform/linux-generic/arch/x86/odp/api/abi/hash_crc32.h | |
parent | 8063101c4fac56e16c5a2bb9843f2fd9c5acbfd7 (diff) | |
parent | 87913e636da621d47a8d3bc91fbe131abc09c294 (diff) |
Merge ODP v1.45.0.0HEADv1.45.0.0_DPDK_22.11master
Merge ODP linux-generic v1.45.0.0 into linux-dpdk.
Diffstat (limited to 'platform/linux-generic/arch/x86/odp/api/abi/hash_crc32.h')
-rw-r--r-- | platform/linux-generic/arch/x86/odp/api/abi/hash_crc32.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/platform/linux-generic/arch/x86/odp/api/abi/hash_crc32.h b/platform/linux-generic/arch/x86/odp/api/abi/hash_crc32.h index c2c71bcb7..576b68f20 100644 --- a/platform/linux-generic/arch/x86/odp/api/abi/hash_crc32.h +++ b/platform/linux-generic/arch/x86/odp/api/abi/hash_crc32.h @@ -1,7 +1,5 @@ -/* Copyright (c) 2021, Nokia - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2021 Nokia */ #ifndef ODP_API_ABI_HASH_CRC32_H_ @@ -11,6 +9,7 @@ extern "C" { #endif +#include <odp/api/std_types.h> #include <stdint.h> uint32_t _odp_hash_crc32_generic(const void *data, uint32_t data_len, @@ -34,23 +33,23 @@ static inline uint32_t _odp_hash_crc32c(const void *data, uint32_t data_len, #ifdef __x86_64__ for (i = 0; i < data_len / 8; i++) { - init_val = (uint32_t)__builtin_ia32_crc32di(init_val, *(const uint64_t *)pd); + init_val = (uint32_t)__builtin_ia32_crc32di(init_val, *(const odp_una_u64_t *)pd); pd += 8; } if (data_len & 0x4) { - init_val = __builtin_ia32_crc32si(init_val, *(const uint32_t *)pd); + init_val = __builtin_ia32_crc32si(init_val, *(const odp_una_u32_t *)pd); pd += 4; } #else for (i = 0; i < data_len / 4; i++) { - init_val = __builtin_ia32_crc32si(init_val, *(const uint32_t *)pd); + init_val = __builtin_ia32_crc32si(init_val, *(const odp_una_u32_t *)pd); pd += 4; } #endif if (data_len & 0x2) { - init_val = __builtin_ia32_crc32hi(init_val, *(const uint16_t *)pd); + init_val = __builtin_ia32_crc32hi(init_val, *(const odp_una_u16_t *)pd); pd += 2; } |