Hash table function will check if the input bucket size is power of 2,
so the parameter should be rounded up before sending to the creating
function.
Signed-off-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
.key_mask = (p_fc->key_mask_present) ?
p_fc->key_mask : NULL,
.n_keys = p_fc->n_flows,
- .n_buckets = p_fc->n_flows / 4,
+ .n_buckets = rte_align32pow2(p_fc->n_flows / 4),
.f_hash = hash_func[(p_fc->key_size / 8) - 1],
.seed = 0,
};
.key_offset = p_rt->params.arp_key_offset,
.key_mask = NULL,
.n_keys = p_rt->params.n_arp_entries,
- .n_buckets = p_rt->params.n_arp_entries / 4,
+ .n_buckets =
+ rte_align32pow2(p_rt->params.n_arp_entries / 4),
.f_hash = hash_default_key8,
.seed = 0,
};