Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 29, 2024
Merged

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
1 check passed
@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