Skip to content

gk: handle hs_hash_add_key_with_hash() == -EEXIST#671

Merged
AltraMayor merged 1 commit intov1.2.0-devfrom
double_add
Jan 29, 2024
Merged

gk: handle hs_hash_add_key_with_hash() == -EEXIST#671
AltraMayor merged 1 commit intov1.2.0-devfrom
double_add

Conversation

@AltraMayor
Copy link
Owner

In rare situations, hs_hash_add_key_with_hash() will try to add a flow already in the flow table. Callers of hs_hash_add_key_with_hash() ignored these cases and discarded the associate updates.

The reason for not handling those cases was that rte_hash_add_key_with_hash() does not return the entry ID when it already exists in the table, and adding a lookup to the hot path was not desirable. However, hs_hash_add_key_with_hash(), from the new hash table library, provides the entry ID when it is already in the table.

@AltraMayor AltraMayor added this to the Version 1.2 milestone Jan 27, 2024
In rare situations, hs_hash_add_key_with_hash() will try to add
a flow already in the flow table. Callers of
hs_hash_add_key_with_hash() ignored these cases and discarded
the associate updates.

The reason for not handling those cases was that
rte_hash_add_key_with_hash() does not return the entry ID when
it already exists in the table, and adding a lookup to
the hot path was not desirable. However,
hs_hash_add_key_with_hash(), from the new hash table library,
provides the entry ID when it is already in the table.
@AltraMayor AltraMayor merged commit 47b4acd into v1.2.0-dev Jan 29, 2024
@AltraMayor AltraMayor deleted the double_add branch January 29, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant