table: fix LRU hash table parameters check
Fixes the copy paste error in lru hash table parameters check.
Coverity issue: 198433
Fixes: b5cde2cb8c
("table: rework variable size key lru hash table")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
This commit is contained in:
parent
a31dae54a2
commit
dc3c853ce2
@ -148,15 +148,14 @@ check_params_create(struct rte_table_hash_params *params)
|
||||
}
|
||||
|
||||
/* n_keys */
|
||||
if ((params->n_keys == 0) ||
|
||||
(!rte_is_power_of_2(params->n_keys))) {
|
||||
if (params->n_keys == 0) {
|
||||
RTE_LOG(ERR, TABLE, "%s: n_keys invalid value\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* n_buckets */
|
||||
if ((params->n_buckets == 0) ||
|
||||
(!rte_is_power_of_2(params->n_keys))) {
|
||||
(!rte_is_power_of_2(params->n_buckets))) {
|
||||
RTE_LOG(ERR, TABLE, "%s: n_buckets invalid value\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user