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

FlowTable could have an Entry API #627

Open
FelixMcFelix opened this issue Dec 3, 2024 · 0 comments
Open

FlowTable could have an Entry API #627

FelixMcFelix opened this issue Dec 3, 2024 · 0 comments
Labels

Comments

@FelixMcFelix
Copy link
Collaborator

BTreeMap provides an Entry API to prevent duplicate lookups for successive operations on the same key. FlowTable wraps a private BTreeMap to provide fixed capacity constraints, meaning we cannot use this API directly without some care to make sure that an Entry::Vacant cannot be used to insert into a full table.

An entry method on FlowTable which handles these semantics would be useful. There are a handful of places which would benefit from this for code cleanup, e.g. TCP flow state management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant