1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2021 Intel Corporation
5 #ifndef _RTE_THASH_GFNI_H_
6 #define _RTE_THASH_GFNI_H_
16 #include <rte_thash_x86_gfni.h>
20 #ifndef RTE_THASH_GFNI_DEFINED
23 * Calculate Toeplitz hash.
24 * Dummy implementation.
27 * @b EXPERIMENTAL: this API may change without prior notice.
30 * Pointer to the matrices generated from the corresponding
31 * RSS hash key using rte_thash_complete_matrix().
33 * Pointer to the data to be hashed. Data must be in network byte order.
35 * Length of the data to be hashed.
37 * Calculated Toeplitz hash value.
40 static inline uint32_t
41 rte_thash_gfni(const uint64_t *mtrx __rte_unused,
42 const uint8_t *key __rte_unused, int len __rte_unused)
44 RTE_LOG(ERR, HASH, "%s is undefined under given arch\n", __func__);
49 * Bulk implementation for Toeplitz hash.
50 * Dummy implementation.
53 * @b EXPERIMENTAL: this API may change without prior notice.
56 * Pointer to the matrices generated from the corresponding
57 * RSS hash key using rte_thash_complete_matrix().
59 * Length of the largest data buffer to be hashed.
61 * Array of the pointers on data to be hashed.
62 * Data must be in network byte order.
64 * Array of uint32_t where to put calculated Toeplitz hash values
66 * Number of tuples to hash.
70 rte_thash_gfni_bulk(const uint64_t *mtrx __rte_unused,
71 int len __rte_unused, uint8_t *tuple[] __rte_unused,
72 uint32_t val[], uint32_t num)
76 RTE_LOG(ERR, HASH, "%s is undefined under given arch\n", __func__);
77 for (i = 0; i < num; i++)
81 #endif /* RTE_THASH_GFNI_DEFINED */
87 #endif /* _RTE_THASH_GFNI_H_ */