DPDK  24.11.0-rc3
rte_thash_gfni.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2021 Intel Corporation
3  */
4 
5 #ifndef _RTE_THASH_GFNI_H_
6 #define _RTE_THASH_GFNI_H_
7 
8 #include <rte_compat.h>
9 #include <rte_log.h>
10 
11 #ifdef RTE_ARCH_X86
12 
13 #include <rte_thash_x86_gfni.h>
14 
15 #endif
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
25 __rte_internal
26 uint32_t
27 rte_thash_gfni_stub(const uint64_t *mtrx, const uint8_t *key, int len);
28 
29 __rte_internal
30 void
31 rte_thash_gfni_bulk_stub(const uint64_t *mtrx, int len, uint8_t *tuple[],
32  uint32_t val[], uint32_t num);
33 
34 #ifndef RTE_THASH_GFNI_DEFINED
35 
48 static inline uint32_t
49 rte_thash_gfni(const uint64_t *mtrx, const uint8_t *key, int len)
50 {
51  return rte_thash_gfni_stub(mtrx, key, len);
52 }
53 
70 static inline void
71 rte_thash_gfni_bulk(const uint64_t *mtrx, int len, uint8_t *tuple[],
72  uint32_t val[], uint32_t num)
73 {
74  rte_thash_gfni_bulk_stub(mtrx, len, tuple, val, num);
75 }
76 
77 #endif /* RTE_THASH_GFNI_DEFINED */
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif /* _RTE_THASH_GFNI_H_ */