The cuckoo hash has a fixed number of entries per bucket, so the
configuration parameter for this is unused. We change this field in the
parameters struct to "reserved" to indicate that there is now no such
parameter value, while at the same time keeping ABI consistency.
Fixes:
48a399119619 ("hash: replace with cuckoo hash implementation")
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
struct rte_hash_parameters hash_params = {
.name = NULL,
.entries = 16,
- .bucket_entries = 4,
.key_len = 4,
.hash_func = (rte_hash_function)rte_jhash_32b,
.hash_func_init_val = 0,
/* Parameters used for hash table in unit test functions. */
static struct rte_hash_parameters ut_params = {
.entries = MAX_ENTRIES,
- .bucket_entries = BUCKET_SIZE,
.hash_func = rte_jhash,
.hash_func_init_val = 0,
};
uint64_t i, key;
struct rte_hash_parameters hash_params = {
.entries = num_iterations*2,
- .bucket_entries = 16,
.key_len = sizeof(key),
.hash_func = rte_hash_crc,
.hash_func_init_val = 0,
#define SOCKET_0 0
#define ENICPMD_CLSF_HASH_ENTRIES ENICPMD_FDIR_MAX
-#define ENICPMD_CLSF_BUCKET_ENTRIES 4
void enic_fdir_stats_get(struct enic *enic, struct rte_eth_fdir_stats *stats)
{
struct rte_hash_parameters hash_params = {
.name = "enicpmd_clsf_hash",
.entries = ENICPMD_CLSF_HASH_ENTRIES,
- .bucket_entries = ENICPMD_CLSF_BUCKET_ENTRIES,
.key_len = RTE_HASH_KEY_LENGTH_MAX,
.hash_func = DEFAULT_HASH_FUNC,
.hash_func_init_val = 0,
struct rte_hash_parameters ipv4_l3fwd_hash_params = {
.name = NULL,
.entries = L3FWD_HASH_ENTRIES,
- .bucket_entries = 4,
.key_len = sizeof(struct ipv4_5tuple),
.hash_func = DEFAULT_HASH_FUNC,
.hash_func_init_val = 0,
struct rte_hash_parameters ipv6_l3fwd_hash_params = {
.name = NULL,
.entries = L3FWD_HASH_ENTRIES,
- .bucket_entries = 4,
.key_len = sizeof(struct ipv6_5tuple),
.hash_func = DEFAULT_HASH_FUNC,
.hash_func_init_val = 0,
struct rte_hash_parameters l3fwd_hash_params = {
.name = "l3fwd_hash_0",
.entries = L3FWD_HASH_ENTRIES,
- .bucket_entries = 4,
.key_len = sizeof(struct ipv4_5tuple),
.hash_func = DEFAULT_HASH_FUNC,
.hash_func_init_val = 0,
struct rte_hash_parameters ipv4_l3fwd_hash_params = {
.name = NULL,
.entries = L3FWD_HASH_ENTRIES,
- .bucket_entries = 4,
.key_len = sizeof(union ipv4_5tuple_host),
.hash_func = ipv4_hash_crc,
.hash_func_init_val = 0,
struct rte_hash_parameters ipv6_l3fwd_hash_params = {
.name = NULL,
.entries = L3FWD_HASH_ENTRIES,
- .bucket_entries = 4,
.key_len = sizeof(union ipv6_5tuple_host),
.hash_func = ipv6_hash_crc,
.hash_func_init_val = 0,
struct rte_hash_parameters {
const char *name; /**< Name of the hash. */
uint32_t entries; /**< Total hash table entries. */
- uint32_t bucket_entries; /**< Bucket entries. */
+ uint32_t reserved; /**< Unused field. Should be set to 0 */
uint32_t key_len; /**< Length of hash key. */
rte_hash_function hash_func; /**< Primary Hash function used to calculate hash. */
uint32_t hash_func_init_val; /**< Init value used by hash_func. */