-
Notifications
You must be signed in to change notification settings - Fork 286
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
aya: Remove iter_key from LPM Trie API #526
Conversation
✅ Deploy Preview for aya-rs-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general looks good, just one question.
@alessandrod are you ok with the API https://github.com/aya-rs/aya/pull/526/files#diff-f6d6661573434c62eecc651f4986dfa4e5235ad59ee99bcb4478a370a7fb8621R124 here that adds The use cases are:
|
@dave-tucker Ping, would be nice to have Alessandro's comments addressed :) |
Based on the discussion in Discord we've decided to drop the iter_key() API for LPM Trie. According to the kernel self-tests and experimentation done in Aya, providing a key into bpf_map_get_next_id will either: - If key is an EXACT match, proceed iterating through all keys in the trie from this point - If key is NOT an EXACT match, proceed iterating through all keys in the trie starting at the leftmost entry. An API in Aya could be crafted that gets the LPM match + less specific matches for a prefix using these semantics BUT it would only apply to userspace. Therefore we've opted out of fixing this. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Based on the discussion in Discord1 we've decided to drop the
iter_keys() API for LPM Trie. According to the kernel self-tests and
experimentation done in Aya, providing a key into bpf_map_get_next_id
will either:
trie from this point
the trie starting at the leftmost entry.
An API in Aya could be crafted that gets the LPM match + less specific
matches for a prefix using these semantics BUT it would only apply to
userspace. Therefore we've opted out of fixing this.