When encountering a loop while adding a new entry,
element out of bounds of array was being unnecessarily resetted.
Fixes:
48a399119619 ("hash: replace with cuckoo hash implementation")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
break;
/* All entries have been pushed, so entry cannot be added */
- if (i == RTE_HASH_BUCKET_ENTRIES) {
- /* Reset flag */
- bkt->flag[i] = 0;
+ if (i == RTE_HASH_BUCKET_ENTRIES)
return -ENOSPC;
- }
/* Set flag to indicate that this entry is going to be pushed */
bkt->flag[i] = 1;